New answers tagged

0

Unfortunately there is no simple way to migrate from a custom Magento 1 store to Magento 2. There are a lot of tools available to help you including the official migration pland and tool which you find more information from the official documentation here Migration Plan https://devdocs.magento.com/guides/v2.4/migration/migration-plan.html Migration Tool ...


0

For more advanced features, try using this module https://extmag.com/en/ups-shipping-m2.html. The module contains many settings. The most important thing is that you can configure the module for each recipient country separately. This is especially important now for UK Brexit.


0

May be that extension working. Download the extension from given link. Now unzip the download zip file. Put the \MyCompany\CustomListMode folder into magento on following location : app\code so extension path like this : app\code\MyCompany\CustomListMode Run following command from CLI: php bin/magento cache:clean php bin/magento cache:flush php bin/...


0

You can check data Migration tool from here : https://github.com/magento/data-migration-tool/releases For theme and custom extension : You need to create the those custom extension into magento2 because magneto1 and magento2 are totally different.


0

I updated the revolution slider extension but still facing the same issue. Further as of now to fix the issue I have added the required files within fileUploader directory. Files where canvas-to-blob.min.js, jquery.fileupload-fp.min.js, and load-image.min.js.


0

You need to add images to your associated product based on swatch color. Then it will change images.


0

