New answers tagged

1

You can add one more function in your helper class to load product info and call same function in PHTML. Updated code will be like as below: <?php namespace MyModule\LinkedProducts\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { public function __construct( \MagePal\LinkProduct\Model\Accessory $accessory, \Magento\...


0

You can do this by add new function in your helper and call in phtml. Helper File : <?php namespace MyModule\LinkedProducts\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { private $accessory; private $abstractProduct; private $productFactory; public function __construct( \MagePal\LinkProduct\Model\...


0

It's happening because the product was created using the Dynamic SKU option. You just need to disable it and refresh the page. So, it's going to return: Bundle Product SKU: BundleQA Simple Product SKU: GT-5AHG30008P


0

I was doing after you, and here is my solution: The reason which cause this issue is you set the 'value' => 'customattributetype', it is not default values. This value should be "text, price, select, media, multiselect .." You can check the default values in eav_attribute table after you create a new attribute. So the solution is you change the 'value' ...


0

You can check this link : https://devdocs.magento.com/videos/fundamentals/add-new-product-attribute/ It describes all the steps for achieving what you are looking for .


2

we are create three form fields. <field name="customer_id" formElement="select" component="Vendorename_Modulename/js/components/select-customer" > <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="filterOptions" xsi:type="boolean">true</item> ...


0

I was facing the same issue like you before. It seems the Magento failed to render the given dynamic URL, I did this to solve: I use a code editor that I suspect sent different charset encoding when I copy paste it into the TinyMCE. Especially it affected special characters like quote, double quote and forward slash. I try a different code editor and turn ...


3

If you work with the team with more than 1 member, then you need to sync all attributes with your team members. In that case, programmatically will help you. If you are the only one on the team, then choose what is easy for you. Another reason is: programmatically will assign attributes to all attribute sets automatically, otherwise, you need to create an ...


0

I have found issue. I'm trying to override vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details.js file using requirejs-config.js file. Here because of requirejs mapping, all files which have Magento_Checkout/js/view/summary/item/details path replaced with Test_Checkoutsummary/js/view/summary/item/details path and if we look into ...


0

please check $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); echo $choose_slot_break = $product->getData('choose_slot_break'); hope it works.


0

In case where your get this error because attribute have been added programmatically and $attribute->getIsUserDefined() equal false mean it's a system attribut then you can run sql query : UPDATE `dpx_eav_attribute` SET `is_user_defined` = '1' WHERE `dpx_eav_attribute`.`attribute_code` = "{your attribut code}";


0

Just an update to previous answer. Registry is deprecated and you can now use: $attributeObject = $subject->getAttributeObject(); And instead of using $form->setValues($attributeObject->getData()); It is better to use following code to prevent the attribute label getting empty in admin edit. This was tested in magento 2.3.1 $form->addValues(['...


1

Those checkboxes are form fields only and not being persistet in the database. They show if an attributes values is going to be saved in the current store. Magento will evaluate them when saving the product. When checked magento will delete the attributes value for the current store and in the frontend will fallback to its value of the default store. I can ...


2

To mass update product attributes, use updateAttributes method, which is faster and better than looping through all the products and save each one of them. Inject the model class Magento\Catalog\Model\Product\Action in your Observer class and add the code below to update your product attributes // $productIds is an array of product Ids array(1,2,3,...) // ...


0

Rather than a product attribute, you can add a "Custom Option". These store the customer supplied value on the cart item: https://docs.magento.com/m1/ce/user_guide/catalog/product-options-custom.html


0

Short and helpful: Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'color');


0

Please try below code from new custom module(Uninstall.php): namespace Vendor\Modulename\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\UninstallInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Catalog\Model\Product; ...


2

After long research, I did some workarounds on this and yes it did the job. Here are my findings Magento 1.9 doesn't allow to create a multiple checkbox attribute from the backend. It has some predefined input types but not multiple checkboxes. I created a module for writing an observer for the event "adminhtml_catalog_product_edit_prepare_form" My ...


1

There is no option in magento for change the attribute type from one to another. After create the attribute,you can't edit the attribute type. It will show in disable mode,refer the below screenshot. And also magento don't have an attribute type like "Multiple checkbox". "Multiple Select" attribute type is working like a multiple checkbox. Refer the ...


Top 50 recent answers are included