Jump to content

Problem generating combinations in a multistore


50l3r

Recommended Posts

Hi guys,

I have encountered an important problem when wanting to add a combination in one of my stores. Imagine that I have the same product in 3 stores but in them I have different combinations:

On this example, "Size 1" only appears on Shop3

TShirt - Shop1

  • Size 0
  • Size 2
  • Size 3
  • Size 4

TShirt - Shop2

  • Size 0
  • Size 2
  • Size 3
  • Size 4

TShirt - Shop3

  • Size 0
  • Size 1
  • Size 2
  • Size 3
  • Size 4

 

Well, if i try to add "Size 1" to Shop 1 i don't receive any error and combination does not create: https://files.calltek.dev/2022/08/chrome_SYxp7bm02c.mp4

Okey. The possible error occurred on file classes/Product.php on line 1549 (PS 1.7.7.5) at method generateMultipleCombinations

$id_combination = (int) $this->productAttributeExists($attributes[$key], false, null, true, true);

4rd argument verify if attribute exists on allshops. As the attribute already exists in "Shop 3" one of the stores no longer allow it to create it in the others. Changing "true" for "false" only check for specific shop and it allows to create the combination.

 

 

 

 

Link to comment
Share on other sites

  • 11 months later...
On 8/16/2022 at 11:17 AM, 50l3r said:
$id_combination = (int) $this->productAttributeExists($attributes[$key], false, null, true, true);

@50l3r did you test it on Prestashop 8.0.4?, we did your changes, then we can add the combinations, but when we try to save the product data it returns an error

Link to comment
Share on other sites

4 hours ago, Carlos Reyero said:

@50l3r did you test it on Prestashop 8.0.4?, we did your changes, then we can add the combinations, but when we try to save the product data it returns an error

At the moment i only try on PS 1.7.7.5

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