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 | |
| /** | |
| * Set global/skip_process_modules_updates to '1' in app/etc/local.xml and | |
| * then use this script to apply updates and refresh the config cache without | |
| * causing a stampede on the config cache. | |
| * | |
| * @author Colin Mollenhour | |
| */ | |
| umask(0); | |
| ini_set('memory_limit','512M'); |
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
| // This is how you would use it. Pass in your collection | |
| // along with an individual callback as well as a batch callback | |
| Mage::getSingleton('stcore/resource_iterator_batched')->walk( | |
| $collection, | |
| array($this, 'batchIndividual'), | |
| array($this, 'batchAfter'), | |
| self::BATCH_SIZE | |
| ); | |
| public function batchIndividual($model) |
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
| // PLACE THIS HTML where you want the star rating and "Read x Reviews" to show up | |
| // <div id="bvReview" data-productid="3898"></div> | |
| // ..................... Javascript for bazaarvoice reviews and ratings for a single product ................................. | |
| $(document).ready(function() { | |
| // This part just readies the bvReview DIV to be filled with the star rating and a "Read reviews" link | |
| var bvrrDiv = $('#bvReview'); | |
| var productId = bvrrDiv.attr("data-productid"); | |
| bvrrDiv.append("<div id='BVRRInlineRating-" + productId + "'>"); |
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 | |
| /** | |
| * Updated price.phtml without WEEE | |
| * | |
| * NOTICE OF LICENSE | |
| * | |
| * This source file is subject to the MIT License | |
| * It is available through the world-wide-web at this URL: | |
| * http://opensource.org/licenses/mit-license.php | |
| * |
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
| $product = new Varien_Object(); | |
| $product->setId(363004); | |
| $attribute = Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery'); | |
| $media = Mage::getResourceSingleton('catalog/product_attribute_backend_media'); | |
| $gallery = $media->loadGallery($product, new Varien_Object(array('attribute' => $attribute))); |
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 | |
| declare(strict_types = 1); | |
| namespace Training5\VendorRepository\Controller\Test; | |
| use Magento\Catalog\Api\Data\ProductInterface; | |
| use Magento\Catalog\Api\ProductRepositoryInterface; | |
| use Magento\Framework\Api\Filter; | |
| use Magento\Framework\Api\FilterBuilder; |
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
| # Add this to your the Magento .htaccess file located in your docroot | |
| ############################################ | |
| ## Nginx proxy HTTPS Fix for Magento | |
| ## Source: https://www.sonassi.com/blog/magento-kb/magento-https-redirect-loop-2 | |
| SetEnvIf X-Forwarded-Proto https HTTPS=on |
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
| <?xml version="1.0"?> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
| <acl> | |
| <resources> | |
| <resource id="Magento_Backend::admin"> | |
| </resource> | |
| </resources> | |
| </acl> | |
| </config> |
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
| #!/bin/bash | |
| # Sets up a database with a magento2 installation. This assumes you are running from under your httpdocs/<release> location and have www.localhost.com in your /etc/hosts file | |
| # To run type : install_magento2 <dirname> <password> <release> | |
| # password is used for the datbase user and the magento admin password | |
| if [ $# -eq 0 ]; then | |
| echo "No arguments supplied" | |
| echo "Usage: `basename $0` <dirname> <password> <release>" | |
| echo "e.g install_magento2.sh mage2 password 21" | |
| exit 1 |
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 --git a/lib/Unserialize/Parser.php b/lib/Unserialize/Parser.php | |
| index 20a6a3c..88c6555 100644 | |
| --- a/lib/Unserialize/Parser.php | |
| +++ b/lib/Unserialize/Parser.php | |
| @@ -34,6 +34,7 @@ class Unserialize_Parser | |
| const TYPE_DOUBLE = 'd'; | |
| const TYPE_ARRAY = 'a'; | |
| const TYPE_BOOL = 'b'; | |
| + const TYPE_NULL = 'N'; | |
OlderNewer