Jump to content

Problem with the Product Attributes drop-down menu on shop page


Recommended Posts

Hi, after the new version of Prestashop (1.6.1.0) I found a strange problem. When I'm creating a product with different combinations (different atributes with drop-down menu), then I can't choose these combinations on the shop webpage. I choose some combination at the product, the shop shows me some seconds selected product and after that it updates the product to the default combination.

 

For example. One product has combinations 1 (default), 2 and 3. When I choose on the shop's webpage combination 2, then after some seconds the shop update the view to the default combination back. So the client can't either see the details of the combination nor add it to the cart.

Can somebody say, where is the problem. Before the last Prestashop upgrade this function worked perfect.

 

This problem isn't in mobile version.

 

Kristjan001

Edited by Kristjan001 (see edit history)
  • Like 2
Link to comment
Share on other sites

I found the solution in my case and posted it in another case, but I advise:

1. check your Prestashop version. My administration profile shows 1.6.1.0, but the server showed 1.6.0.14. So I updated the version again.

2. disable the cross-selling (for example: Modules>cart block> show cross-selling.

 

I solved this problem so.

Link to comment
Share on other sites

  • 3 weeks later...

Have You checked the cross-selling? I didn't use it, but after last update to 1.16.1.0 it was automatically enabled. So check it. Before this I updated the verion again, because on the website I had sign "Prestashop 1.16.1.0", but in administration site I had information about 1.16.0.14. It can be that the update wasn't successful. I solved my problem.

Link to comment
Share on other sites

  • 1 month later...

Just read this post looking for something else, gone to my product page and turns out i have this problem too!

 

So... does anybody have any idea why my product page reloads when you choose an attribute but when i try to recreate the problem on demo.prestashop.com the problem does not occur? In fact their page doesn't load at all, it just instantly changes the price/picture/colour. 

 

Any ideas would be appreciated to help me track down the fault. 

 

Thanks in advance!

 

Mike

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...
  • 3 weeks later...
  • 1 year later...
  • 2 weeks later...
  • 4 weeks later...

Try to set up attributes this way , in my case when I set up 2 attributes together then it works . When I choose one attribut and the second separate then attributes won't work together , try set both attributes together not separate in one line if you know what I mean .

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Same problem here too, combinations work without friedly URLs enabled but when you activate friendly URLs you can see all combinations and you can select other than default but it refreshes to back default, if you have same picture in combinations then it works.

 

I think it's server image rewrite config issue with nginx. Sorry I i don't know how to config this, if some one know, please share

 

Thank you

Link to comment
Share on other sites

Same problem here too, combinations work without friedly URLs enabled but when you activate friendly URLs you can see all combinations and you can select other than default but it refreshes to back default, if you have same picture in combinations then it works.

 

I think it's server image rewrite config issue with nginx. Sorry I i don't know how to config this, if some one know, please share

 

Thank you

Found solution to this

 

go to SEO and change product url :

 

{category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

 

to

 

{category:/}{id}{-:id_product_attribute}-{rewrite}.html

 

save and that's it

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I had this annoying problem too, I've attached my fix.

File: controllers/front/ProductController.php

Find this:

 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations()) {
                unset($_GET['id_product_attribute']);
            } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) {
                $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }

