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 | |
$country_name=Mage::app()->getLocale()->getCountryTranslation($country_code); | |
?> |
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
<script type="text/javascript"> | |
(function($) { | |
$.fn.countTo = function(options) { | |
// merge the default plugin settings with the custom options | |
options = $.extend({}, $.fn.countTo.defaults, options || {}); | |
// how many times to update the value, and how much to increment the value on each update | |
var loops = Math.ceil(options.speed / options.refreshInterval), | |
increment = (options.to - options.from) / loops; |
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 | |
public function url_get_contents ($url) { | |
if (!function_exists('curl_init')){ | |
die('CURL is not installed!'); | |
} | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$output = curl_exec($ch); |
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
# This configuration is what is provided by PageCache by Varnish for Magento module: | |
# http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html | |
# default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "80"; | |
} | |
# admin backend with longer timeout values. Set this to the same IP & port as your default server. |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/afl-3.0.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
<?php | |
// Clear Magento cart and quote items | |
$cart = Mage::getModel('checkout/cart'); | |
$cart->truncate()->save(); // remove all active items in cart page | |
$cart->init(); | |
$session= Mage::getSingleton('checkout/session'); | |
$quote = $session->getQuote(); | |
$cart = Mage::getModel('checkout/cart'); |
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
/** | |
* Convert an image | |
* to a base64 string | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat=image/png] | |
*/ | |
function convertImgToBase64(url, callback, outputFormat){ | |
var canvas = document.createElement('CANVAS'), | |
ctx = canvas.getContext('2d'), |
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
array(50) { | |
["product_id"]=> | |
string(3) "184" | |
["description"]=> | |
string(454) "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam bibendum nunc dictum, elementum tortor at, aliquet odio. Suspendisse accumsan semper leo non ornare. Quisque lacinia quis orci id ultricies. Praesent interdum urna vitae tempus vulputate. In vel lobortis mauris. Cras diam mi, scelerisque quis interdum eu, congue in elit. Mauris tincidunt convallis nulla, quis mollis nisi luctus nec. Donec risus enim, congue ac sodales et, aliquam eget justo" | |
["image"]=> | |
string(134) "http://progress.devshopgo.me/media/catalog/product/cache/4/image/265x/9df78eab33525d08d6e5fb8d27136e95/s/h/shutterstock_96360692_1.jpg" | |
["internal"]=> | |
array(1) { | |
["currency"]=> |
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
function countProperties(obj) { | |
var prop; | |
var propCount = 0; | |
for (prop in obj) { | |
propCount++; | |
} | |
return propCount; | |
} |
OlderNewer