Jump to content

Product Combination URLs w "#/" Issue In Google Shopping


Recommended Posts

I originally posted this as a reply at https://www.prestashop.com/forums/topic/253383-how-to-remove-attribute-and-values-from-the-url/?p=2435454 because it seemed related, but it should have it's own thread too.

 

We sell cable products, each cable product has approx 30 'Length' Combinations to choose from.  We list these products in Google Merchant Center (Google Shopping)... each Combination is uploaded as its own product.  A valid Google Shopping listing requires a link back to a page that shows that product at the same price displayed in Google Shopping. The "#/" feature work great for Lengths (i.e., domain.com/category/main-product#/length-4_meter).  

 
Google Merchant accepts it in the XML upload, however, the "#/" url is not indexed in Google Search because it looks like an Anchor links not a Page link.  This caused Only the main cable product to be indexed and none of it's 30 Length options.  The Main cable product is not a product by itself, it needs a Length... so Google Merchant randomly selects one of the 30 lengths to display in Google Shopping.   Not good, my 1 random product swims in a sea of competitor 'Length' options with a random length between $9 - $700 in SERPs. 
 
Can someone with epic knowledge of PrestaShop confirm I can just remove "#" from "#/" in the snippet of product.js code below (theme/js/product.js) and then clear my cache? 
 
    // build new request
    for (var i in attributesCombinations)
        for (var a in tab_attributes)
            if (attributesCombinations[i]['id_attribute'] === tab_attributes[a])
                request += '/'+attributesCombinations[i]['group'] + attribute_anchor_separator + attributesCombinations[i]['attribute'];
    request = request.replace(request.substring(0, 1), '#/');
    url = window.location + ''; 

Thanks in advance! 

 

  • Like 1
Link to comment
Share on other sites

Thank you very much for your response, Prophit!  

 

So will adding 'SomeProducts' schema solve my Google Shopping listing problem so I don't have to remove '#' from Combination URLs?  Or do you just recommend SomeProducts to address rel=canonical issue?

 

Either way, I'd like to add it.  I haven't used smarty boolean yet, would you mind sharing exactly how to add SomeProducts schema to Combination pages?

 

 

Very informative link by the way... thank you!

Link to comment
Share on other sites

  • 7 months later...

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