Replace with:

 public function canonicalRedirection($canonical_url = '')
    {

        if (Validate::isLoadedObject($this->product)) {
            $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?
            if($check === 0) {
                unset($_GET['id_product_attribute']);
            } else {
                // id_product_attribute will be set in the url
                
                if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value
                    $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
                }

            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }


If you still have a problem, I would clear the cache.

Hope this helps!

Edited by mailbox@privilegedso (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 1 month later...
Dnia 31.08.2017 o 2:51 PM, Marksaa napisał:

Found solution to this

 

go to SEO and change product url :

 

{category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

 

to

 

{category:/}{id}{-:id_product_attribute}-{rewrite}.html

 

save and that's it

This is it!! :) Thank You Marksaa

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...

Hi, I had same problem. Then I did some research. Then I understand that the problem is product comment module.  actually the problem is not the module itself. problem is changing this module position in product page. I have moved this module to productextracontent table from it's original position (productfooter). When I moved the module back to the footer I solved the problem. But it's not enough for me. Because it had to be in productextracontent table. Then I did more research.  Then I found the module which fixed.

 

9.1.9

- updated module workflow with position displayProductExtraContent

- added number of comments to product list reviews widget (previously there was a average grade)

 

Now I'm using this version. And my product attributes don't have any problem while changing up or down

 

(I'm using prestashop 1.7.2.4 and php 7.0 version)

Edited by Matara (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
On 26.10.2017 at 3:02 PM, mailbox@privilegedso said:

I had this annoying problem too, I've attached my fix.

File: controllers/front/ProductController.php

Find this:


 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations()) {
                unset($_GET['id_product_attribute']);
            } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) {
                $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }

Replace with:


 public function canonicalRedirection($canonical_url = '')
    {

        if (Validate::isLoadedObject($this->product)) {
            $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?
            if($check === 0) {
                unset($_GET['id_product_attribute']);
            } else {
                // id_product_attribute will be set in the url
                
                if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value
                    $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
                }

            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }


If you still have a problem, I would clear the cache.

Hope this helps!

After a few hours of searching, only this solution worked

Link to comment
Share on other sites

  • 1 month later...
On 2017-10-26 at 9:02 AM, mailbox@privilegedso said:

I had this annoying problem too, I've attached my fix.

File: controllers/front/ProductController.php

Find this:


 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations()) {
                unset($_GET['id_product_attribute']);
            } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) {
                $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }

Replace with:


 public function canonicalRedirection($canonical_url = '')
    {

        if (Validate::isLoadedObject($this->product)) {
            $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?
            if($check === 0) {
                unset($_GET['id_product_attribute']);
            } else {
                // id_product_attribute will be set in the url
                
                if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value
                    $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
                }

            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }


If you still have a problem, I would clear the cache.

Hope this helps!

 

On 2017-10-26 at 9:02 AM, mailbox@privilegedso said:

I had this annoying problem too, I've attached my fix.

File: controllers/front/ProductController.php

Find this:


 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations()) {
                unset($_GET['id_product_attribute']);
            } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) {
                $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }

Replace with:


 public function canonicalRedirection($canonical_url = '')
    {

        if (Validate::isLoadedObject($this->product)) {
            $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?
            if($check === 0) {
                unset($_GET['id_product_attribute']);
            } else {
                // id_product_attribute will be set in the url
                
                if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value
                    $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
                }

            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }


If you still have a problem, I would clear the cache.

Hope this helps!

 

On 2017-10-26 at 9:02 AM, mailbox@privilegedso said:

I had this annoying problem too, I've attached my fix.

File: controllers/front/ProductController.php

Find this:


 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations()) {
                unset($_GET['id_product_attribute']);
            } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) {
                $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }

Replace with:


 public function canonicalRedirection($canonical_url = '')
    {

        if (Validate::isLoadedObject($this->product)) {
            $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?
            if($check === 0) {
                unset($_GET['id_product_attribute']);
            } else {
                // id_product_attribute will be set in the url
                
                if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value
                    $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);
                }

            }

            $id_product_attribute = $this->getIdProductAttribute();
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                $id_product_attribute
            ));
        }
    }


If you still have a problem, I would clear the cache.

Hope this helps!

 

I'm wondering what version you made the above change to. We are on 1.6.1.18 and the code that is displayed in the function is completely different.

 

	    public function canonicalRedirection($canonical_url = '')
    {
        if (Tools::getValue('live_edit'))
            return ;
        if (Validate::isLoadedObject($this->product))
            parent::canonicalRedirection($this->context->link->getProductLink($this->product));
    }
	

We were trying to install an upgraded payment module to the Beanstream Payment Gateway. The result seems to be a removal of all combination inventory even though the ps-stock-available table has values for the products.

Thanks,

 

Bastien

Link to comment
Share on other sites

  • 3 weeks later...
En 3/11/2018 a las 4:39 PM, zielony_zolw dijo:

After a few hours of searching, only this solution worked

Hi,

I have Prestashop version 1.7.3 and I've tried 2 different solutions:

 

1) Change to YES to the option: Show products with not available attributes in the product page. AND THIS WORKED FOR ME, but it's not a valid solution, because I have a lot of combinations for each product without stock and this is not useful for my customer.

image.png.c32f532f29f25be980ebe23d92be8d2a.png

