Jump to content

Uncaught ReferenceError: productAvailableForOrder is not defined


Recommended Posts

Hi there

 

both product.js and var productAvailableForOrder is loaded as they should but when I goto http://amabox.com/home/5041-test-image-attribute.html and change the attribute (which should effect the price, Quantity, etc) it gives me Uncaught ReferenceError: productAvailableForOrder is not defined  in the debugger and no info got updated

 

I hope someone got the answer

 

Best

Ranj

Link to comment
Share on other sites

Can you check that productAvailableForOrder is defined inside product.tpl?

 

var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};

Link to comment
Share on other sites

A possible explanation is that combinationImages[0][0] = ; produces a js error, so the problem with the images can cause the malfunction of almost every js function because the global variables are not loaded

var productPriceWithoutRedution = '30';
var productPrice = '30';
// Customizable field
var img_ps_dir = 'http://amabox.com/img/';
var customizationFields = new Array();
		customizationFields[0] = new Array();
	customizationFields[0][0] = 'img0';
	customizationFields[0][1] = 0;

// Images
var img_prod_dir = 'http://amabox.com/img/p/';
var combinationImages = new Array();

			combinationImages[0] = new Array();
					combinationImages[0][0] = 0;
			
combinationImages[0] = new Array();
			combinationImages[0][0] = ;
			combinationImages[0][1] = ;
			combinationImages[0][2] = ;
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...