Problem with cart link when trying to add a product to the cart

Posts: 16
Joined: 05/06/2008

Hi,
For my site, I've hidden the add to cart button (in the php file uc_product line 2294 : "$form['submit'] = array('#type' => 'submit', '#value' => variable_get('uc_product_add_to_cart_text', t('Add to cart'))," became "$form['submit'] = array('#type' => 'hidden', '#value' => variable_get('uc_product_add_to_cart_text', t('Add to cart')),")
and I replaced it with add links for each produc. It works for the first two products ("<@a href="http://www.s239557999.onlinehome.fr/creaprint/cart/add/p2_q1-stiker1?destination=node/add/sticker-client">
Créer un Stickers " and "<@a href="http://www.s239557999.onlinehome.fr/creaprint/cart/add/p3_q1-stiker1?destination=node/add/sticker-client">
Créer un Stickers") but not for the others. For exemple, if I have a fourth product, the cart link to add this to he cart should be : <@a href="http://www.s239557999.onlinehome.fr/creaprint/cart/add/p4_q1-stiker4?destination=node/add/sticker-client">
Créer un Stickers " but I have an Error : 'is not a product. Unable to add to cart.' how can I fix this?
Thanks
Bee

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm... the thing to remember might be that for p#, the # should be the node ID of the product. So if you've created other nodes, like pages or other content, you might need to make sure you're putting in the right node ID.