New answers tagged

2

You can display a discount price in minicart by setting customer group price from admin. Catalog -> Products -> Select and edit your product Click on Advanced Pricing and set customer group price as attached image. It will display the discount price of products in minicart. Hope it will help you!


0

In Catalog > Products, edit a product and click on advanced pricing. From there, you can enter the discounted price in special price, and click save, and your original price and discounted price will show. If you want to add any slashes or make it look different you will have to style with your css or less.


0

You may also use Magento\Catalog\Api\ProductAttributeRepositoryInterface to determine the product attribute try { $this->attributeRepository->get('custom_attribute'); } catch (NoSuchEntityException $e) { //To-do create attribute } This is verified on 2.3.2


1

Custom attributes values in magento 2 can be set and retrieved by Getting Value getCustomAttribute('myattribute')->getValue() / getMyattribute() Setting Value setCustomAttribute('myattribute', $value); / setMyattribute($value)


1

Check this link i hope your issue is solve. check below link https://www.rakeshjesadiya.com/send-mail-from-custom-module-magento-2/ Any query let me know THANKS.


0

If your resource name is Tyres_Faq::tyres_faq_configuration then you need to check same in your _isAllowed() method protected function _isAllowed() { return $this->_authorization->isAllowed('Tyres_Faq::tyres_faq_configuration'); } I also recommend to set id and resource attributes in menu.xml with same values Tyres_Faq::tyres_faq_configuration


1

First open attribute on admin Store -> Attributes -> Products Then open your desired attribute is-buynowbutton-show, open tab Storefront Properties In this tab you will find option "Used in Product Listing" make sure it is set to Yes Now in your list phtml file you can use attribute like this $_product->getData("is-buynowbutton-show&...


0

In product list page you will get the foreach loop with product colection. Each product of this loop is product object as $_product. The you will get this value of this product custom attribute as $_product->getData('is-buynowbutton-show')


2

Let's say that your class for which you want the factory is this Vendor\Module\Model\MyClass. now you can create the class Vendor\Module\Model\MyClassFactory in the same folder as your initial class. namespace Vendor\Module\Model; class MyClassFactory implements MyInterface { ..... public function create() { ...... } } class ...


0

Can try full of code and add this code in your controller <?php namespace MS\Recommendeditems\Controller\Index; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\Framework\Data\Form\FormKey; use Magento\Checkout\Model\Cart; use Magento\Catalog\Model\Product; class Index extends Action {     protected $formKey; ...


0

I would suggest First check check var/log file for errors. So you will get idea what is wrong with your current code If still unable to solve then try below code :- protected $formKey; protected $cart; protected $product; public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Framework\Data\Form\FormKey $formKey, \Magento\...


0

In your Magento product root run the following command. php bin/magento setup:config:set --backend-frontname="admin_path" Where admin_path is the path you want to use (e.g admin_123ab)


0

This extension is very helpful and saves your time. https://marketplace.magento.com/encoresky-customoptionimage.html


Top 50 recent answers are included