Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 2.0 Support Thread


defender39

Recommended Posts

Hello, good work for the Repack, Easy to Install :)

 

I still have the problem with the InfoBox-Admin Contrib.

This error message with Guest go:

1064 - You have an error in your SQL syntax near 'order by products_name' at line 1

select * from customers_wishlist WHERE customers_id = order by products_name

[TEP STOP]

 

Logging Users ok, no failure Message.

 

The problem seems to lie here:

 

8. look for this line in /catalog/includes/column_right.php:

After
-----

?require(DIR_WS_BOXES . 'shopping_cart.php');
Add
---

?// Wish List 2.3 Start
?if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'wishlist.php');
?// Wish List 2.3 End

Is there already a solution?

LG Fallout

 

check that you added the line/s to the confiqure file

Link to comment
Share on other sites

check that you added the line/s to the confiqure file

 

Yes, the entry is in the Configure.php

 

 

  // Wish List 2.3 Start
 define('MAX_DISPLAY_WISHLIST_PRODUCTS', '6'); // How many wishlist items to show per page on the main wishlist.php file
 define('MAX_DISPLAY_WISHLIST_BOX', '4');      // How many wishlist items to display in the infobox before it changes to a counter
 // Wish List 2.3 End

 

 

In a old Store without the InfoBox Admin works the Wishlist Contrib Perfectly.

 

 

The problem lies with this entry,

  if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'wishlist.php');

 

The column_right.php with the InfoboxAdmin looks so:

<?php
/*
 $Id: column_right.php,v 1.15 2002/03/13 13:52:20 lango Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/


 $column_query = tep_db_query('select configuration_column as cfgcol, configuration_title as cfgtitle, configuration_value as cfgvalue, configuration_key as cfgkey, box_heading from ' . TABLE_THEME_CONFIGURATION . ' order by location');
 while ($column = tep_db_fetch_array($column_query)) {

     $column['cfgtitle'] = str_replace(' ', '_', $column['cfgtitle']);
     $column['cfgtitle'] = str_replace("'", '', $column['cfgtitle']);

if ( ($column[cfgvalue] == 'yes') && ($column[cfgcol] == 'right')) {

define($column['cfgkey'],$column['box_heading']);

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {
require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');
} 
}
}
?>
<tr>
                   <td class="pageHeading" height="100%" valign="top">
<?php 
if ( file_exists('includes/classes/thema/' . SITE_THEMA . '/images/backend.gif')) {
?>
<IMG SRC="includes/classes/thema/<?php echo SITE_THEMA;?>/images/backend.gif" width="100%">
<?php
}
?>
                   </td>
                 </tr>

 

 

 

LG Fallout

Link to comment
Share on other sites

Jorge Ortiz,

 

Thank you for releasing WishList v2.3. For the longest time I have been playing with it and it has worked on and off depending on what changes I tried to make based on what I was able to understand in the forums.

 

This release I went back and installed per your easy to understand directions removing the old code and it worked first time :)

 

Thanx again!

...Steven

Link to comment
Share on other sites

Wish List 2.3 Consolidated

http://www.oscommerce.com/community/contributions,1682

 

It includes all the updates and add-ons to the wishlist.? You should be able to use just this contribution to install the Wish List...

Finally :P

 

Enjoy!

 

~Jorge

 

 

Not sure if anyone is interested or not, but I just got done doing an update to wishlist from the 2.2 version (w/attributes addon also installed) to the new repack 2.3 version.

 

It was very easy, very straight forward and went wonderfully. So far I have tested it on both my local test server and my webserver.

 

To those having the problem with the login contribution. do you want the wishlist for both logged in and guests????

 

I know that I only have it so that is shows for those ppl that are logged in.

 

or is it that you want it only for logged in, but is still shows an error for the guest?

 

I am by no means a php wiz (more of a php fiz LOL) but it would seem to me that if that one line is giving you a problem maybe you could turn it in to a conditional statement with

 

IF blah blah logged in them dir_wishlist.php

 

ELSE

 

(here I am at a loss of how to tell it NOT to include that file) but if you could do it then a guest would never have a call placed to that file

 

ummm please feel free to tell me I am way off on this one, like I said I really don't know php very well. Just trying to offer some kind of perspective (however fuzzy LOL)

 

RavenWulf.

Edited by RavenWulf
Link to comment
Share on other sites

Yes, the entry is in the Configure.php

 ?// Wish List 2.3 Start
?define('MAX_DISPLAY_WISHLIST_PRODUCTS', '6'); // How many wishlist items to show per page on the main wishlist.php file
?define('MAX_DISPLAY_WISHLIST_BOX', '4'); ? ? ?// How many wishlist items to display in the infobox before it changes to a counter
?// Wish List 2.3 End

In a old Store without the InfoBox Admin works the Wishlist Contrib Perfectly.

The problem lies with this entry,

 ?if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'wishlist.php');

 

The column_right.php with the InfoboxAdmin looks so:

<?php
/*
?$Id: column_right.php,v 1.15 2002/03/13 13:52:20 lango Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2002 osCommerce

?Released under the GNU General Public License
*/
?$column_query = tep_db_query('select configuration_column as cfgcol, configuration_title as cfgtitle, configuration_value as cfgvalue, configuration_key as cfgkey, box_heading from ' . TABLE_THEME_CONFIGURATION . ' order by location');
?while ($column = tep_db_fetch_array($column_query)) {

? ? ?$column['cfgtitle'] = str_replace(' ', '_', $column['cfgtitle']);
? ? ?$column['cfgtitle'] = str_replace("'", '', $column['cfgtitle']);

if ( ($column[cfgvalue] == 'yes') && ($column[cfgcol] == 'right')) {

define($column['cfgkey'],$column['box_heading']);

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {
require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');
} 
}
}
?>
<tr>
? ? ? ? ? ? ? ? ? ?<td class="pageHeading" height="100%" valign="top">
<?php 
if ( file_exists('includes/classes/thema/' . SITE_THEMA . '/images/backend.gif')) {
?>
<IMG SRC="includes/classes/thema/<?php echo SITE_THEMA;?>/images/backend.gif" width="100%">
<?php
}
?>
? ? ? ? ? ? ? ? ? ?</td>
? ? ? ? ? ? ? ? ?</tr>

