Re: Pre-defined list
scamp <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.contributions |
|---|---|
| Message-ID | <89a4359a8103c1ea5ef0e652161ac437@osCommerce-Forums> |
This message was sent from: Contributions
http://forums.oscommerce.com/viewtopic.php?p=227278#227278
----------------------------------------------------------------
Never mind found the fix of sorts :wink:
made the action=wishlist_add_cart&pid.. had to edit the code but I belive it's fine.
For those interrested I edited the action=cust_order to action=wishlist_add_cart&pid... in both the page and module (box) and then edited the code in application_top.php to
case 'wishlist_add_cart':
// while (list($key,$elem) =each ($lvnr))
{
// (list($key1,$elem1) =each ($lvanz));
// tep_db_query("update " . TABLE_WISHLIST . " SET products_quantity=$elem1 WHERE customers_id=$customer_id AND products_id=$elem");
tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_quantity='999'");
$produkte_mit_anzahl=tep_db_query("select * from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$pid AND products_quantity");
while ($HTTP_POST_VARS=mysql_fetch_array($produkte_mit_anzahl))
{
$cart->add_cart($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['products_quantity']);
}
}
// reset ($lvanz);
tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$pid");
break;
Hope it's of help to someone,
ps I am using a old snapshot application_top.php,v 1.248 2002/09/20
regards Seb
[quote="scamp"]Howdy,
I too have been working on a pre-defined list and have not been able to add more than 1 item to the cart from the wishlist. i.e even though the qty in the wishlist is 2 it still will only post 1 to the cart. I have attempted to use your mode as above but still no joy it atualy returned an sql error but once that was fixed still nothing. I am using a pre MS snapshot (with lots of mods late Nov 002)- any help would be most appreciated.
I have been playing with this line for what seems like for ever .
$cart->add_cart($HTTP_GET_VARS['pid'], 1);
refgards Seb[/quote]