Jump to content

[SOLVED] Trouble with class cart


neoshadybeat

Recommended Posts

Hi

I'm doing a module for prestashop where i want to add elements to the cart, viewing the code i try this


<?php

require_once(dirname(__FILE__).'/config/config.inc.php');
require_once(dirname(__FILE__).'/init.php');

require_once(dirname(__FILE__).'/header.php');
   echo"hola mundo";

   $cart->updateQty(1,10);//id 10
require_once(dirname(__FILE__).'/footer.php');
?>



and it work's well, the problem is when i want to assign a attribute to it, when i try this

    $cart->updateQty(1,10,13);//id 10, attribute 13



it doesn't work, what is the problem?

thanks a lot ;-)
the problema was that the id attributte, is different to the attributte id assign to the product

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