Skip to main content
20 votes
Accepted

Magento 2: get attribute label (considering current store view)

Use getStoreLabel() ,instead of getFrontendLabel()
Amit Bera's user avatar
  • 77.7k
9 votes
Accepted

How to add a dynamic label In Magento 2?

You can use helper to get dynamic label. Add helper in <argument/> and chnage xsi:type="string" to xsi:type="helper" <argument name="label" xsi:type="helper" helper="Vendor\Module\Helper\...
Prince Patel's user avatar
  • 22.9k
7 votes

How to edit and change checkout field labels in Magento 2?

The best way to implement this is by using translation csv. You can follow below steps: 1) As you are working in UK geography, I am assuming your locale would be set to English(United Kingdom). If ...
Dexter's user avatar
  • 3,513
4 votes
Accepted

Get option label associated with admin store in Magento 2

After some more trying, I came to the answer myself. Just call the setStoreId() method on each attribute. So the code to get the Admin labels looks like this: $coll = $this->_objectManager->...
Thomas's user avatar
  • 211
4 votes
Accepted

Save product image labels programmatically magento 2

Try following way: public function __construct( \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Catalog\Model\Product $product, \Magento\Framework\Registry $...
Sohel Rana's user avatar
  • 36.1k
4 votes
Accepted

Magento 2 - Hide SHIPPER_ACCOUNT_NUMBER on FedEx shipping label

The method currently building the request is Magento\Fedex\Model\Carrier::_formShipmentRequest. You'll likely need to insert a preference for the Carrier class because the method you need to update ...
Pmclain's user avatar
  • 2,658
4 votes
Accepted

Magento 2: Rest API products "custom_attributes" add selected attribute value "label"

I have added attribute value with label in custom_attributes products Rest API. Also with added attribute visible_on_storefront Follow below file path to create cusotm module and fix the requirement....
Kirti Nariya's user avatar
  • 3,091
3 votes
Accepted

magento 1.9 get shopping cart price rule label

Try following code: var_dump($rule->getStoreLabel()); If you want all labels use following way: $rule->getStoreLabels()
Sohel Rana's user avatar
  • 36.1k
3 votes

Duplicate Street Address: Line 1 Label : Magento 2.3.2

No the proper solution that works is, otherwise it will hide the whole first address line and the next button will not work anymore [name*="shippingAddress.street.0"] .label {display: none;}
Sander van Zuidam's user avatar
3 votes
Accepted

How to get selected option of the attribute for the product?

$_product->getAssembly() should return you the id of the option selected for the current product. $_product->getAttributeText('assembly') (notice the lowercase attribute name) should return ...
Marius's user avatar
  • 199k
2 votes

Change Shipping label on all summary section in Magento 2

The Above way can be Affect another Language Translation if some other page has the word "Shipping", so Try to Make change The checkout_cart_index.xml as below <item name="shipping&...
Kalimuthu L's user avatar
2 votes

How do you edit checkout field labels in Magento 2?

You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php public function process($jsLayout) { $...
D Singh's user avatar
  • 1,144
2 votes

Remove checkbox label

You need to Remove lable item from your code Remove below Line : <item name="label" xsi:type="string">Checkbox Field</item> Below is Complete code : <item name="checkbox_field" xsi:...
Manthan Dave's user avatar
  • 9,906
2 votes
Accepted

Move up Validation in Configurable Product Page

By default this warning message comes from core module Magento Swatches. vendor/magento/module-swatches/view/frontend/web/js/swatch-renderer.js Override core js file into your theme, /app/design/...
Rakesh Jesadiya's user avatar
2 votes

Warning: array_merge_recursive() expects at least 1 parameter, 0 given

I was getting the same error when accessing the product page directly when 'Display Out of Stock Products' is set to No in the admin and the product is out of stock. The ...
Preston R's user avatar
2 votes

Duplicate Street Address: Line 1 Label : Magento 2.3.2

The syntax is bad. The good solution: [name*="shippingAddress.street.0"] {display: none;}
Ymifoto's user avatar
  • 21
2 votes

Duplicate Street Address: Line 1 Label : Magento 2.3.2

I used to [name*="shippingAddress.street.0"] .label {display: none;} in css it is not proper solution but the label disapper
ozan yeni's user avatar
2 votes
Accepted

How to show custom attribute value as label in magento 2 product listing page

Make this configuration in your custom attribute : Admin -> Stores -> Attributes -> Product > Select your attribute -> Storefront Properties -> Set "Used in Product Listing" to Yes ...
PЯINCƎ's user avatar
  • 11.7k
2 votes

How do I place a widget in a custom page layout?

add a page_types.xml within your module. The path will be etc/frontend/page_types.xml in this you can define the page_types as below <?xml version="1.0"?> <page_types xmlns:xsi=&...
Amit Samsukha's user avatar
1 vote
Accepted

Magento 2 - Get attribute label by id in controller

You can use this in your controller file protected $optionFactory; protected $_attributeOptionCollection; public function __construct( \Magento\Eav\Api\Data\AttributeOptionInterfaceFactory $...
Kishan Savaliya's user avatar
1 vote
Accepted

Magento2 change label of phone number field

You have to change phone number instead Mobile Phone number then need to change below two file. 1) Below CSV will translate Phone Number text in frontend address. File path: magento/app/design/...
Kirti Nariya's user avatar
  • 3,091
1 vote
Accepted

Magento 2.3 get attribute id from attribute Label

Follow this below code to get attribute_id & attribute_code by using attribute label : Construct Method : protected $eavAttribute; public function __construct( .... \Magento\Eav\Model\...
Rohan Hapani's user avatar
  • 17.5k
1 vote

White Label Magento - Community Edition

No Especially not now that Adobe own Magento. Not sure whether this is the answer you are expecting or not.
Dominic Pixie's user avatar
1 vote

USPS Create Shipping Label checkbox doesn't show on Ship Order screen

Excerpt from the Magento 2.2.3 release notes: On February 23, 2018, USPS removed APIs that support the creation of shipping labels without postage. In response, we’ve removed this functionality ...
mam08ixo's user avatar
  • 2,963
1 vote

Change Firstname, Lastname label in customer registration in Magento2.1.7?

You can try this file approx line number 63 vendor/magento/module-customer/view/frontend/templates/widget/name.phtml you can override this to your theme file app/design/frontend/[Package]/[...
HIren Kadivar's user avatar
1 vote
Accepted

How can I add some extra labels for the address in the adminpanel in M1?

In the end I still end up using jQuery for the customer address and for the sales order address I used prototype. First I rewrite the data.phtml . here is the xml code: <...
Attila Naghi's user avatar
  • 4,093
1 vote

How to add Create Print Label for Custom Shipping method in magento 2

First of all, Shipping method should be online and offline if you are creating online shipping method than you need to extend your model to AbstractCarrieronline instead of AbstractCarrier also you ...
Patel Jaimin's user avatar
1 vote

How can I add new icon label for category in menu?

First, you need to add new category attribute, example: customlabel How to add new custom category attribute And you can modify this PHTML to show your custom attribute app\design\frontend\base\...
Ryan Permana's user avatar
1 vote
Accepted

Category Label crums are not displaying in multi-select view in edit form admin magento 2?

In your data provider, use this inside contructor. $this->dataPersistor = $dataPersistor;
Kishan Patadia's user avatar
1 vote

How can set new label Icon for selected category in menu popup

Create a custom category attribute (Yes or no), You can get help here : https://www.atwix.com/magento/add-category-attribute/ http://inchoo.net/magento/how-to-add-new-custom-category-attribute-in-...
Arunendra's user avatar
  • 7,458

Only top scored, non community-wiki answers of a minimum length are eligible