magento2

Magento 2 — debug.log — main.DEBUG: Request validation failed for action “Vendor\Module\Controller\Index\Post\Interceptor”

时间秒杀一切 提交于 2020-01-06 05:47:08
问题 I'm implementing a Custom Module that essentially has the same functionality as the default Magento 2 Contact Form. I'm receiving a very irritating error I can't seem to find a solution to. It seems my POST request is failing Magento's request validation, but I'm not sure how to find any more specific information. I've attempted to implement a "CSRFSkip" plugin that bypasses the Magento CSRF validation. I've tried changing what my controller extends and implements. I've searched the logs

Magento 2 - Links in Admin wont work

笑着哭i 提交于 2020-01-05 03:32:09
问题 I try to install a new magento 2. If I login in the admin all the menus and links won't work (also the logout, too). What I do wrong - I read something about that problem and I've try to change the di.xml but that wont change anything. at the console I see a lot of errors for example ""NetworkError: 403 Forbidden - http://presentim.de/pub/static/version1481817482/adminhtml/Magento/backend/en_US/fonts/opensans/regular/opensans-400.woff"" But in the pub/statis folder is no folder "version148...

on Change event in select with knockout

岁酱吖の 提交于 2020-01-03 11:03:07
问题 I have a problem how to call onchanges knock js to my select option, i already have a function and html, but when i choose the select option, nothing changes <select data-bind="event:{change:setSelectedStation() }, options: seedData, optionsText: 'text', optionsValue: 'value'"> </select> here is my function setSelectedStation: function(element, KioskId){ this.getPopUp().closeModal(); $('.selected-station').html(element); $('[name="popstation_detail"]').val(element); $('[name="popstation

Not able to place the order using paypal in magento 2 rest

▼魔方 西西 提交于 2019-12-29 08:57:11
问题 I am developing an e-commerce mobiloe application using magento 2 rest apis only.This is the flow for making the REST API calls for order placement. 1.Create a cart api --> {{url}}/index.php/rest/V1/carts/mine This api will return a unique cart id 2.Add products to cart api --> {{url}}/index.php/rest/V1/carts/mine/items body -> { "cart_item": { "quote_id": cartId, "sku": skuName, "qty": 1 } } 3. Estimate Shipping Methods url --> {{url}}/index.php/rest/V1/carts/mine/estimate-shipping-methods

Magento 2 insert data into database

不羁岁月 提交于 2019-12-25 06:46:56
问题 I recently created a module in Magento 2. Now I get the data from the database in front-end phtml file.The code is given below. try { $question = $this->_objectManager->create('Magecomp\Firstmodule\Model\Firstmodule'); $question->setTitle('SimpleQuestion'); $question->save(); } catch(Exception $e) { echo $e->getMessage(); } But I get following Error : Notice: Undefined property: Magecomp\FirstModule\Block\FirstModule::$_objectManager in C:\xampp\htdocs\magento2\lib\internal\Magento\Framework

Magento - PayPal Plus and Zero Subtotal Checkout

左心房为你撑大大i 提交于 2019-12-24 20:12:21
问题 I'm having problems with Zero Subtotal checkout and Paypal Plus. I have some products with Zero cost, and when I try to buy it the button "Place Order" is disabled. But when I disable Paypal Plus, it works normally. I'm using Magento 2.1.5 and this module: https://github.com/i-ways/magento2-paypal-plus Someone already suffered with this issue? 回答1: Amount is always requested to more than zero. You can set 0.01 (or the equivalent minimum amount for other currency) if you want to show your

Enable payment gateway for Particular products - Magento 2

落花浮王杯 提交于 2019-12-24 19:19:55
问题 I want to enable the payment gateway for some products Only. On my website, I have cash on delivery & other payment gateways. Cash on delivery should be enabled for every product. But other payment methods are enabled for particular product set or particular category. How we can do this? Please help on the following . 1) Payment gateway enable for only particular products or category 2) Payment gateway enable for only particular countries 回答1: To add a new payment method, take the following

Why is my Magento2 di.xml not having any effect?

筅森魡賤 提交于 2019-12-24 15:56:45
问题 I've overridden \Magento\Checkout\Block\Cart\Item\Renderer and when I add this to the end of config in /app/etc/di.xml the override works. <preference for="Magento\Checkout\Block\Cart\Item\Renderer" type="Tls\Module\Block\Cart\Item\Renderer" /> However, when I try to use /app/code/Tls/Module/etc/di.xml there is no effect. This is the contents of my di.xml (though I've tried many things) <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

Is it possible to fire multiple ajax requests asynchronously in Magento 2 backend?

久未见 提交于 2019-12-24 10:59:55
问题 What the title says. Im trying to run an import script with AJAX "call 1" and I want to keep track of the import (for feedback purposes) with AJAX "call 2". To give the end user live feedback these calls need to run simultaneously and "call 2" needs to call itself (recursive) to poll for changes. I have the Controllers and the calls and everything works just fine, just not at the SAME time. Is it a soft lock on the database or is it something else? Btw I am aware of the "async: true" setting

magento 2 empty attribute hide in product details page

喜欢而已 提交于 2019-12-24 07:11:13
问题 Magento 2 experts, Can you please help me, to hide empty/NA attribute in magento 2 products details page ? Thanks a lot 回答1: Well, This is magento core issue: https://github.com/magento/magento2/issues/9961 , But you can use following solution for now. Get to attributes.phtml file from :/vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtml Copy this file and paste in your theme : /app/design/frontend/[YOUR PACKAGE]/[YOUR THEME]/template/catalog/product/view