Jump to content
thirty bees forum

Recommended Posts

Posted

Isn't that the normal behaviour?

I am the owner of chesspoint.ch. I changed some things with attributes, since I don't want to have any "default" attribute. But I can't remember, that I removed the id in the url 😮 

Posted
11 hours ago, wakabayashi said:

Isn't that the normal behaviour?

I am the owner of chesspoint.ch. I changed some things with attributes, since I don't want to have any "default" attribute. But I can't remember, that I removed the id in the url 😮 

I don't think it's default.  Trying out my 1.0.8/BE instances and both have the id in the anchor.  Same with the website demo.
 

Posted

I looked a bit into it. It seems to be theme related...

You would need to edit product.js in your theme. There the function getProductAttribute(). But I am really not sure if this is worth it...

Posted
11 hours ago, wakabayashi said:

I looked a bit into it. It seems to be theme related...

You would need to edit product.js in your theme. There the function getProductAttribute(). But I am really not sure if this is worth it...

I've been a busy 🐝 imbibed on "nectar" & "sweets" and figured it out.  Selecting/adding the product looks fine so far.

in function getProductAttribute()

https://github.com/thirtybees/community-theme-default/blob/30a27a8976f87917323a90e1bd43933398cd65fb/js/product.js#L1075

 

request += '/' + attributesCombinations[i]['id_attribute'] + '-' + attributesCombinations[i]['group'] + attribute_anchor_separator + attributesCombinations[i]['attribute'];

to

request += '/' + attributesCombinations[i]['group'] + attribute_anchor_separator + attributesCombinations[i]['attribute'];

in function checkUrl()

https://github.com/thirtybees/community-theme-default/blob/30a27a8976f87917323a90e1bd43933398cd65fb/js/product.js#L1131

 if (attributesCombinations[a]['group'] === decodeURIComponent(tabValues[z][1]) &&
              attributesCombinations[a]['id_attribute'] === decodeURIComponent(tabValues[z][0])) {
              count++;

to

if (attributesCombinations[a]['group'] === decodeURIComponent(tabValues[z][0]) &&
              attributesCombinations[a]['attribute'] === decodeURIComponent(tabValues[z][1])) {
              count++;

 

Also commenting out "window.location.replace(url + request);" removes the anchor completely.

 

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...