LG Fallout

 

 

Oh wait, had another idea...in looking at the posted file for the admin contribution is "seems" to me that it only looks in the Boxes dir, and will take all of them. it doesn't care if something else says don't use it..it will still add it in. Soooo I would add the conditional statement to THAT file on the line where is says:

 

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {

require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');

 

 

this is where you could "theoretically" sp? tell it to take all boxes "except" wishlist for a guest, or to take all boxes for a logged in person.

 

again sorry if I am all off on this, I am just teaching myself php and looking at as much code as possible (LOL, can't speak a foreign language to save my life, but can talk computers for ever). Anyway that is what it looks like to me. The error is in the login contribution and not wishlist.

 

 

If you wanted an easy fix (again just shooting in the dark here) you could make it so the wishlist shows for guests also, then the call from the login contribution would not cause any errors.

Link to comment
Share on other sites

Hi All

 

Can anybody answer a few questions for me regarding the wishlist contribution.

 

1, Can the products on your wishlist be sorted by numerical order

2, If so, can a customer move the order position, ie has a product at position 5 but wants to move that upto position 1

3, Can Admin view/edit a customers wishlist

 

Thanks in advance

 

Mike

 

 

anybody?

Link to comment
Share on other sites

Hello RavenWulf,

 

thanks you for your help . This unfortunately doesn't help me along where this must be changed?

 

(

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {

require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');

)

 

In which file?

 

LG

 

 

 

Oh wait, had another idea...in looking at the posted file for the admin contribution is "seems" to me that it only looks in the Boxes dir, and will take all of them. it doesn't care if something else says don't use it..it will still add it in.  Soooo I would add the conditional statement to THAT file on the line where is says:

 

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {

require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');

this is where you could "theoretically" sp? tell it to take all boxes "except" wishlist for a guest, or to take all boxes for a logged in person.

 

again sorry if I am all off on this, I am just teaching myself php and looking at as much code as possible (LOL, can't speak a foreign language to save my life, but can talk computers for ever).  Anyway that is what it looks like to me. The error is in the login contribution and not wishlist.

If you wanted an easy fix (again just shooting in the dark here) you could make it so the wishlist shows for guests also, then the call from the login contribution would not cause any errors.

Link to comment
Share on other sites

 

Hey Mike, here are the answers to your questions (that I think are correct, as I didn't make this wonderful contrib I could be wrong)

 

1, Can the products on your wishlist be sorted by numerical order

----- No as far as I can see they are in there in the order they are added

 

2, If so, can a customer move the order position, ie has a product at position 5 but wants to move that upto position 1

------ No since there is no sorting going on, they can't change positions

 

 

3, Can Admin view/edit a customers wishlist

------ No they only thing admin CAN do is limit how many products show on the wishlist page, and how many are listed in the box.

 

Your ideas though are great suggestions!

 

Hope this helps,

RavenWulf

Link to comment
Share on other sites

Hello RavenWulf,

 

thanks you for your help . This unfortunately doesn't help me along where this must be changed?

 

(

if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {

require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');

)

 

In which file?

 

LG

 

 

Hey Fallout, sorry for not being more specific on which file (was 1am, and I was on my way to bed.) :)

 

I believe it is located in:

The column_right.php with the InfoboxAdmin

 

This is the file that you posted the contents of further up in this topic area I belive. That is where I read the code from as I don't have that InfoboxAdmin contribution installed.

 

Hope that helps, I wish I could tell you more, but since I don't know what exactly the code should be I can only point out areas that "look" like that need changing.

 

RavenWulf

Link to comment
Share on other sites

Hey Mike,  here are the answers to your questions (that I think are correct, as I didn't make this wonderful contrib I could be wrong)

 

1, Can the products on your wishlist be sorted by numerical order

----- No as far as I can see they are in there in the order they are added

 

2, If so, can a customer move the order position, ie has a product at position 5 but wants to move that upto position 1

------ No since there is no sorting going on, they can't change positions

3, Can Admin view/edit a customers wishlist

------ No they only thing admin CAN do is limit how many products show on the wishlist page, and how many are listed in the box.

 

Your ideas though are great suggestions!

 

Hope this helps,

RavenWulf

 

 

Raven

 

Thanks for your reply

 

I do think these would be great features to add to the wishlist for a number of reasons.

 

Lets say a customer wanted to make a "wedding list" they could sort the list so that the stuff they wanted most is at the top of the list.

 

Also, from the Store owner side, the information contained in the wishlist is very useful in relation to stock levels. You could have 100 wishlists which all contain the same product/s.

 

Just some thoughts on improving it and adding more functionality

 

Cheers

 

Mike

Link to comment
Share on other sites

Hi everyone, first post in here been using the l8test wishlist gret contrib, great work thx, but one little question could I have the wishlist available even after checkout, ie not reset itself, my idea is for regular customers to use the wishlist as a regular order feature list.

 

I have a lot of regular customers who place orders with the same products every week, I want to all ow them the ability to add or remove but mainly just select wishlist and checkout everyweek, like a fast checkout.

 

I hope I explained ok, thx in advance.

Link to comment
Share on other sites

Hi everyone, first post in here been using the l8test wishlist gret contrib, great work thx, but one little question could I have the wishlist available even after checkout, ie not reset itself

Hi j0ker,

 

The wishlist currently does that. It will remain available until the items are specifically removed from the wishlist (or moved to the shopping cart)

~Jorge

Link to comment
Share on other sites

I am getting a database error message when a user who is logged in clicks on the buy it now button they get the following error message. But if the user is not logged in and they click on it it gets added to their cart. How do I fix this?

 

CODE1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

delete from customers_wishlist WHERE customers_id=1 AND products_id=

[TEP STOP]

 

Thanx

Link to comment
Share on other sites

Hi j0ker,

 

The wishlist currently does that. It will remain available until the items are specifically removed from the wishlist (or moved to the shopping cart)

~Jorge

 

jorgeo thx for that, I understand this, but what I need is to allow checkout, but still keep the wishlist active for next visit like a repeat order solution, any thoughts, thx in advance. :thumbsup:

Link to comment
Share on other sites

Sorry couldnt edit last post above.

 

I have been looking through the wishlist code and although its above me, when the wishlist is added to checkout, I dont want the wishlist reset, is this possible with a hack to the code?

 

Thx in advance..

Link to comment
Share on other sites

This contrib woks fine for me but when I email the wishlist no link appear in the mail. I've installed tha LAST version...

 

Does anyone still have the same problem?

 

Moreover, did anyone succeed in sharing the wishlist?

 

thanks a lot and congratulations to the authors!!!

 

mujina :D

OSC2.2

Link to comment
Share on other sites

Ok, I did some major modifications to OSC so that inactive products display in the catalog as if they are active (except you can't add them to cart).

 

I then installed Wish List v2.3 MS2.2 and everything works fine, except you can't add an inactive product to your wishlist. The modifications I made to OSC to display inactive products is explained in more detail here - http://www.oscommerce.com/forums/index.php?showtopic=119195.

 

What I need to know is where in Wish List can I make a similar modification so that it ignores product status or quatity when you want to add it to your wish list.

 

Thanks

Link to comment
Share on other sites

jorgeo thx for that, I understand this, but what I need is to allow checkout, but still keep the wishlist active for next visit like a repeat order solution, any thoughts, thx in advance. :thumbsup:

 

in /catalog/includes/application_top.php:

find:

      case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                                 if ($HTTP_POST_VARS['products_id']) {
                                 if ($customer_id > 0) {
                                   tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                   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[]

 

Replace with

 

      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[]

 

That will keep the items in your wishlist even if they move them to the shopping cart

Link to comment
Share on other sites

I still haven't figured out how to add inactive products to the wishlist.

 

Also, how can I make the send to a friend a submit button with a set email instead?

Link to comment
Share on other sites

Ok, I figured it all out, but please please don't ask me how since I've lost track of all the changes that I made. The good news is that the problem was in the changes I made to product_info.php and not Wish List.

 

Now the only problem I still have is that when I try to email my wishlist, the list doesn't appear in the email (or links or anything except for Hello, blablabla, thank you). Also, I would still like to make the send to a friend a submit to a fixed email button.

 

Anybody ... please

Link to comment
Share on other sites

Ok, I figured it all out, but please please don't ask me how since I've lost track of all the changes that I made. The good news is that the problem was in the changes I made to product_info.php and not Wish List.

 

Now the only problem I still have is that when I try to email my wishlist, the list doesn't appear in the email (or links or anything except for Hello, blablabla, thank you). Also, I would still like to make the send to a friend a submit to a fixed email button.

 

Anybody ... please

 

Hello Green Mambaa!

 

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

OSC2.2

Link to comment
Share on other sites

[/code]

in /catalog/includes/application_top.php:

find:

 ? ? ?case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if ($HTTP_POST_VARS['products_id']) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if ($customer_id > 0) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?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[]

 

Replace with

 

 ? ? ?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[]

 

That will keep the items in your wishlist even if they move them to the shopping cart

 

:thumbsup: Many thx fo rthe time, many thx, however it seems I must be running an old version of wishlist so the code doesnt match 100% but just a question, this is my code in application_top first:

// begin mod for Wishlist v2.2
// Add product to the wishlist
     case 'add_wishlist' :   if (ereg('^[0-9]+$', $HTTP_GET_VARS['products_id'])) {
                               if ($HTTP_GET_VARS['products_id']) {
                                 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_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_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;
                             
// Add wishlist item to the cart
     case 'wishlist_add_cart': reset ($lvnr);
                               reset ($lvanz);
                                 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 = '" . $elem . "' and products_quantity<>'0'");

                                 while ($HTTP_GET_VARS=mysql_fetch_array($produkte_mit_anzahl))
                                 {
                                 $cart->add_cart($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['products_quantity']);
                                 }
                                         }
                               reset ($lvanz);
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;

// remove item from the wishlist
     case 'remove_wishlist':
                             tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;
// end mod for Wishlist v2.2

 

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

 

case 'add_wishlist' :   if (ereg('^[0-9]+$', $HTTP_GET_VARS['products_id'])) {
                               if ($HTTP_GET_VARS['products_id']) {
                                 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

 

Many thx in advance :thumbsup:

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