2) I applied the change in the ProductController.php as explained on this threat and IT'S NOT WORKING FOR ME. (And yest I removed the Caché ;-)

For instance, you can see the issue on this product:

https://deportesasturias.com/hombre/ropa/polares/fairview-polar-regatta-hombre

 

Any clue? Thanks in advance

 

 

 

image.png

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Using 1.7.4 and this issue is not resolved for me. I've tried every suggestion and fix in the this thread without success.

Anyone using 1.7.4 with working attributes? (specifically two sets of attributes like Size and Colour)

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

same problem here -1.7.4.2 generates error 500 in network monitor when switching to combination where available size is not as actually chosen.

[PrestaShopObjectNotFoundException]

Can not retrieve the id_product_attribute
at line 6143 in file classes/Product.php

 

Link to comment
Share on other sites

  • 3 weeks later...
On 1/8/2018 at 9:12 AM, Pełny Koszyk said:

Hello,

same problem here -1.7.4.2 generates error 500 in network monitor when switching to combination where available size is not as actually chosen.


[PrestaShopObjectNotFoundException]

Can not retrieve the id_product_attribute
at line 6143 in file classes/Product.php

 

 

 

have you found a solution?

Link to comment
Share on other sites

  • 2 weeks later...
On 27/07/2018 at 6:55 PM, Pureshore said:

Still have this issue as well on 1.7.4.2.

Tried everything suggested here but nothing fixed it.

Anyone has an idea on how to fix it ? This is particularly problematic !

 

Fyi, I fixed the problem by reinstalling Prestashop 1.7.4.2 eventhough it was the one already installed. Not sure what changed but it now works.

You may want to try a fresh local installation and see if it works: if it does, problem comes from your theme or previous changes and reinstalling Prestashop should work.

Link to comment
Share on other sites

I have this issue also - similar to what's described here:

http://forge.prestashop.com/browse/BOOM-6113

It looks like it is fixed in version 1.7.5.0  so hopefully that will be released soon.

I tried version 1.7.5.0 and it does indeed fix my issue.

 

I'm fairly new to prestashop and I'm a bit shocked that there should be such a fundamental

problem with the system and they did not patch immediately

