dotray Posted July 9, 2019 Posted July 9, 2019 I'm not looking to remove the whole anchor; just the number id but I can't seem to find where is the relevant piece of code to modify. I found this but fiddling around with it leads me nowhere; taking out the group/name also does nothing. I cleared cache between updates.https://github.com/thirtybees/thirtybees/blob/eb61447487d82db27522e0613890bf4094b0af8e/classes/Product.php#L7603
lesley Posted July 9, 2019 Posted July 9, 2019 Why? Attribute urls should not be indexed in the first place.
dotray Posted July 9, 2019 Author Posted July 9, 2019 looks better; #/9-size-10 vs #/size-10 like these sites https://www.chesspoint.ch/schach/gartenschach/figuren/gartenschach-einzelfigur-de-gross#/gartenschach_einzelfigur-dame https://shop.hhof.com/men-s/4876-hhof-9-99-namesake-number-tee-howe.html#/size-x_large
wakabayashi Posted July 9, 2019 Posted July 9, 2019 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 😮
dotray Posted July 9, 2019 Author Posted July 9, 2019 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.
wakabayashi Posted July 9, 2019 Posted July 9, 2019 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...
dotray Posted July 10, 2019 Author Posted July 10, 2019 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now