Categories
CMS Magento Mastering Development

Magento 2 – Change format of authentication-popup.html

I overridden authentication popup of Magento 2 in my custom theme. I discovered that the file that is called for the popup is with the extension .html (authentication-popup.html). This way I can’t add php code. Can I change the format of “authentication-popup.html” to “authentication-popup.phtml”? How? Thanks

Categories
CMS Magento Mastering Development

C# OAuth 1.0 Call to Magento 2.x fails with “The signature is invalid. Verify and try again.”

When I try to connect into the Magento 2 server with OAuth 1.0, I get an error returned: <?xml version=”1.0″?> <response> <message>The signature is invalid. Verify and try again.</message> </response> When I try to connect to the same URL (https://servername.com/index.php/rest/V1/orders/69963) and OAuth values set in Postman, I get the expected information from the Magento server. […]

Categories
CMS Magento Mastering Development

Magento /pub/static is not writable – Permissions error

So I’m fairly new to Magento, in fact, it’s my first time messing with Linux permissions. I’ve been asked to change a few things on a website, and I can’t even pass through the permissions part. I think that I messed the permissions on the machine that the website is stored on, in fact, I […]

Categories
CMS Magento Mastering Development

How to add typed text in magento 2 using typed.js?

I have tried to add on typed text animation in my Magento 2 cms page. I am using typed.js Does anyone have an idea of how to use typed.js in Magento2?

Categories
CMS Magento Mastering Development

Basic Graphql Query throws error

I’m having a problem with the new 2.3.5 version but only on one of our websites. I’ve been using this query for months and it was working well, but since we updated to 2.3.5, it does not work anymore. The query : { products( filter:{ sku:{ eq:”test_dev_product” } } ) { items{ tier_prices{ qty, value […]

Categories
CMS Magento Mastering Development

How to remake js code on jquery ui widget

I have a simple code that animates the appearance of a mini-cart modal window. <script type=”text/javascript”> require([‘jquery’], function($){ $(document).ready(function(){ $(“[data-block=’minicart’]”).on(“dropdowndialogopen”, (e) => { $(“.block-minicart”).hide(); $(“.block-minicart”).slideDown(100); }); $(“[data-block=’minicart’]”).on(“dropdowndialogclose”, (e) => { $(“.mage-dropdown-dialog”).show(); $(‘.block-minicart’).slideUp(100); }); }); }); </script> I need to redo it in UI widget and call in phtml as <script type=”text/javascript”>code. Tell me please how […]

Categories
CMS Magento Mastering Development

Display my block after product grid in list.phtml

I am overwriting list.phtml via catalog_category_view.xml file now I want to move my custom block after grid, can anyone tell me how can I do it? <referenceBlock name=”category.products.list” template=”Ktpl_QuickShop::product/list.phtml”> <block class=”Magento\Catalog\Block\Product\ListProduct” name=”dummy” /> </referenceBlock> <referenceContainer name=”category.view.container”> <block class=”Ktpl\QuickShop\Block\CustomOptions” name=”custom.category.form” template=”Ktpl_QuickShop::quickshop/quickshop.phtml” after=”category.products.list” /> </referenceContainer> <referenceBlock name=”product.info.main”> <container name=”product.info.water” as=”product.info.water” htmlTag=”div” htmlClass=”product-info-water”> <block template=”Ktpl_QuickShop::quickshop/calculator.phtml” class=”Ktpl\QuickShop\Block\Calculator” name=”ktpl.quickshop.calculator”> <block […]

Categories
CMS Magento Mastering Development

Magento 2: How to sort products by discount

I want to add a new custom option “Discount” inside Sort By dropdown on category page so that I can sort the discounted products from sort by options. Please help, How can I implement this functionality. Any help will be appreciated.

Categories
CMS Magento Mastering Development

How to clone the order grid

I’m trying to make a copy of the order grid. What I did: I created view/adminhtml/layout/ecommerce_grid_index.xml <?xml version=”1.0″?> <page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <update handle=”styles”/> <body> <referenceContainer name=”content”> <uiComponent name=”ecommerce_grid”/> </referenceContainer> </body> </page> created file: view/adminhtml/ui_component/ecommerce_grid.xml <?xml version=”1.0″ encoding=”UTF-8″?> <listing xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <argument name=”data” xsi:type=”array”> <item name=”js_config” xsi:type=”array”> <item name=”provider” xsi:type=”string”>sales_order_grid.sales_order_grid_data_source</item> </item> </argument> <settings> <spinner>sales_order_columns</spinner> <deps> <dep>sales_order_grid.sales_order_grid_data_source</dep> […]

Categories
CMS Magento Mastering Development

How to add upload image in custom payment gateway ( Magento 2.3.5)

I’m very new to Magento. This is what is tried to achieve, an image uploader in custom checkout. But the problem is that I have no idea how to upload the image. The code below is what I had tried. I have no idea how the UploaderFactory model work, I realized $uploader = $this->_fileUploaderFactory->create([‘fileId’ => […]