Edited by stupidchief (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

I was running Prestashop 1.7.4.0 and tried to add products with two sets of combinations. Initially everything was working fine. I then noticed that the combinations were suddenly not working anymore and that selecting any of them would be only temporarily for a second before switching automatically back to default. The changes I did before that happened were:

  • install and activate one fo those plugins that creates clean URLs;
  • update the configuration of the SEO friendly URLs in the SEO and URLs backoffice section;
  • Installed a module that allows me to create combinations with virtual products;

I am not sure what caused the combination selection to fail but I figured that if I created those same combinations all in one set instead of two separate sets, I was still able to have a front shop with working combinations. So I deleted the clean URLs module but kept the virtual combinations one. Clean URLs set to friendly again.

Then I updated to Prestashop 1.7.4.2 and the combination selection started to fail again. Because of the update I went through the same three points I went through when it failed in the first place.

  • re-install and activate one fo those plugins that creates clean URLs;
  • update the configuration of the SEO friendly URLs in the SEO and URLs backoffice section;
  • re-installed a module that allows me to create combinations with virtual products;

I have tried all of the suggested solutions mentioned here and none of them has worked:

  • updated the code in ProductController.php as suggested by mailbox@privilegedso;
  • updated the hyphen separating the URLs into a comma and viceversa as suggested by kevinmiao;
  • updated the string generating the product URLs as suggested by Marksaa;
  • associated each combination with a unique picture;

Nothing has worked so far. it's extremely frustrating. I do believe that starting with a fresh install of Prestashop 1.7.4.2 things would go back to normal but it is a lot of work for me and I don't think I will have the time to do it.

Waiting for 1.7.5 but even when that comes out I guess we will have to wait for an update of the 1-click update module which usually takes a little while to catch up with the latest release without causing problems.

Link to comment
Share on other sites

  • 2 weeks later...
On 8/31/2017 at 1:51 PM, Marksaa said:

Found solution to this

 

go to SEO and change product url :

 

{category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

 

to

 

{category:/}{id}{-:id_product_attribute}-{rewrite}.html

 

save and that's it

 

 

WORKED!! Marksaa you are a life saver thank you very much!

Link to comment
Share on other sites

Hello all!

I have the same issue and tried every solution posted here and in other forums.

On my website, the URL does not show the attribute. But I checked the SEO & URL and it shows the same {category:/}{id}-{rewrite}{-:ean13}.html as in a clean install of PS 1.6.1.19 where the attributes work properly.

https://www.bijoux-isady.fr/fr/bracelets-gourmettes-a-graver/90903-isady-mery-gold-gourmette-bracelet-a-graver-plaque-or-18k-maille-gourmette-plusieurs-tailles.html

I am out of my mind searching for a solution since already 5 hours! Please help me.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
43 minutes ago, Terramoka said:

Hello, I am on version 1.7.4.2 and i  tried everything here and nothing is working 

For me it was the ProductController from the theme. It was a bad function "getIdProductAttribute".

So you can try: Go to controllers - > front -> ProductController.php and search "function getIdProductAttribute()" 

Mine was bad coding and this is the good one:

/****** Start*****

private function getIdProductAttribute($useGroups = false)
    {
        $requestedIdProductAttribute = (int) Tools::getValue('id_product_attribute');

        if ($useGroups === true) {
            $groups = Tools::getValue('group');

            if (!empty($groups)) {
                $requestedIdProductAttribute = (int) Product::getIdProductAttributesByIdAttributes(
                    $this->product->id,
                    $groups
                );
            }
        }

        if (!Configuration::get('PS_DISP_UNAVAILABLE_ATTR')) {
            $productAttributes = array_filter(
                $this->product->getAttributeCombinations(),
                function ($elem) {
                    return $elem['quantity'] > 0;
                }
            );
            $productAttribute = array_filter(
                $productAttributes,
                function ($elem) use ($requestedIdProductAttribute) {
                    return $elem['id_product_attribute'] == $requestedIdProductAttribute;
                }
            );

            if (empty($productAttribute) && !empty($productAttributes)) {
                return (int)array_shift($productAttributes)['id_product_attribute'];
            }
        }

        return $requestedIdProductAttribute;
    }

/**** End*****

Link to comment
Share on other sites

1 minute ago, dani said:

For me it was the ProductController from the theme. It was a bad function "getIdProductAttribute".

So you can try: Go to controllers - > front -> ProductController.php and search "function getIdProductAttribute()" 

Mine was bad coding and this is the good one:

/****** Start*****

private function getIdProductAttribute($useGroups = false)
    {
        $requestedIdProductAttribute = (int) Tools::getValue('id_product_attribute');

        if ($useGroups === true) {
            $groups = Tools::getValue('group');

            if (!empty($groups)) {
                $requestedIdProductAttribute = (int) Product::getIdProductAttributesByIdAttributes(
                    $this->product->id,
                    $groups
                );
            }
        }

        if (!Configuration::get('PS_DISP_UNAVAILABLE_ATTR')) {
            $productAttributes = array_filter(
                $this->product->getAttributeCombinations(),
                function ($elem) {
                    return $elem['quantity'] > 0;
                }
            );
            $productAttribute = array_filter(
                $productAttributes,
                function ($elem) use ($requestedIdProductAttribute) {
                    return $elem['id_product_attribute'] == $requestedIdProductAttribute;
                }
            );

            if (empty($productAttribute) && !empty($productAttributes)) {
                return (int)array_shift($productAttributes)['id_product_attribute'];
            }
        }

        return $requestedIdProductAttribute;
    }

/**** End*****

Thanks Dani, I saw on other posts that the issue might also come from attribute seperators in "PS_configuration" table, I suspect my problem originates from there. I will try your fix after and see which one it is. 

Link to comment
Share on other sites

wow. the developpers of my theme keep saying it's prestashop, but i know for a fact that when i change themes i DO NOT get the errors, i tried everything from changing URL to BO options to making changes to product controller. 
i'm on 1.7.4.2 and dont intend on changing because i'm sure that will break something else

Link to comment
Share on other sites

On 12/6/2018 at 12:00 PM, Terramoka said:

wow. the developpers of my theme keep saying it's prestashop, but i know for a fact that when i change themes i DO NOT get the errors, i tried everything from changing URL to BO options to making changes to product controller. 
i'm on 1.7.4.2 and dont intend on changing because i'm sure that will break something else

Can you try adding the core files (from the theme) manually, one by one and maybe see which one is causing the conflict?

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 3 weeks later...

Hi everybody:

I had similar issues using combinations, mostly using colors as attributte. I solved all by doing this simple thing in PS 1.7.4 (it could help)

In catalogue > list of attributes  have several attributes, including color, size and paper type. I reorder the attributtes, and put color in the LAST position: it works for me! In other position, the colors thrown an ajax error always, i felt confussed about this... but this solved it

Link to comment
Share on other sites

  • 3 weeks later...
On 1/10/2019 at 6:29 PM, undesigned said:

For me worked by setting "," instead of "-"

PS 1.7.5

We’ve made an upgrade to 1.7.5.1 and it’s the same problem :(
- multishop activated
 

On 1.7.5 was solved with solution mentionated above.
But now thoesn`t work

I can’t make a downgrade because on the oldest version products combinations was very slow on editing.

Any solutions / opinions please?

Edited by undesigned (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

ok guys,

So i was having the same problem after the upgrade to version 1.7.5.1. previously i had version 1.7.3.2 and i didn't have the problem

I figured that the problem was caused by an outdated override file ProductController.php on -> override/controllers/front

The module i'm using is Ps IT Clean url's. i had it installed first with the version 1.7.3.1 and at that time the module created the override.

since that version of the module was not compatible with the latest version of prestashop, i purchased the newer version and installed it again.

-> the problem was... it didn't update the override file. so the file that stayed was the old one which wasn't compatible, and caused the problem of not allowing me to change the attribute of any products.

To solve the problem i only had to overwrite the old ProductController.php on -> override/controllers/front with the new one that comes with the module .zip file.

i was only able to get to this result because i created a localhost store and everything was working there. even after my main store and back-up/test site were having problems. since the installation on localhost was already the latest, i started opening all the files in dreamweaver to check the differences. when i say a differnt version number inside, i knew that was the problem.

 

Anyway, i hope this will help any of you get the problem solved. Just thought i would give back to this comunity that has helped out a lot in the past already.

Link to comment
Share on other sites

  • 2 months later...
On 10/26/2017 at 3:02 PM, mailbox@privilegedso said:

public function canonicalRedirection($canonical_url = '')     {         if (Validate::isLoadedObject($this->product)) {             $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations?             if($check === 0) {                 unset($_GET['id_product_attribute']);             } else {                 // id_product_attribute will be set in the url                                  if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value                     $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id);                 }             }             $id_product_attribute = $this->getIdProductAttribute();             parent::canonicalRedirection($this->context->link->getProductLink(                 $this->product,                 null,                 null,                 null,                 null,                 null,                 $id_product_attribute             ));         }     }

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

For the problem of update combination in prestashop 1.7.4, the problem reproduced if  product have a section of related products.

you can just remove the list of related product and the update combination will work, for my case I did some change by code to resolve the problem with section related products

Link to comment
Share on other sites

  • 1 month later...
On 8/24/2018 at 4:45 PM, Muthu said:

I am also having same issue not fixed yet... tried everything in this thread.
For Multiple product variance, only one attribute group displaying, other attributes shows blank option list...


Using : 1.7.2.4

support.png

Facing the same error in Ps 1.7.2.

Hey, @Muthu Have you solved this error?

Please help me if you did.

Thanks & regards,

Himanshu

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hello everyone, i had the same problem running PS 1.7. No change in settings or coding required to fix.

My problem:
When selecting 2 attributes Color and Type, and selecting 2 colors and after that adding multiple types only the colors showed. The Type label showed but nothing to select.

The problem is in the way you select them. Because you have 2 separate attribute you always have to combine them with the others and can't select just one of the 2 and add it:

Right way: (selected iphone x but also both colors white and black)
Color - Black, iPhone - X
iPhone - X, Color - White

Wrong way: (selected just 1 attribute, x, black or white)
iPhone - X
Color - Black
Color - White

So when for example you select iPhone X, you also have to select all colors or it doesn't know how to combine them as there always has to be both a type and color selected.

Hope it helps, fixed my problem instantly and it actually makes sense for it to be added this way.

Link to comment
Share on other sites

  • 4 months later...
  • 1 month 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...