This file contains 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
location / { | |
index index.php index.html index.htm; | |
try_files $uri index.php$uri; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /opt/local/share/nginx/html; | |
} |
This file contains 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 | |
class Controller_Ajax extends Controller { | |
public function before() | |
{ | |
if (!$this->request->is_ajax()) | |
{ | |
$this->request->redirect(); | |
} |
This file contains 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 | |
// If you have hidden products never do collection | |
// saving, without adding visibility attribute to select | |
$products = Mage::getModel('catalog/product') | |
->getCollection() | |
// Important or visibility will be reset to default value (Visible in Catalog and Search) | |
->addAttributeToSelect(array('visibility', 'name')); | |
foreach ($products as $product) { |
This file contains 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 | |
class WhatEver | |
{ | |
/** | |
* Adds a product to existing order | |
* | |
* @param string $orderIncrementId Order increment id | |
* @param string $itemSku Product SKU |
This file contains 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
curl -o index.php.orig https://raw.github.com/speedupmate/Magento-CE-Mirror/magento-ce-1.7.0.2/index.php && diff index.php.orig index.php && rm -f index.php.orig | |
Example output: | |
Alexs-MacBook-Pro:MageHackDay Alex$ curl -o index.php.orig https://raw.github.com/speedupmate/Magento-CE-Mirror/magento-ce-1.7.0.2/index.php && diff index.php.orig index.php && rm -f index.php.orig | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 2642 100 2642 0 0 3755 0 --:--:-- --:--:-- --:--:-- 3758 | |
34c34 | |
< exit; |
This file contains 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
Validation.add('no-po-box', 'The shipping address must be a physical address. PO Boxes are allowed for billing only.', function(v) { | |
return /^box.*|^po.*box.*|^p\.o\..*box.*/i.test(v) === false; | |
}); |
This file contains 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
SELECT DISTINCT b.value, a.sku, c.position, c.disabled | |
FROM `catalog_product_entity` AS a | |
LEFT JOIN `catalog_product_entity_media_gallery` AS b ON a.entity_id = b.entity_id | |
INNER JOIN `catalog_product_entity_media_gallery_value` AS c ON c.value_id = b.value_id | |
ORDER BY a.sku, c.position |
This file contains 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 | |
/** | |
* This script is used to clean up unassigned simple products | |
* | |
* @author Alexander Turiak <[email protected]> | |
* @copyright Copyright (c) 2014 HexBrain (http://www.hexbrain.com) | |
*/ | |
require_once 'abstract.php'; |
This file contains 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
### USAGE | |
### | |
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0 | |
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch | |
### ElasticSearch version |
This file contains 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
name: Coding Standards | |
on: | |
pull_request: | |
paths: | |
- "**.php" | |
- "**.phtml" | |
jobs: | |
phpcs: |
OlderNewer