Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom]

Denotes questions about Custom code or Custom modules which is used to add/extend/enhance the existing functionality of Core Magento.

8
votes
3answers
8k views

Magento 2: How to override Luma Theme Home Page

I'm using Magento 2 CE Version 2.1.0 on WAMP Windows 10 I already referred Magento 2: How to override mini-cart default template html file? Would like to override Magento 2 Default Luma Theme I ...
2
votes
3answers
4k views

Magento 2: How to set Max Length for Street Address?

I would like to set Max Length for Customer's Street Address 1 to 50 Characters & Street Address 2 to 100 Characters. Changes will be applied on Frontend only, where we can find Street Address. ...
14
votes
1answer
13k views

how to add pagination on custom collection in Magento 2

I am working on custom module. How can i use default magento pagination with my custom collection and also set custom limits on that?
3
votes
2answers
7k views

Magento redirect from all pages if not logged in

So, I need to redirect user to some page(tt can be CMS or customer/account) if he did not logged. And on this page(CMS or customer/account) I will have a form to login/register. So, I made an observer ...
4
votes
2answers
10k views

How to override core catalog block product list?

I am trying to override core/catalog/block/product/List.php with following Ref:http://www.magentocommerce.com/boards/viewthread/14692/ file: Ziva/Customcatalog/etc/config.xml <config> <...
7
votes
6answers
24k views

Magento: Add captcha to custom contact form

I created a new custom contact form in Magento website, I am trying to add captcha at the end of it. I have added to app/code/core/Mage/Captcha/etc/config.xml <customcontacts> ...
8
votes
5answers
12k views

theme is not showing in admin panel list magento2

i just create new test theme but it is not showing in admin panel theme list app/design/frontend/Magento/mytheme/theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
0answers
797 views

Magento 2: Admin price changes are not refreshing minicart immediately till checkout

I have added 1 product with it's price in Cart. It's value is 100 USD. Now from backend I'm enabling Special Price & set it to 50 USD. How can I directly apply that price in Cart? I know we can ...
6
votes
1answer
13k views

how to create custom layout page in custom theme

I want to create a custom page layout in my custom theme. I have created a custom theme named "ktheme" with a parent theme. I created cutome_home.xml in the layout folder but I am just getting a blank ...
2
votes
2answers
1k views

custom message based on total for free delivery

Is it possible to display a message in a pop-up box or alert on the cart page when a customer is close to the free delivery threshold i.e. "Spend another £5 and you qualify for free delivery"
3
votes
1answer
6k views

how to add custom data in order email in magento 2

I am new to Magento. I want to override new order email template and add custom details in order email. Please help. Steps I have done 1.I have create new email template and assign to new order in ...
9
votes
5answers
19k views

Magento2 : How to get product id to my custom module

I am new to magento2 and currently I'm building a custom module and i want to get the product ID/SKU from the catalog. I'm trying to call using a function located in the Block folder. please advise!
4
votes
1answer
747 views

Magento 2: How to enable newly created admin theme & override module?

I'm using Magento 2 CE Version 2.1.2. I have followed Magento StackExchange Questions/Answer for this. Still having issues. I would like to Override Magento 2: How to override Adminhtml "...
12
votes
1answer
13k views

Add custom field to contact form Magento 2?

I'm using magento 2 and I would like to add a custom field to the contact form , how I would be able to do that ?
7
votes
2answers
23k views

How to add a custom javascript to theme in Magento 2?

I have experience with Magento 1, and there adding a custom javascript file was very straightforward and logical. But when it comes to Magento 2, I can't figure out how to add a new js file, where I ...
21
votes
5answers
46k views

How do I add a block on the home page above the content, below the navigation on the home page only?

How do I add a block to the home page only above the content section, but below the navigation to spread across the page whilst still using the two-column template? I am using Magento version 1.9. ...
8
votes
1answer
15k views

Magento2 How to get custom attribute and its value of a customer? [duplicate]

