Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 2.0 Support Thread


defender39

Recommended Posts

I do have the same problem as no link appear  in the email... but I still haven't found why!

 

For the new version with html links to products, you probably need to enable HTML emails in your Admin configuration.

 

Admin->Configuration->Email options->Use MIME HTML When Sending Emails->true

Link to comment
Share on other sites

Instead of replacing the code you mentioned above could I replace this bit alone and get the same result?

 

 

Nope. Instead, you want to delete this line:

 

tep_db_query("delete from " . TABLE_WISHLIST . " where customers_id= '" . $customer_id . "' and products_quantity = '999'");

 

about 7 lines after the "case 'wishlist_add_cart'" line.

 

~Jorge

Link to comment
Share on other sites

For the new version with html links to products, you probably need to enable HTML emails in your Admin configuration.

 

Admin->Configuration->Email options->Use MIME HTML When Sending Emails->true

 

Thanks, tried that, but it still doesn't work.

Link to comment
Share on other sites

Nope. Instead, you want to delete this line:

 

tep_db_query("delete from " . TABLE_WISHLIST . " where customers_id= '" . $customer_id . "' and products_quantity = '999'");

 

about 7 lines after the "case 'wishlist_add_cart'" line.

 

~Jorge

 

Hi I have deleted this line, but it does stop wishlist from clearing I still get an empty wishlist next time I visit, but it didnt show any errors either by commenting this line out.

 

Any other thoughts? :'(

Link to comment
Share on other sites

Hi I have deleted this line, but it does stop wishlist from clearing I still get an empty wishlist next time I visit, but it didnt show any errors either by commenting this line out.

 

Any other thoughts? :'(

 

Sorry for thisa post but forum wouldnt let me edit the last, right I said it

does stop
but what I meant is it doesnt stop wishlist from clearing when added to cart. sorry for double post :thumbsup:
Link to comment
Share on other sites

Ok, I finally solved the "no wishlist in email" problem by using the wishlist_email.php file from v2.01 and modifying it slightly.

 

If anybody wants the file just email me.

 

Now, one last question. I would like to display "product quantity in stock" or "product status" in the wishlist.

 

Can anybody help?

Link to comment
Share on other sites

Hi,

 

I have 2.2MS1 installed, and would like to know if wishlist 2.3 is suitable (and easy enough) to install with my version of oscommerce?

 

Regards

Claire

Link to comment
Share on other sites

For the new version with html links to products, you probably need to enable HTML emails in your Admin configuration.

 

Admin->Configuration->Email options->Use MIME HTML When Sending Emails->true

 

thanks so much ... it does work!!!! :D

Edited by mujina

OSC2.2

Link to comment
Share on other sites

Hi has anyone else any thoughts on stopping wishlist from resetting once checkout is clicked, I need the wishlist list active next time customer comes to shop, so they are able just to repeat the order as is.

 

Appreciate any help.

Link to comment
Share on other sites

Hi has anyone else any thoughts on stopping wishlist from resetting once checkout is clicked, I need the wishlist list active next time customer comes to shop, so they are able just to repeat the order as is.

 

Appreciate any help.

 

 

Hey Joker,

 

