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
define(function(){ | |
/** Almond JS:START */ | |
var requirejs,require,define;(function(e){function c(e,t){return f.call(e,t)}function h(e,t){var n,r,i,s,o,a,f,l,c,h,p=t&&t.split("/"),d=u.map,v=d&&d["*"]||{};if(e&&e.charAt(0)==="."){if(t){p=p.slice(0,p.length-1);e=p.concat(e.split("/"));for(l=0;l<e.length;l+=1){h=e[l];if(h==="."){e.splice(l,1);l-=1}else if(h===".."){if(l===1&&(e[2]===".."||e[0]==="..")){break}else if(l>0){e.splice(l-1,2);l-=2}}}e=e.join("/")}else if(e.indexOf("./")===0){e=e.substring(2)}}if((p||v)&&d){n=e.split("/");for(l=n.length;l>0;l-=1){r=n.slice(0,l).join("/");if(p){for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i;o=l;break}}}}if(s){break}if(!a&&v&&v[r]){a=v[r];f=l}}if(!s&&a){s=a;o=f}if(s){n.splice(0,o,s);e=n.join("/")}}return e}function p(t,r){return function(){return n.apply(e,l.call(arguments,0).concat([t,r]))}}function d(e){return function(t){return h(t,e)}}function v(e){return function(t){s[e]=t}}function m(n){if(c(o,n)){var r=o[n];delete o[n];a[n]=true;t |
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
# Extend Mage_Catalog_Block_Product_View and override getJsonConfig as | |
public function getJsonConfig($_product = null, $configurable_id = null) | |
{ | |
$_product = $_product? Mage::getModel('catalog/product')->load($_product->getId()) : $this->getProduct(); | |
$config = array(); | |
if (!$this->hasOptions()) { | |
return Mage::helper('core')->jsonEncode($config); | |
} |