For use after an upgrade to verify the correct working of Magento
- Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
- Check meta tags in HTML
<?php | |
if($product->getSpecialPrice() && $product->getSpecialPrice() > 0 && $product->getSpecialPrice() < $product->getPrice()) { | |
$specialPriceInclTax = Mage::helper('tax')->getPrice($product, $product->getSpecialPrice(), true); | |
$conditionalSpecialPrice = '<g:sale_price>' . $specialPriceInclTax . '</g:sale_price>' . PHP_EOL; | |
$specialFromDate = $product->getSpecialFromDate(); | |
$specialToDate = $product->getSpecialToDate(); | |
if($specialFromDate && !$specialToDate) { | |
$specialToDate = '2100-01-01'; | |
} | |
if($specialToDate && !$specialFromDate) { |
INSERT INTO catalog_product_website | |
(product_id, website_id) | |
(SELECT catalog_product_entity.entity_id, '1' | |
FROM catalog_product_entity LEFT JOIN catalog_product_website ON catalog_product_entity.entity_id = catalog_product_website.product_id | |
GROUP BY catalog_product_entity.entity_id | |
HAVING COUNT(catalog_product_website.product_id) = 0 | |
ORDER BY sku DESC) |
/* | |
* IMPORTANT: The queries below are written for Magento Community. If you're going to run them on Magento Enterprise (Adobe Commerce), you need | |
* to replace all instances of ".entity_id" with ".row_id". See this for context: http://magento.stackexchange.com/questions/139740/magento-2-schema-changes-for-ee-catalog-staging | |
* | |
* When importing products in Magento 2, if you specify store view codes in the store_view_code column, product data will be set at | |
* both the global scope as well as the specific store view scope. This is not ideal because now you have duplicate | |
* data at two different scopes that shouldn't actually be duplicated. The scripts below clean up this data by finding | |
* data set at specific store view scopes and if it's an exact match to the data set at the global store view, then it | |
* deletes the data set at the specific store view scope. | |
* |
# ~/nginx/server.security-txt | |
# Make Magento 2.4.x's security.txt available to the world | |
rewrite ^/.well-known/security.txt$ /securitytxt/index/securitytxt last; | |
rewrite ^/security.txt$ /securitytxt/index/securitytxt last; |
SELECT COUNT(*) FROM email_template WHERE template_text LIKE '%order=%'; | |
SELECT COUNT(*) FROM email_template WHERE template_text LIKE '%invoice=%'; | |
SELECT COUNT(*) FROM email_template WHERE template_text LIKE '%sales_email_order_items%' AND template_text NOT LIKE '%area="frontend"%'; | |
SELECT COUNT(*) FROM email_template WHERE template_text LIKE '%sales_email_order_invoice_items%' AND template_text NOT LIKE '%area="frontend"%'; | |
UPDATE email_template SET template_text = REPLACE(template_text, "order=$order", "order_id=$order_id") WHERE template_text LIKE '%order=%'; | |
UPDATE email_template SET template_text = REPLACE(template_text, "invoice=$invoice", "invoice_id=$invoice_id") WHERE template_text LIKE '%invoice=%'; | |
UPDATE email_template SET template_text = REPLACE(template_text, 'handle="sales_email_order_items"', 'area="frontend" handle="sales_email_order_items"') WHERE template_text LIKE '%sales_email_order_items%' AND template_text NOT LIKE '%area="frontend"%'; | |
UPDATE email_template SET template_text = REPLACE |
<?php | |
$tables = shell_exec('magerun2 db:query "SHOW TABLES"'); | |
$tables = array_filter(explode(PHP_EOL, $tables), function ($table) { | |
if (empty($table)) return false; | |
if (substr($table, -3) === '_cl') return false; | |
if (substr($table, -8) === '_replica') return false; | |
if (stripos($table, '_flat_') !== false) return false; | |
if (stripos($table, '_fulltext_') !== false) return false; | |
if (stripos($table, 'sequence_') !== false) return false; | |
return true; |
{ | |
"id": "6b940a31-113d-109f-f36a-75c1604ef7d4", | |
"name": "ExampleShop", | |
"description": "", | |
"order": [ | |
"2658e264-981e-4786-7f05-88f3fce0f4e6", | |
"8c81cf7c-e188-b8bd-0970-a96aa3a8d6a3", | |
"a1e3c72f-6fde-d46b-7896-e1627f7e5f64", | |
"c050284d-14bd-bdd6-256e-30111f354ef6", | |
"3b0ac9f0-3544-4797-fd4f-56b436ecd029", |
// ==UserScript== | |
// @name Fitchef to MyFitnessPal | |
// @version 0.1 | |
// @description Voeg link toe aaan Fitchef.nl om een recept aan MyFitnessPal toe te voegen | |
// @author Peter Jaap Blaakmeer | |
// @match https://fitchef.nl/weekschema/*/* | |
// @grant GM_addStyle | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
DELETE FROM core_config_data WHERE config_id IN (SELECT config_id | |
FROM (SELECT DUPS.* | |
FROM core_config_data ORIG | |
LEFT JOIN core_config_data DUPS | |
ON ORIG.path = DUPS.path AND (ORIG.value = DUPS.value OR (ORIG.value IS NULL AND DUPS.value IS NULL)) | |
AND DUPS.scope != "default" AND DUPS.scope_id != 0 | |
WHERE ORIG.scope = "default" | |
AND ORIG.scope_id = 0 | |
AND DUPS.path IS NOT NULL) as tmp) |