an idea (don't know if it has been previously mentioned) would be to get your customers to do the wishlist, or just do the order 1 time. From then on it is stored in their order history (which you can show in an infobox on the left/right column) you can also control how many orders it shows, etc...

 

I don't know how this fits with your needs/wants, but it is something that is currently in osc and working.

 

RavenWulf

Link to comment
Share on other sites

Hey Joker,

 

an idea (don't know if it has been previously mentioned) would be to get your customers to do the wishlist, or just do the order 1 time.  From then on it is stored in their order history (which you can show in an infobox on the left/right column) you can also control how many orders it shows, etc...

 

I don't know how this fits with your needs/wants, but it is something that is currently in osc and working.

 

RavenWulf

 

This sounds great, I have looked at ways like this, in accounts having a reorders button and so on but infobox in a right/left column sounds a much better solution thx for this altenative, have you any ideas what contribution lends itself to this end result? this would help me out lots :thumbsup:

Link to comment
Share on other sites

Where is the edit post button gone to?

 

Anyways RavenWulf just tried this idea out I see what you mean, it goes so far but order history splits orders into products, so I cannot just click a button to add say 10 items I had in wishlist previously.

 

I have a trade reptile products site and all customers are regulars and 99% order over 10 items and pretty much are recurring orders weekly, I dont want these customers browsing products 1 by 1 when they just need to repeat last order facility I though wishlist would do this for me, but it resets wishlist on checkout.

 

Thx any further hacks to wishlist would be appreciated.

Link to comment
Share on other sites

Hi Everyone,

 

My wife and I recently started setting up a small "Thai Shop" (we live in Thailand). I installed the Wishlist 2.2 for OCS2.2. The only problem is that whenever I try to add a product to my wishlist, I get this error:

 

1146 - Table 'dbxxxxxxxxx.TABLE_WISHLIST_ATTRIBUTES' doesn't exist

 

delete from TABLE_WISHLIST_ATTRIBUTES where products_id = '31' and customers_id = '2'

 

[TEP STOP]

 

I've read this thread (all 25 pages!) back and forth three times :( . Everyone gives different advice about how to fix it. I've taken most of the advice given to this error. But nothing seems to fix it?

 

How can I fix it? Is it something in application_top.php or in my actual database

:( ?

 

We'd appreciate any help!

 

Shaun & Natlada

[email protected]

Edited by loveacrossborders
Link to comment
Share on other sites

Howdy,

 

In looking at your problem at I noticed that in my sql statement for adding tables it says:

 

CREATE TABLE customers_wishlist_attributes

 

as you can see yours only says wishlist_attributes, There is an updated version of wishlist

 

25 Oct 2004 - Wishlist 2.3 Consolidated

 

I would highly recommend downloading it, and trying for a reinstall of the contribution.

 

If you have backups of your files, and database I would restore them to before you did the wishlist install, and start over from scratch. If that doesn't work then you "should" beable to do the update without any problems (though you will need to compare the sql files).

 

I did the update to the 2.3 version from the 2.2 with attributes addon and had no problems.

 

If you need help just holler at me and I'll see what I can do :)

 

RavenWulf

 

Hi Everyone,

 

My wife and I recently started setting up a small "Thai Shop" (we live in Thailand). I installed the Wishlist 2.2 for OCS2.2. The only problem is that whenever I try to add a product to my wishlist, I get this error:

I've read this thread (all 25 pages!) back and forth three times  :( . Everyone gives different advice about how to fix it. I've taken most of the advice given to this error. But nothing seems to fix it?

 

How can I fix it? Is it something in application_top.php or in my actual database

:( ?

 

We'd appreciate any help!

 

Shaun & Natlada

[email protected]

Link to comment
Share on other sites

Sorry Joker :'(

 

I am by far not the best coder. I can figure out what needs to be done or think up ideas that would help/improve, but actually doing it is sometime beyond me :rolleyes:

 

On that note, I had some one ask me for some help with the wishlist the other day, and in working on it I had a Grand Idea "light bulb going off". I don't know how well this would work or if at all, but here goes.

 

Is there anyway to make a new infobox for the catalog (something like Wishlist Lookup or some such) so that when a person (anybody, even guests) came to the site they could look up a person's wishlist (very similar to amazon). I know the wishlist data is in the db, and that it would be stored under a persons account, which is stored by that persons email. So if someone entered in a persons email address could you have the db query for that persons wishlist? (or would it kill the query for security reasons?)

 

Oh and one other idea (this one's for you joker :thumbsup: )

 

Since several people have wanted to keep items in the wishlist even when they are moved to the cart, etc.. Coould you add a check box into the db or something where the person could select a wishlist item to "lock" into the wishlist? They currently have the option to Remove/Delete or to Move to Cart. Could another option be added to "lock/or something or other" the item. This way the customer could choose which items stay permentatly (or until "unlocked") and which don't. From just my limited know how I can see a bit of coding on this (at the very least an addon to the move to cart option to do a check on "locked/unlocked" status.

 

Feel free to tell me I am way of base on these, but I think they might be some good ideas, and great addons to this awsome contribution.

 

P.S. If you need a crash test victime for testing these ideas please let me know :lol:

 

RavenWulf

 

Where is the edit post button gone to?

 

Anyways RavenWulf just tried this idea out I see what you mean, it goes so far but order history splits orders into products, so I cannot just click a button to add say 10 items I had in wishlist previously.

 

I have a trade reptile products site and all customers are regulars and 99% order over 10 items and pretty much are recurring orders weekly, I dont want these customers browsing products 1 by 1 when they just need to repeat last order facility I though wishlist would do this for me, but it resets wishlist on checkout.

 

Thx any further hacks to wishlist would be appreciated.

Link to comment
Share on other sites

haha yes!! After 3 days of trying, it finally works!

 

Thank you to RavenWulf for pointing out that it was a problem with the SQL file.

 

Here's what I did:

 

Now please keep in mind that I'm a real newbie with MySQL...

 

When I looked at the SQL file that came with Wishlist 2.3 (that I tried installing), at the bottom of the SQL file it was missing a ";".

 

I dropped the wishlist tables in my MySQL database and then imported the wishlist.sql file with the ";" edited to the end. Now everything works perfectly.

Link to comment
Share on other sites

Oh and one other idea (this one's for you joker  :thumbsup: )

 

Since several people have wanted to keep items in the wishlist even when they are moved to the cart, etc..  Coould you add a check box into the db or something where the person could select a wishlist item to "lock" into the wishlist?  They currently have the option to Remove/Delete or to Move to Cart.  Could another option be added to "lock/or something or other" the item.  This way the customer could choose which items stay permentatly (or until "unlocked") and which don't.  From just my limited know how I can see a bit of coding on this (at the very least an addon to the move to cart option to do a check on "locked/unlocked" status.

 

Feel free to tell me I am way of base on these, but I think they might be some good ideas, and great addons to this awsome contribution. 

 

P.S. If you need a crash test victime for testing these ideas please let me know  :lol:

 

RavenWulf

RavenWulf

 

This sound absolute spot on exactly what I need m8y, thx for clearing it up in here for me and others, this is obviously a possible great addon feature to an already great addon to osc, all those guys who know what they are doin here, is this possible?

 

Elwyn :thumbsup:

Link to comment
Share on other sites

Glad to hear that you are up and running :thumbsup:

 

RW

 

haha yes!! After 3 days of trying, it finally works!

 

Thank you to RavenWulf for pointing out that it was a problem with the SQL file.

 

Here's what I did:

 

Now please keep in mind that I'm a real newbie with MySQL...

 

When I looked at the SQL file that came with Wishlist 2.3 (that I tried installing), at the bottom of the SQL file it was missing a ";".

 

I dropped the wishlist tables in my MySQL database and then imported the wishlist.sql file with the ";" edited to the end. Now everything works perfectly.

Link to comment
Share on other sites

Hi to everybody, do you excuse the trouble, but omeone has succeeded to resolve this problem?

 

When an user already logged tries to add a product to the wishlist, it comes redirect to the login screen and once referred the login he's not found anything in the wishlist.

 

Any solutions?

 

Tnx jo.

Link to comment
Share on other sites

Phobos,

 

I know I have this same problem on my test server (my local machine, running easyphp1-7.) but when I upload to my webserver everything works just fine. All I can think of is it has something to do with a server configuration. As it works on my website I really haven't looked into it much. Are you getting this problem on your "live" site, or just on a testing site?

 

RW

 

 

Hi to everybody, do you excuse the trouble, but omeone has succeeded to resolve this problem?

 

When an user already logged tries to add a product to the wishlist, it comes redirect to the login screen and once referred the login he's not found anything in the wishlist.

 

Any solutions?

 

Tnx jo.

Link to comment
Share on other sites

Joker,

 

 

You might try the below code in your application_top.php. With this code, the only way to remove an item from your wishlist is to select the delete radio in the actual wishlist. :thumbsup:

 

 

4. in /catalog/includes/application_top.php

Find:
-----
     // performed by the 'buy now' button in product listings and review page
     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;



Replace with
------------

     // performed by the 'buy now' button in product listings and review page
     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;


5. in /catalog/includes/application_top.php

Find:
-----

     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
   }
 }

// include the who's online functions

Replace with
------------

     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
// Wish List 2.3 Start
// *****************************************
     // Remove item from the Wish List
     case 'remove_wishlist':
                             tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
                             tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id= '" . $HTTP_GET_VARS['pid'] . "'");
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;
   } // end switch $HTTP_GET_VARS['action']
 } // end if is set $HTTP_GET_VARS['action']

 // Shopping cart actions through POST variables from forms
 if (isset($HTTP_POST_VARS['wishlist_action'])) {
   // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
   if ($session_started == false) {
     tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
   }

   $goto = basename($PHP_SELF);
   switch ($HTTP_POST_VARS['wishlist_action']) {
     // Customer wants to update the product quantity in their shopping cart
     case 'add_wishlist' :  if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                               if ($HTTP_POST_VARS['products_id']) {
                                 if ($customer_id > 0) {
           // Queries below replace old product instead of adding to queatity.
                                   tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                   tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )");
                                   tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                   // Read array of options and values for attributes in id[]
                                   if (isset ($id)) {
                                     foreach($id as $att_option=>$att_value) {
                                       // Add to customers_wishlist_attributes table
                                       tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )");
                                     }
                                   }
                                 }
                               }
                             }
                             break;

     case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                                 if ($HTTP_POST_VARS['products_id']) {
                                 if ($customer_id > 0) {
                                   // Read array of options and values for attributes in id[]
                                   if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                                      $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                                   }
                                   tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                                   break;
                                 }
                               }
                             }
                             break;

      // Wishlist Checkboxes
      case 'add_delete_products_wishlist': 
                                     if (isset($HTTP_POST_VARS['add_wishprod'])) {
                                        if ($HTTP_POST_VARS['borrar'] == 0) { 
                // 'borrar' form variable refers to deleting products in array $add_wishprod[] from wishlist
                                              foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
                                                   if (ereg('^[0-9]+$', $value)) {
                                                   $cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id'][$value]))+1, $HTTP_POST_VARS['id'][$value]);
                                                   }
                                              }
                                            tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                                        }
                                        if ($HTTP_POST_VARS['borrar'] == 1) {
                                              foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
                                                   if (ereg('^[0-9]+$', $value)) {    
                                                    tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");
                                                   tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '$value' and customers_id = '" . $customer_id . "'");
                                                  }
                                             }
                                            tep_redirect(tep_href_link(FILENAME_WISHLIST));
                                        }
                                     }
                                     break;

   } // end switch ($HTTP_POST_VARS['wishlist_action'])
 } // end isset($HTTP_POST_VARS)
// *****************************************
// Wish List 2.3 End

// include the who's online functions

 

 

I have modified the original code to do what I think your looking for. Let me know if this works for you...

Link to comment
Share on other sites

Hello BearHappy!

The code you've posted works for me!! Thanks!!! :D Hope it works for Joker too!

 

But I've got a small problem : when I put more than 4 products in the wishlist they dissapear and it displays : you have x number of products in your wishlist.

 

Where can I put the number of max products I would like to be displayed in the wishlist box?

 

Thanks!!!!

 

 

Mujina

Edited by mujina

OSC2.2

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