You can use below code to create store programetically. /** @var \Magento\Store\Model\Store $store */ $store = $this->storeFactory->create(); $store->load('my_custom_store_code'); if(!$store->getId()){ $group = $this->groupFactory->create(); $group->load('My Custom Group Name', 'name'); $store->setCode('...


0

create cms_page_view.xml in your custom extension on following location with this code. Vendor\Extension\view\frontend\layout\cms_page_view.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"&...


0

You can use a layout file named cms_page_view.xml. For example: <?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"> <body> <referenceContainer name="content"> ...


0

This solution was the best for me. Just try to create rule in admin pannel and after that find it in salesrule table. There you can see "conditions_serialized" column and there will be different classes. In my case it was something like this {"type":"Magento\\SalesRule\\Model\\Rule\\Condition\\Combine","attribute":null,...


1

create one block file on your custom extension like this : <?php namespace Vendor\Extension\Block class Customerinfo extends \Magento\Framework\View\Element\Template { protected $_session; public function __construct(\Magento\Customer\Model\Session $session) { ... $this->_session = $session; ... } public function ...


1

Store your SKUs as an array like below. Loop the SKUs $values[] = array("finset"=>array($sku)); Then use the below filter $products->addAttributeToFilter('sku',$values);


0

It sounds like you're missing configuration in the admin panel. Here are the docs. What I most commonly use when setting up SMTP, is my gmail account. It's important to note, though, that the password referenced in the config for the email provider is not your email password. Using gmail as an example, you would need to go to "Manage Your Account" -...


0

This feature isn't implemented by Magento yet. But it can be done with MSI Customer Source Selector extension that does the trick.


0

If there are multiple records, best practise for this situation $rowSet = $this->_getReadAdapter()->fetchAll($select); foreach ($rowSet as $row) { //process row } would be below one since it will fetch the rows one by one and reduce the memory utilization. $query = $this->_getReadAdapter()->query($select); while ($row = $query->fetch()) { //...


0

Since Magento 2.2 ViewModels are the way to go. When use ViewModels you don’t need to extend the block, add constructor with additional dependencies to load parent constructor, etc. You add a ViewModel by adding following layout xml: <referenceBlock name="block.name"> <arguments> <argument name="view_model" xsi:...


0

I was able to increase the file size via cpanel's mulit php editor with my hosting company.


0

I think the best solution for development is: "host": "0.0.0.0" This makes server listening from localhost and remote connections. For example I was trying to develop storefront on remote server and I was not able to reach app through my domain name (for example: "myawesomedomain.com" with "host: "myawesomedomain.com&...


0

I had an issue before using 'type' => 'varchar', instead of 'varchar' use 'text' Something like: $eavSetup->addAttribute( Category::ENTITY, 'svg', [ 'type' => 'text', 'length' => 255, 'label' => 'Category svg', 'input' => 'textarea', 'sort_order' => 100, ...


0

Jake you can close all the tabs by adding below parameters: <div class="product data items" data-mage-init='{"tabs":{"openedState":"active","active":"false","collapsible":"true"}}'>


0

You can also use the actionDisable setting in your custom module, that should disable the option in the dropdown: <massaction name="listing_massaction" component="Magento_Company/js/grid/massactions"> <action name="enable"> <settings> <actionDisable>true</actionDisable> ...


0

Make di.xml in vendor/module/etc add this in your di.xml file <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd"> <extension_attributes for="Magento\Sales\Api\Data\...


0

Declare inside the catalog_product_view.xml of your theme inside Magento_Catalog\layout\catalog_product_view.xml <referenceContainer name="content"> <referenceContainer name="product.info.main"> <block class="Magento\Catalog\Block\Product\View" name="product.info.additional.sku" template="...


1

The page you are looking is cms page with identifier no-route You can edit content form CMS pages. If you want to remove right section, just change page layout from 2 column right bar to 1 column Hope above will help! Update You can update/remove section from app/design/frontend/Package/my-theme/Magento_Theme/layout/cms_index_noroute.xml <?xml version=&...


0

If we need to pass default value, then we need to check whether the default value is compatible with the type of field we are using is default Initializes the column with the specified default value. The default value should have the same datatype defined in xsi:type. so for having any int value as default use it like <column xsi:type="int" name=...


1

You can get it using quote object in JS. See code below. Might have to change a bit according to your requirements. define([ 'jquery', 'uiComponent', 'Magento_Checkout/js/model/quote' ], function ($, Element, quoteData) { 'use strict'; return Element.extend({ getCountryId: function () { if(quoteData.shippingAddress() ...


0

See below patch. https://support.magento.com/hc/en-us/articles/360046750171-Shipping-labels-creation-known-issue-in-Magento-2-4-0 Once you download it, move it to your magento root directory. Then apply patch with below command git apply MC-35514-2.4.0-CE-composer-2.patch


0

To create a file programmatically you can go with below two approaches. Approach - I $myfile = fopen("index.php", "w") or die("Unable to open file!"); $txt = "your content"; fwrite($myfile, $txt); fclose($myfile); Approach - II You can use system command to create file. shell_exec('touch index.php');


0

To add Custom Css class to the existing div element to the magento you need follow the below mentioned procedure. add <referenceContainer name="page.wrapper" htmlClass="page-wrapper example"/> in your custom theme default.xml layout file


0

That's because Magento 2 getChildrenCategories get's a model with limited amount of attributes inside them, only a few like: url_key, name, all_children, is_anchor and position you should be able to get the category child id and load from that your custom attribute, you'll need a custom function that loads a category from ID: getChildren (instead of ...


0

The best way to do this is add your custom css File: If you have already a custom theme (inherited from Luma) i would suggest to place it in the folder "Magento_Theme\web\css\custom.css" and add your css there then you want to include your css in the pages that you want, if you need it in the whole site i suggest to declare it in: "...


0

You might want to build your custom block and remove the 2 basic one's (or rewrite them) my suggestion for what you would like to accomplish is to Remove the category.image page.main.title and add a custom one, just to have a cleaner css and html code. You should be able to accomplish that like this: CSS: .category-image-custom img { display: block; ...


1

Please add your css to vendor/module/frontend/web/css/style.css


0

this work for me! // Vendor/Module/view/adminhtml/ui_component/customer_form.xml ... <insertListing name="..._listing"> <settings> <externalProvider>..._listing...._listing_data_source</externalProvider> <selectionsProvider>..._listing...._listing...._listing_columns.ids</...


0

I've just had this issue and it turned out that it was because the "innodb_buffer_pool_size" mysql size was not big enought (we had too many comples sales_rules).


0

I know this is an old question, but since it doesn't have an accepted answer yet, and I ran into the same thing, I figured I'd share my answer here: @ansar-husain's answer is partially correct. First you need to add your custom attribute to catalog_attributes.xml: YourName/YourModule/etc/catalog_attributes.xml <?xml version="1.0" encoding="...


1

There is a div element with the classes block block-minicart empty ui-dialog-content ui-widget-content that goes over the menu.


0

can you reindex one by one instead of reindexing all at a time php bin/magento indexer:reindex catalog_category_product php bin/magento indexer:reindex catalog_product_category


0

Somehow (from my perspective) Product doesn't match the semantics of most other parts of Magento - maybe there is legacy support in there or something because for product both ResourceModel and Repository both have different saving logic than other models like Block in module-cms. Try the class Magento\Catalog\Model\ResourceModel\Product\Action->...


0

From the system/User Roles , you can add user role with custom resources(like attached screenshot) and allocate that role to particular user.


0

foreach ($collection as $order) { foreach ($order->getAllVisibleItems() as $item) { echo $item->getName(); echo $item->getQtyOrdered(); .............. .............. }


0

I think it is related to SMTP host server


0

Check Product stock(In stock or out of stock) or Check the Category of Product or do reindex


0

Most objects have a ->debug() method, which displays less data than ->getData() This comes in quite handy, when working with n98-magerun2 dev:console $cm = $di->get(Magento\Customer\Model\Customer::class); $cm->load(123); $cm->debug(); # prints the customer's data


0

Hello imtiaz, Login to admin panel Go to Stores > Configuration Under Catalog, select RSS Feed Expand RSS Config and enable RSS. Expand Wishlist and enable RSS Expand Catalog and enable RSS Feed for: New Products – Notify when a new product is added to the catalog. Special Products – Notify for a product with a special price. Coupons/Discounts – ...


0

With the help of @AmitSaini i figured out. I am currently using Magento 2.3.6 How to "add to cart" a product with custom input field and save it to Database? Follow this link and check Renon Stewart answer. If you get in Product View this error: {"message":"Unable to unserialize value. Error: Syntax error"} or if you get the ...


0

For Magento 2.4.x: <?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="catalog.product.related" destination="...


0

this file use vendor/magento/module-catalog/view/frontend/templates/product/view/opengraph/general.phtml <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** @var $block \Magento\Catalog\Block\Product\View */ ?> ...


0

Hi, Try this <div class="field telephone"> <label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label> <div class="control"> <input placeholder="<?php /* @...


0

Hello Ran, You can use a cookie, with no expiry date. This cookie usually gets removed when browser is closed. This should work: <script> window.addEventListener('load', function(e){ if(docuement.cookie.indexOf('banner_removed=1') !== -1) document.getElementById('closeButton').parentNode.style.display = 'none'; }); document.getElementById('...


Top 50 recent answers are included