Jump to content

"Product is not available in this combination" in product without combination ( ಠ_ಠ)


hakeryk2

Recommended Posts

Hello community,

I have strange error on product page when I have product with no combinations and I want to to url like http://domain.com/product512.html#footer then this information appears and button "Add to cart" dissappears.

This not happens on product with combinations and everything works smoothly.

Does anyone now how to edit product.js to prevent situation like this?
------------------------------------------------------------------------------------------------------

EDIT: Solved. 

In product.js, in checkUrl function I added this condition:

 

function checkUrl()
{
	if (combinations.length == 0)
		return false;

// ... rest of this function

------------------------------------------------------------------------------------------------------
EDIT 2: Not solved
The solution above is breaking displaying of images in jquery :/
----------------------------------------------------------------------------------------------------

EDIT 3: Solved :)

if (typeof combinations === 'undefined' || !combinations){
        return false;
    }

Edited by hakeryk2 (see edit history)
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...