This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step-by-step guide | |
| Create the files | |
| Namespace/Module/view/frontend/web/hello.js | |
| Namespace/Module/view/frontend/web/test.js | |
| In the Layout | |
| NOTE - notice how the filename is the layout handle we want to use. | |
| Namespace/Module/view/frontend/view/layout/default_head_blocks.xml | |
| <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * add to cart from url, useful for email promos | |
| * based on http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/adding_a_product_to_the_cart_via_querystring | |
| * which no longer works because of session validation of form_key | |
| * usage: link to add.php?product=[id]&qty=[qty] | |
| */ | |
| require 'app/Mage.php'; | |
| Mage::app(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Export database in gzip form | |
| mysqldump -u user -p database | gzip > database.sql.gz | |
| // Import database from gzip form | |
| gunzip < database.sql.gz | mysql -u user -p database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php | |
| --- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100 | |
| +++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100 | |
| @@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url | |
| $this->_rewrite = $rewrite; | |
| return $requestPath; | |
| } | |
| + | |
| + // avoid unnecessary creation of new url_keys for duplicate url keys | |
| + $noSuffixPath = substr($requestPath, 0, -(strlen($suffix))); |