cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.1.7 WishList button "Add all to cart" is not working

Highlighted
New Contributor

Magento 2.1.7 WishList button "Add all to cart" is not working

Dear all,

 

I have Magento 2.1.7. and after I've included some products on my wishlist. I clic on  "Add all to cart" button, the page is left blank and the URL shows the following address: http://url_base/wishlist/index/allcart/?qty[5]=1&qty[6]=1

 

wislist

 

white page

 

Help!

 

  • magento2
6 REPLIES
4 x Certified

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Hi @ymart,

 

Is possible you're getting an error 500 on your server.

Please take a look to your Magento logs, reports and also the webserver error log.

 

New Contributor

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Dear @Damian Culotta

 

Thank you for you reply.

 

In filelog I found the followin messages:

 

PHP Fatal error:  Uncaught Error: Unsupported operand types in /public_html/vendor/magento/module-wishlist/Model/Item.php:482, referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: Stack trace:, referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: #0 /public_html/vendor/magento/module-wishlist/Model/Item.php(433): Magento\\Wishlist\\Model\\Item->getBuyRequest(), referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: #1 /public_html/vendor/magento/module-wishlist/Model/ItemCarrier.php(139): Magento\\Wishlist\\Model\\Item->addToCart(Object(Magento\\Checkout\\Model\\Cart\\Interceptor), true), referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: #2 /public_html/vendor/magento/module-wishlist/Controller/Index/Allcart.php(71): Magento\\Wishlist\\Model\\ItemCarrier->moveAllToCart(Object(Magento\\Wishlist\\Model\\Wishlist), Array), referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: #3 /public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\\Wishlist\\Controller\\Index\\Allcart->execute(), referer: http://mtx.webpage.com.ve/wishlist/index/index/
mod_fcgid: stderr: #4 /public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Framework\\App\\Action\\Action->dispatch(O in /secundario/apache/mtx-virtualmin/public_html/vendor/magento/module-wishlist/Model/Item.php on line 482, referer: http://mtx.webpage.com.ve/wishlist/index/index/

Last  lines of    Only show lines with text     

 

And the Item.php line 482:

 

public function getBuyRequest()
    {
        $option = $this->getOptionByCode('info_buyRequest');
        $initialData = $option ? unserialize($option->getValue()) : null;

        if ($initialData instanceof \Magento\Framework\DataObject) {
            $initialData = $initialData->getData();
        }

        $buyRequest = new \Magento\Framework\DataObject($initialData);
        $buyRequest->setOriginalQty($buyRequest->getQty())->setQty($this->getQty() * 1);
        return $buyRequest;
    }

Could someone see what the problem is?

Tags (1)
4 x Certified

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Hi @ymart,

 

Can you try setting the LUMA theme again and try that action?

New Contributor

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Hi @Damian Culotta

 

Yes I did .. I still have the same problem with Luma Smiley Sad

Tags (1)
4 x Certified

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Are you using some 3rd-party modules?

 

New Contributor

Re: Magento 2.1.7 WishList button "Add all to cart" is not working

Hi @Damian Culotta

 

No, I'm not using 3rd-party modules