Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

... I think, I found the bug. Magento removed sliding to first image in swatch-render.js: updateBaseImage: function (images, context, isInProductView) { var justAnImage = images[0], initialImages = this.options.mediaGalleryInitial, imagesToUpdate, gallery = context.find(this.options.mediaGallerySelector).data('...


0

Thank you for the M2DeletedProductImage solution, it worked perfectly for me. Found 354495 files 23,698.23 MB However this tool did not fix another issue I was looking the solution for. I have some entries in DB tables: catalog_product_entity_media_gallery catalog_product_entity_media_gallery_value catalog_product_entity_media_gallery-...


0

We are facing the same issue as well and it still needs to be debugged in detail. But we are using below as the temporary fix Modify 'aroundDispatch' method of file vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php like below public function aroundDispatch( \Magento\Framework\App\FrontControllerInterface $subject, ...


0

There isn't a single answer to this question. Take a look at this git issue. Makes for an interesting read. I'm sure there are other git issues. But I found this one. https://github.com/magento/magento2/issues/20974 Other than that how to improve scores there are suggestions on here https://magento.stackexchange.com/a/273133/70343 More for improving ...


0

Not a great answer this but I've got my magento 2 hat on and I'm thinking when they wrote these questions they were sifting through the developer docs. I think they mean declarative notation and imperative notation https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js_init.html But it's an absolute guess. As to suited to which task. I'...


0

Have you written any custom javascript? As the answer answer states you have an issue with jqueryui. Although to explain further you shouldn't need to include jquery or jquery ui. Just use requirejs to load it for you. For example define([ 'jquery', 'jquery/ui', 'mage/accordion' ], function($) { $.widget('vendor.customAccordion', $.mage....


0

You may try to use plug in for Magento\Catalog\Helper\Product\View as describe below to override Product View Page SEO title. I assume you are using a custom module named "Company_MyModule". step 1: Create di.xml under YOUR-MAGENTO-ROOT/app/code/Company/MyModule/etc/frontend/ File : YOUR-MAGENTO-ROOT/app/code/Company/MyModule/etc/frontend/di.xml <?...


0

The solution is quite simple. In Collection.php: protected function _construct() { $this->_init(MyClass::class, MyClassResourceModel::class); $this->_map['fields']['precision'] = 'main_table.`precision`'; // any of these strings will do the same //$this->addFilterToMap('precision', 'main_table.`precision`'); //$this->...


0

Found it. Example: Change the layout of Advanced Search page from default “1-column” to “2-column with left bar”. To do this, extend catalogsearch_advanced_index.xml in your theme by adding the following layout: <page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...


0

If you follow Abhishek Panchal answer above even-then your custom attribute value noe displaying on category pages the confirm you had not enabled this attribute for catalog pages: edit the attribute select: storefront properties -> Used in Product Listing -> yes


1

One should use dependency injection and refrain from using objectManager directly. First inject customer collection factory to constructor : public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerFactory ){ $this->customerFactory = $...


0

you can use Stripe official Magento 2 extension: Stripe Payments https://marketplace.magento.com/stripeofficial-stripe-payments.html install Magento 2 extension as root: cd /home/magento/shop/ su $(stat -c '%U' index.php) -s /bin/bash composer require stripe/stripe-php composer require stripeofficial/stripe-payments


0

This is Magento's default functionality, when a product is added to cart it it removed from the wishlist. You can this functionality in observer vendor/magento/module-wishlist/Observer/AddToCart.php which is triggered by checkout_cart_add_product_complete event in vendor/magento/module-checkout/Controller/Cart/Add.php controller. To stop products removal ...


0

I m also facing the same issue, I was export and check csv columns and compare and update header column than import, it was worked for me.


0

Run This Command and Try :- sudo rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs pub/static/deployed_version.txt var/cache var/page_cache var/generation var/view_preprocessed var/session generated/code var/di sudo php bin/magento setup:upgrade sudo php bin/magento setup:static-content:deploy -f sudo php bin/magento cache:flush ...


0

Not sure about downloading in the localhost, but I found this video a useful tutorial for integrating Stripe https://www.youtube.com/watch?v=eoUBLxKa0pQ


0

Or you can try this also,for single record, X is your product_id you have to replace it by your own product id. SELECT DISTINCT value FROM catalog_product_entity_varchar WHERE entity_id=X AND (attribute_id IN(SELECT attribute_id FROM eav_attribute WHERE attribute_code = "name" AND entity_type_id = 4))


0

You would have to write a bespoke console script and time it to run on cron schedule. Inside the console script you would build a product collection based on the required criteria to select the required product(s). Then update status. This should get you started with a console script https://magento.stackexchange.com/a/220791/70343 This should get you ...


0

Similar answer to one posted already except a bit easier/clearer ps -aux | grep 'php bin/magento' kill -9 [PID] Alternatively if you still had the console window open you can use [ctrl] + [c]


0

I can't seem to find that particular string within the magento codebase. Which means there is a good chance that an extension is throwing that error. Are you using a shipping extension? If so I think it's that. In which case check the configs to make sure there isn't a coupon based restriction. Beyond that you might need to raise with extension ...


0

I think you are trying to create a custom address attribute. Is that right? Is this the same problem you were having before? Can't create custom attribute for order_address The setup file in my extension creates the custom address attribute https://github.com/DominicWatts/Magento-2-Custom-Address/blob/master/app/code/Xigen/Address/Setup/InstallData....


0

as experience shows, you just make sure your env.php file is writeable. restore or create new password for database user, from phpmyadmin or mysql shell, for example it will look like this: mysql$> select user,host from mysql.user; +-----------------+-----------+ | user | host | +-----------------+-----------+ | magento | ...


0

If you open following class vendor/magento/module-checkout/view/frontend/web/js/view/shipping.js defaults: { template: 'Magento_Checkout/shipping', shippingFormTemplate: 'Magento_Checkout/shipping-address/form', shippingMethodListTemplate: 'Magento_Checkout/shipping-address/shipping-method-list', shippingMethodItemTemplate: '...


0

Try this code to add additonalclasses for tab in form ui component. More information in details, Visit, How to additonalClasses for Tab in Magento 2 UI component form <fieldset name="address" sortOrder="30"> <settings> <additionalClasses> <class name="custom-address">true</class> </...


0

You need to find out about your hosting. If working on host might be worth reaching out to host to see if they have a restore procedure in place. The fact that you know what file and when you deleted it is helpful.


0

I found that I can create a tracking element with Magento\Sales\Model\Order\Shipment\TrackFactory like this: $track = $this->trackFactory->create(); $track->setCarrierCode("canadapost"); $track->setTitle("Poste Canada"); $track->setDescription("Poste Canada"); $track->setTrackNumber("test-tracking-number-1234"); and pass it to the array.


0

You got a couple of options. Admin Panel > Content > Configuration > HTML Head Have you tried these?


0

Vue js is a library/framework which needs to be included. So include it and start writing some code in VueJS format. This answer is a good summary. https://magento.stackexchange.com/a/256234/70343 That's to use it. It will not convert Magento 2.


0

The error is thrown in vendor/magento/module-config/Model/Config/PathValidator.php on line 44: if (!array_key_exists($path, $allPaths)) { throw new ValidatorException(__('The "%1" path does not exist', $path)); } I'm not sure about the cause of this bug, but you can comment the exception out, then the config:set command will work as ...


1

Depends on the attribute type. For example if it's a dropdown you will get the ID. Take a look at this for example https://stackoverflow.com/questions/51378438/get-dropdown-attribute-text-magento-2 Try this: $shape = $_product->getAttributeText('shape');


0

HERE IS THE STEP BY STEP GUIDE TO UNINSTALL ANY THIRD PARTY MODULE FROM MAGENTO 2 MANUALLY. Step 1: Remove the module Vendor_% from app\etc\config.php Step 2: Drop module tables or columns from database, please check app\code\Vendor\Module\Setup folder for more information Step 3: Remove the folder app\code\vendor/% Step 4: Remove module configuration ...


0

I edited the layout file: <referenceContainer name="header-wrapper"> <block class="Magento\Framework\View\Element\Template" name="icon_account" as="icon_account" template="Magento_Customer::/icon/icon.phtml"/> <block class="Magento\Framework\View\Element\Template" name="links-menu" as="links-menu" template="...


0

Kindly install PHP ssh2 extension and then use the following code. If you get not connected double check your IP is whitelisted or not $strServer = '*******'; $strServerPort = '*******'; $strServerUsername = '*******'; $strServerPassword = '*******'; //connect to server $resConnection = ssh2_connect($strServer, $strServerPort); if(ssh2_auth_password($...


0

Some Images could not be resized. See log file for details Example: 5781-R101.png do not work ABCDEFG.jpg work 08985-AA01.jpg do not work ABCDEFH.jpg work I did not change much on picture only name changes


2

I take this in my understanding, EAV : First of all and EAV - Entity Attribute Value According to magento, you would assume like below image In real time you would assume like this entity and its attributes, values will be stored in separate table in an organised way. So this way of organising data is called EAV structure in Magento 2. Dependency ...


0

Try using following example: <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <fieldset name="websites" sortOrder="30"> <argument name="data" xsi:type="array"> <item name=...


0

As i was somewhere else maybe mentally :P... Their were too many typo in my code: In /EC/Downloads/view/adminhtml/requirejs-config.js. var config = { map: { '*': { dataTables: 'EC_Downloads/js/datatables.min' } } }; In /EC/Downloads/view/adminhtml/layout/downloads_index_reports.xml <page xmlns:xsi="http://www.w3.org/2001/...


0

I got the same issue some days ago. Please follow below steps. Go to php settings Select your domain Go to Common Settings Search for include_path Change its value to .(dot) Hope above will help!


0

Step 1 : Before commit create tag git tag 0.2.1 Step 2: Add and commit and push you're changes git add . git commit -m "message" git push branch Step 3: Push your tag also git push origin <tag> Step 4 : Create account in https://packagist.org/ Step 5 : Get the packagist token from profile section ...


0

Please make a cart price rule from Admin > Marketing > Cart Price Rules, set condition and action as shown in following screenshots: After creating rule, please add new schedule for it. I hope this may helpful to you!!


0

Okay this was very stupid but I forgot to add the following file under (Module\etc\adminhtml\routes.xml) when I added this the uploadField worked. This fixed the issue for me. <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/...


0

In my opinion, there can be 2 ways to fulfill your requirements: Way #1: Install a third party extension (like mageplaza social login or scommerce social login as already mentioned above) Analyse the table structure of Inchoo Social Login extension for Magento 1 and the one you install for Magento 2 Export the data from Magento 1 database, convert it in ...


0

$product->getTypeInstance()->getConfigurableAttributes($product); You might want to add some checks, in case the product you are supplying isn't configurable. \Magento\ConfigurableProduct\Model\Product\Type\Configurable::getConfigurableAttributes is only available there.


0

In your footer.phtml above with your jquery, just add this: <body style="cursor: pointer;" onclick=""> </body>


0

The following Magento 2 Social login module will allow help you login to Facebook and Google-: https://www.scommerce-mage.com/magento-2-social-login.html Hope it helps.


0

You can add the other attribute filter. I just check multiple category filter. It is working, I just Created object again after loading model collection. $productcollection = $obj->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory')->create(); $cat_ids = [179,109]; $categoryProducts = $productcollection->addAttributeToSelect('*...


1

Reference Link updateAttributes of class \Magento\Catalog\Model\ResourceModel\Product\Action. Method can update multiple products and attribute values, but if you want to update just one product with one attribute value you can do it like this: $this->action->updateAttributes([$product->getId()], ['attribute_code' => $newValue], $storeId);


0

In ui_component It's just a demo <fieldset name="design"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="visible" xsi:type="boolean">false</item> </item> </argument> </fieldset> in your code what you need ...


0

In Tab File You Can Set Tab Visibility Like This :- public function canShowTab() { return false; } public function isHidden() { return true; }


1

I have faced same issue and fixed to update file Magento\CatalogUrlRewrite\Observer\CategoryProcessUrlRewriteSavingObserver.php and \Magento\CatalogUrlRewrite\Observer\UrlRewriteHandler.php and working fine. I have override with custom module and updated fixed code. File path: magento/app/code/Vendor/CategorySave/registration.php <?php \Magento\...


Top 50 recent answers are included