Do I need to rewrite numeric values into the combination URLs?

This FAQ is valid only from the module's 1.3.0 version.

 

For PrestaShop 1.6 versions:

If you use some numerical values with decimals, you may have a problem of writing of the product combination URLs.

Let's take the example below:

You are selling a bag of dog food that comes in 2 different weights: un bag of 1,5kg and another of 15kg. These two bags are then 2 combinations of a same product (of id 122 for example).

By default, PrestaShop writes the URL of each combination like this:

Bag of 1,5 kg => .../food-royal-canin-veterinary-dog/231-royal-canin-hepatic-dogs.html#/122-weight-15_kg

Bag of 15 kg => .../food-royal-canin-veterinary-dog/231-royal-canin-hepatic-dogs.html#/122-weight-15_kg

As you can see, the 2 URLs are exactly the same... while the weight of each bag is different. Indeed, by default PrestaShop doesn't take into account the coma (or the dot) into numbers when it creates URLs and 1,5 kg give the same result as 15 kg... Which is a problem then for Google interpretation for your Google Shopping ads but also for the SEO of you product combinations...

 

Some themes take into account the problem and replace the coma (or dot) by an underscore ("_"). For the bag of 1,5 kg, you would therefore have:

.../food-royal-canin-veterinary-dog/231-royal-canin-hepatic-dogs.html#/122-weight-1_5_kg

 

If your theme doesn't make the substitution, you can ask the module to do it. Go to the "Feed management" section and click the "Feed data options" tab. For the option related to the rewriting of numerical values, select YES:

 

 

The module will replace the comas or dots of numerical values with decimals by underscores ("_") and will correctly rewrite the URL of your product combinations.

 

For PrestaShop 1.7 versions:

You shouldn't have any issue with numeric values writing in combination URLs because the 1.7 version of PrestaShop fixes this problem encountered on previous versions. 

However, depending on modules you're using or your theme, PrestaShop 1.7 native behavior may be disrupted and you face again this kind of problem. If this is the case, read the above for versions 1.6 and enable the necessary option. 

Other FAQs in this category