Please try run a ANALYZE TABLE on all you Magento2 tables
mysqlcheck -a -A
This will force the internal MySQL indexes and innodb stats to be rebuilt for you tables.
This seems to be introduced in a few Magento 2 upgrades which I have performed.
I am using Hackathon EAV cleaner module for remove unused images. After installation you can use the command eav:media:remove-unused
this is a module https://github.com/magento-hackathon/EAVCleaner/tree/magento2
Please try to remove this condition <?= $storeId == 2 ? on the below lines in the same code, like:
<span <?php if ($block->getPriceId()) :?> id="<?= $block->escapeHtmlAttr($block->getPriceId()) ?>"<?php endif;?>
<?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->escapeHtmlAttr($...
Please Try below solution to fix it:
You need to replace the code of vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml with below code:
<?php /** @var $block \Magento\Framework\Pricing\Render\Amount */ ?>
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->...
DON'T store data like that in your store.
Use plugins that already exist that tokenize banking data. This makes it so even if your site is compromised, your user credit card/debit card is not. Most modern payment plugins already do this - Authorize.net / Moneris / etc.
IF you are not afraid of being hacked, I would create a separate Table that stores that ...
Here the solution.
Just run those two sql queries:
update catalog_product_super_attribute set position = 0 where attribute_id = 200;
update catalog_product_super_attribute set position = 1 where attribute_id != 200;
Those will set position = 0 for color attribute in all products and position = 1 for rest of the attributes. This way color will be always first....
A neater solution would be to use:
ALTER IGNORE TABLE catalog_url_rewrite_product_category ADD UNIQUE KEY (url_rewrite_id, category_id, product_id)
This forces MySQL to delete the duplicate entries on the table, after which you can delete the new index if you wish too.
Table 'amasty_conf_group_attr' doesn't exist
This error means you do not have a required table in the database. Looks like an extension was not installed properly.
Your setup is facing an issue with the Amasty extension.
Please first disable and remove code of your Amasty extension which is not properly installed in your setup.
Run below commands.
Can you do the following steps?
Step 1 : If Module install partial or some table missing in the database then do the following.
Remove Module entry from setup_module table.
Step 2 : Execute the setup upgrade below commands for reinstall the module again.
php bin/magento setup:upgrade
Posting the answer here for posterity if somebody stumbles across this as i did:
(magento 2.3.5 solution)
INNER JOIN eav_attribute A ON AI.attribute_id = A.attribute_id
INNER JOIN catalog_product_entity P ON AI.entity_id = P.entity_id
SET AI.value = "2"
P.sku IN ( ... ) AND