I followed this tutorial to add a custom attribute to Customer. Then in Controller LoginPost.php, I want to get the value of that attribute of a particular customer to do some checking. But I found ...
2
votes
2answers
720 views

How do i add product grid in customer admin section and save the checkbox values to database

I want to add product grid in Magento 2 admin customer section with a separate tab, that I got completed, but when I select the checkbox values from grid and hit save. It does not get the values of ...
10
votes
2answers
36k views

Magento 2 : Get Custom Attribute Value of Product [duplicate]

I'm trying to get custom attribut from my product. I tried various methods like below, but non of them worked. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); /** @...
10
votes
2answers
15k views

Add Custom attributes to Custom attribute set programmatically

Hi Could someone help me with this? I created a custom attribute set and custom attribute as $installer = $this; /* @var $installer Mage_Eav_Model_Entity_Setup */ $installer->startSetup(); //...
5
votes
1answer
12k views

Magento 2: Creating a custom layout

I'm having trouble creating a custom layout. I have successfully created a layout called home_page.xml which is a copy of the default 1column layout. I have selected this layout for my home page, ...
3
votes
1answer
3k views

Magento 2 - Emails -> if statement

I'm currently configuring my transactional emails for Magento 2 and since I am in germany and want to ship some parts to a partner inside the EU i can place those orders without calculating taxes for ...
3
votes
3answers
10k views

How to implement Magento Captcha in Contact- Us form?

I need to show default magento captcha in contact-us page.
0
votes
1answer
69 views

How can i add 5% amount on if customer choose Online Payment instead of cod

How can i apply extra fees if customer choose online payment instead of cash on delivery.
8
votes
1answer
4k views

Whats the best way to check if a custom attribute exists in Magento2

In being careful, I want to check if my custom attribute exists before I attempt to utilize it in any way. I need to check against all attributes collection, not just the product collection. My ...
4
votes
1answer
746 views

Magento 2.2.4 Show error message returned by plugin

I'm beginner to Magento2 and I want to validate pincode which exists in custom table or not on Checkout page (www.test.com/checkout/), according to that I want to display error message on same page. ...
2
votes
1answer
1k views

Magento 2: Server side validation not showing filled up data while error [SOLVED]

I have below code app\code\Custom\Module\Controller\MyModule\PostForm.php namespace Custom\Module\Controller\MyModule; use Magento\Framework\App\Request\DataPersistorInterface; use Magento\...
1
vote
1answer
1k views

Magento EE - Enterprise Logging

I have small problem. I have created my own module at local, I'd like to add logs for save/edit/delete actions with Enterprise Logging module. I have created logging.xml at etc dir app/code/local/AB/...
0
votes
1answer
433 views

Magento 2: ACL Permission Call Manually for Logged In Admin

Magento 2: ACL Permission for Admin Module In magento\app\code\Custom\Module\Controller\Adminhtml\Posts\Index.php namespace Custom\Module\Controller\Adminhtml\Posts; use Magento\Framework\View\...
0
votes
1answer
4k views

Related Products template customize

How do you change the related products template output. Instead select all I would like to add a "add to cart" button to all related products and remove checkboxes.
0
votes
1answer
564 views

Magento 2: How to define Scope For Router.php

I have created Custom Module. As it requires some front-end routing, have to create Router.php Whenever I'm accessing Magento eCommece Frontend other pages, say Category/Product Page. It will call my ...
7
votes
1answer
12k views

Simple Magento2 example of retrieving and displaying a custom table field?

I have a custom table in my Magento2 database and can not find a simple working example of how to connect, retrieve, and display the field data in a Magento2 page. This one mostly works but is ...
10
votes
2answers
7k views

Magento 2 How to uninstall attributes added by custom module?

So far I know that when uninstalling a custom module, it is possible to remove custom tables or columns added by custom module by using uninstall.php which extends \Magento\Framework\Setup\...
8
votes
5answers
5k views

Custom Order, Invoice, and Shipping Starting Numbers

What's the safest approach to change the next starting numbers for order, invoice, and shipment on a live site?
8
votes
2answers
11k views

