I want to change the shipping method programmatically from admin when this button is clicked: Here is my controller for this button: class Start extends MagentoSalesControllerAdminhtmlOrder { /** * View page action * * @return MagentoFrameworkControllerResultInterface */ public function execute() { $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $order_id = $this->getRequest()->getParam('order_id'); $order = $objectManager->create('MagentoSalesModelOrder')->load($order_id); […]
Magento2
Does anyone know how to restrict past day selection in magento 2 date picker using JS mixing. This is the frontend HTML Block That We Copied from the browser. <input class="input-text _has-datepicker" type="text" data-bind=" hasFocus: focused, datepicker: { storage: value, options: options }, attr: { id: uid, value: value, name: […]
Designing the webpage can be done in the app/design directory in Magento 2 – these are theme related files. I’ve got a question about how to deal with the scenario when additional data needs to be displayed in the template? I can’t paste the ViewModel to the app/design directory; instead […]
Products, that are disabled in our backend, are still shown in the frontend. Even after changing the visibility to “not visible individually” or just “catalog”, they still appear through the search function in our shop. We already tried clearing the cache and reindexing. Is there another option? The products were […]
I’m trying to override the default Magento logo product placeholder images within my theme, however, the results are inconsistent. I added 4 image files in the following location app/design/frontend/[VENDOR]/[THEME]/Magento_Catalog/web/images/product/placeholder/ image.jpg small_image.jpg swatch_image.jpg thumbnail.jpg Then I ran the following just to be safe and nuke all the things… $ rm -rf […]
I as well am getting this error in postman. { "message": "The consumer isn't authorized to access %resources." } for this api: rest/all/V1/salesorders/update In the Web API Security I have the dropdown set to “No” for allow anonymous guest access but when i turn it to yes it hits it’s endpoint. This issue only started happening after […]
I have a problem with product prices, the prices in the backend are right and on the home page and search list as well. But in the product page they turn to be zero after a second of the page load Also when I add a product to the cart […]
I am new in magento 2 I am trying to import product data programmatically using csv file. The Error is shown below My Folder and code structure are following. This is My registration file. Vendor/Modulename/regis.xml use MagentoFrameworkComponentComponentRegistrar; ComponentRegistrar::register(ComponentRegistrar::MODULE, 'vendorName_moduleName', __DIR__); This is my module.xml file Vendor/Modulename/etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" […]
I need to add a custom variable based on payment method to credit memo email. I captured the event email_creditmemo_set_template_vars_before in my custom module, Which was dispatched on MagentoSalesModelOrderCreditmemoSenderEmailSender.php. I need to add my custom variable showrefund to bellow set. $transport = [ 'order' => $order, 'creditmemo' => $creditmemo, 'comment' […]