Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist -> predefined basket


Guest

Recommended Posts

Hello,

 

I have working Wishlist contribution installed on osCommerce 2.2-MS2, with one modification of my own: adding a product from wishlist to cart does not delete the product from wishlist.

 

Customers on the website I'm developing have more or less regular shopping habits, so what I'm trying to do is modify wishlist to work as "predefined basket", so that every customer would have a number of products which they can easily add to shopping cart.

 

Two things, which I haven't been able to solve, are still open:

 

1. Adding a product which already is in cart from wishlist resets the amount of that particular product in cart. For example, I have 20 pcs of product1 in cart and I add product1 to cart from wishlist -> I only have one piece of product1 in cart.

 

2. How to make a link "Add ALL products from wishlist to basket", so that I wouldn't have to click "Add product to basket" for each product in wishlist individually.

 

If anyone has examples, code, instructions or any kind of help on those two issues, I would be most grateful :).

Link to comment
Share on other sites

Two things, which I haven't been able to solve, are still open:

 

1. Adding a product which already is in cart from wishlist resets the amount of that particular product in cart. For example, I have 20 pcs of product1 in cart and I add product1 to cart from wishlist -> I only have one piece of product1 in cart.

 

 

Oh well, got that one working by changing the following code in wishlist.php:

 

 

<a href="<?php echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id'] . '&rfw=1', 'NONSSL'); ?>">Add product to basket</a>

 

to:

 

<a href="<?php echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&pid=' . $products['products_id'] . '&rfw=1', 'NONSSL'); ?>">Add product to basket</a>

 

 

So, action buy_now instead of cust_order.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I am currently trying to make a add all to cart from items in a pre-defined wishlist, that is simply grab the items in the wishlist table and move them to the cart.

 

 

Any help with this would be much appreciated if someone would like to collaborate please contact me.

 

 

Regards Seb

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...