Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
CMS Magento Mastering Development

My plugin is not working

I need to change the result of getMultilineFieldConfig from Magento\Checkout\Block\Checkout\AttributeMerger. I have a MyVendorName/Checkout module. On etc folder I have di.xml file with: <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <type name=”Magento\Checkout\Block\Checkout\AttributeMerger”> <plugin name=”my_costum_plugin” type=”MyVendorName\Checkout\Plugin\AttributeMergerPlugin” sortOrder=”10″ disabled=”false”/> </type> </config> And at MyVendorName\Checkout\Plugin folder I have AttributeMergerPlugin.php file with: <?php namespace Stockli\Checkout\Plugin; class AttributeMergerPlugin { public function aroundGetMultilineFieldConfig( \Magento\Checkout\Block\Checkout\AttributeMerger $subject, […]

Categories
CMS Development Magento

Display out of stock product only for specific Category in Magento2

I am trying to display out of stock product only for specific category. used below plugin to implement, that is not working. Vendor/Module/etc/di.xml <type name=”Magento\CatalogInventory\Model\Plugin\Layer”> <plugin name=”Vendor_Module_Layer” type=”Vendor\Module\Plugin\CatalogInventoryLayer” sortOrder=”10″ disabled=”false” /> </type> Then Vendor/Module/Plugin/CatalogInventoryLayer.php <?php namespace Vendor\Module\Plugin; class CatalogInventoryLayer{ protected $_logger; public function __construct( \Psr\Log\LoggerInterface $logger ){ $this->_logger = $logger; } public function aroundBeforePrepareProductCollection( \Magento\CatalogInventory\Model\Plugin\Layer […]

Categories
CMS Development Magento

aroundSavePaymentInformationAndPlaceOrder plugin not working in magento 2

etc/di.xml <?xml version=”1.0″ encoding=”UTF-8″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <!– this plugin not working –> <type name=”Magento\Checkout\Model\PaymentInformationManagement”> <plugin name=”save_order_comment_now” type=”Order\Custom\Plugin\PaymentInformationManagementPlugin”/> </type> <!– this plugin is working–> <type name=”Magento\Sales\Api\OrderManagementInterface”> <plugin name=”before_place_order_operation” type=”Order\Custom\Plugin\OrderManagement”/> </type> that not working plugin class <?php namespace Order\Custom\Plugin; class PaymentInformationManagementPlugin { protected $orderRepository; public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository ) { $this->orderRepository = $orderRepository; } public […]