Custom api Invalid api path

So I followed this example for creating custom api. But I am not sure if I am calling it wrong or my code is not correct. Here is what I have. Folder structure: Mycompany Syncreports etc ...
7
votes
2answers
3k views

Use Magento opConfig.reloadPrice() with jQuery and Custom options

I am trying to use the Magento reloadPrice() with jQuery to refresh the price. I have a configurable product with custom options. Without jQuery, the SELECT code for the option is : <select id="...
2
votes
2answers
2k views

Magento 2: Import Script Store Id Related Issue

I'm using Magento 2 CE Version 2.1.3 Magento 2: Save all product data outside Magento with Images Once I imported data from CSV using above script. If put as ->setStoreId(0), then it will add ...
8
votes
2answers
8k views

Magento 2 - Set custom attribute value on cart page

In Magento 1.x I have created following function in Namespace/Modulename/Model/Observer.php public function salesQuoteItemSetCustomAttribute($observer){ $quoteItem = $observer->...
8
votes
3answers
7k views

Magento 2: How to add additional block on checkout page?

I would like to override the above file & display my custom block in the li. magento\vendor\magento\module-checkout\view\frontend\web\template\shipping.html <li id="shipping" class="checkout-...
6
votes
3answers
5k views

Magento 2 - Ajax is not calling Controller

I tried to make a simple ajax-call to my controller. Somehow I don't get a valid response. MyCompany/MyModule/Index/GetAjax.php namespace MyCompany\MyModule\Controller\Index; class GetAjax extends ...
5
votes
1answer
5k views

How render product wishlist link functionality in custom template (phtml) in magento 2

How to display wishlist link (with functionality) in custom phtml file using template file in magento 2
4
votes
1answer
866 views

Magento 2 - discrepancy between documentation and theme files structure on github

I am creating a new theme and would like to start by duplicating the default blank theme and then modify it to become my new theme. When I checked the frontend developer guides, it indicated the ...
4
votes
1answer
3k views

Override the frontname for a existing Magento module

I recently started working on Magento for one of my projects and stuck at something, which i see a very common use case. I tried looking at different blog post but couldn't find any which can hint ...
3
votes
1answer
2k views

Magento 2: Custom Admin Module: On Edit data not filled up [SOLVED]

I'm using Magento 2 Version 2.1.0. I have below file for form. {folder path}\magento2\app\code\Custom\Module\view\adminhtml\ui_component\custom_module_form.xml <?xml version="1.0" encoding="UTF-...
3
votes
1answer
2k views

Magento 2: Check condition on Click of “Proceed to Checkout”

May be I need to create Event Observer. I would like to check Product's Type Condition & Display Message Accordingly on Shopping Cart Page. <event name="...
3
votes
2answers
15k views

Adding custom css-files to theme (page.xml) - custom css-files for single storeviews

Question #1: For some reason, I can't seem to get my custom CSS file to be implemented into the theme. I've basically done this with the page.xml: Before: <action method="addItem"><type>...
2
votes
3answers
6k views

How to set field value of form field in Magento 2

I am trying to set the value of Field in form using below code: $fieldset->addField( 'hideGoogle', 'text', [ 'name' => 'hideGoogle', '...
2
votes
3answers
4k views

Magento 2: How to set Tier Pricing Programatically Group Wise [closed]

I'm following Programmatically add tier prices On top of below post i'm trying to add Tier Pricing Magento 2: Save all product data outside Magento with Images I have done below thing $tierPrices =...
2
votes
1answer
3k views

Magento 2: ACL Permission for Admin Module [duplicate]

I have multiple Admin User Roles with Users. For my Custom Module it's not giving "Access denied" for non - authorized Admin. I have followed https://www.mageplaza.com/magento-2-module-development/...
1
vote
1answer
3k views

How to create CUSTOM extension in magento 2.1.6? [duplicate]

I was confusing among extensions and modules. Can anyone guide me about it and i am looking for good tutorial for creating extensions in magento 2.1.6. ?