New answers tagged

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

Check the below code for set tier prices. class Product extends \Magento\Framework\View\Element\Template { protected $_productloader; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Model\ProductFactory $_productloader ) { $this->_productloader = $...


1

In Magento 2.3.x, Magento has introduced the DataPatchInterface to add/modify the data. You can programmatically create/modify the cms page in your custom module using a data patch. <?php namespace My\Module\Setup\Patch\Data; use Magento\Cms\Model\PageFactory; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\Patch\...


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


Top 50 recent answers are included