Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 2.0 Support Thread


defender39

Recommended Posts

see the post from cmastere

 

MEL:

 

 

I think the best way for you to do this is restore your application_top.php and do the installation again. It is very possible that you've accedently deleted a line after the // include the who's online functions (that's where one of the modification ends), if you've done the installation correctly, you should not have this problem.

Link to comment
Share on other sites

Jay, first of all, you should not modify that line, because if the customer is not login, they don't have a customer ID, and if you remove that line, the computer will try to grab the customer ID that does not exist and return an error (I think). If you want that box to show, then you have to code it with the condition incase that the customer ID don't exist. And about your secod question, require and includes basically is the same thing, the only difference is, when the code use "Require" , what ever it's requiring must be there or else you'll get an error, and if the code use "Includes", it'll just continue the rest of the codes without whatever it's trying to includes if the codes is not there. Anyway, whatever you do, you need to know who the customer is to show him what he's wishing for right? So the best way for you to do this is to show the "Add Wishlist" option on your product page, and if the customer wants to add the item to their wishlist (by clicking on the add to wishlist icon without logging in) , it'll take them to the login page and force them to create an account or log in as an existing customer. You do this by modifing the line you've modified for wishlist in product_info.php by getting rid of the if (tep_session_is_registered('customer_id')) :

 

Here's the original modify code :

 

<!-- Begin Wishlist Code -->

<td align="left" class="main"><?php if (tep_session_is_registered('customer_id')) echo '<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">' . tep_image_button('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST) . '</a>'; ?></td>

<!-- End Wishlist Code -->

 

 

 

Here's what you need use :

<!-- Begin Wishlist Code -->

<td align="left" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">' . tep_image_button('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST) . '</a>'; ?></td>

<!-- End Wishlist Code -->

Link to comment
Share on other sites

Hey all,

 

I have just upload an update to Wishlist 2.0 which allows you to send a link to your wishlist instead of the individual links to products. Your friend can now simply add your items right to their cart. I also included my shopping_cart.php which places the wishlist right below the cart total.

 

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

 

Let me know what you think, or of any problems in the process...

Link to comment
Share on other sites

has anyone figured out how to add the wishlist code into the product info template page (which is in html) product_info.php.html

 

This is of course using the STS Contribution by diamondsea

 

I have tried so many different times, can anyone just point me in the right direction on this one

Edited by chrisstylez
Link to comment
Share on other sites

  • 2 weeks later...

Hi, I've installed wish list in MS 2.2 but in the page there are 6 wishlist boxes, I use also infobox contribution, this is the code of column_right.php:

 

 

<?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');
if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'wishlist.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>

Link to comment
Share on other sites

  • 2 weeks later...

I installed the Wishlist 2.0 as my second mod - the first was the attributes sort, so they don't really conflict as far as files go.

 

My problem is that my wishlist is blank. It says:

 

Displaying 1 to 3 (of 3 items on your wishlist) Result Pages: 1

 

And then the page is completely blank.

The wishlist box is blank as well.

 

Any one have any ideas?

Tara Lang

Link to comment
Share on other sites

Just to add on to my question:

 

I went into phpMyAdmin and into the customers_wishlist table. There are three completely blank records there. Customer ID = 2, and the prices are all 0.00, so it's not getting written correctly to the database.

Tara Lang

Link to comment
Share on other sites

OK, I've narrowed it down again :)

 

In version 2.0.2, it says:

in product.info (which should say product_info.php, btw)

 

Add

---

              <!-- Begin Wishlist Code -->

                <td align="left" class="main"><?php if (tep_session_is_registered('customer_id')) echo '<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">' . tep_image_button('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST) . '</a>'; ?></td>

              <!-- End Wishlist Code -->

 

(NB: You can add the button wherever you like - unlike previous versions, this does not interfere with cart form :)

in version 2.0.1 it says

5. in /catalog/product.info somewhere after your "add to cart" form ends (or if you prefer before it) add the following lines (please back this file up as I am really unsure of where it should go in a basic MS1 or MS2, mine is really hacked apart):

 

<td align="right" class="main"><?php echo tep_draw_form('wishlist_quantity', tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist')); ?>

          <?php if (tep_session_is_registered('customer_id')) echo tep_draw_hidden_field('products_id', $product_info_values['products_id']) . tep_image_submit('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST); ?></td>

 

The code for 2.0.2 is adding a blank record to my wishlist, if I remove it and use the code from 2.0.1 it works fine. However, I'd like to be able to add to wishlist from WITHIN the form, so I'm wondering how to make the code from 2.0.2 work?

 

TIA.

Tara Lang

Link to comment
Share on other sites

  • 2 weeks later...

Hello

I too am getting the following error message:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/virtual/XXX/fst/var/www/html/catalog/includes/functions/database.php:13) in /home/virtual/XXX/fst/var/www/html/catalog/includes/functions/database.php on line 13

 

can anyone help me out?

Greatly aprreciated!

Link to comment
Share on other sites

I am using 2.2-MS 2 and contribution posted on 7 May 2004 (Wish List v22c MS2.zip).

 

When I do this:

 

<?php
 $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " where customers_id = '" . $customer_id . "' order by products_name";
//  $wishlist_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_WISHLIST_PRODUCTS, $wishlist_query_raw, $wishlist_numrows);
 $wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);
 $wishlist_query = tep_db_query($wishlist_split->sql_query);
?>

 

I get this:

 

MWL-issues1.gif

 

When I do this:

 

<?php
 $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " where customers_id = '" . $customer_id . "' order by products_name";
 $wishlist_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_WISHLIST_PRODUCTS, $wishlist_query_raw, $wishlist_numrows);
//  $wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);
 $wishlist_query = tep_db_query($wishlist_split->sql_query);
?>

 

I get this:

 

1064 - 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 'select * from customers_wishlist where customers_id = \'2\' ord

 

select count(select * from customers_wishlist where customers_id = \'2\' order by products_name) as total

 

[TEP STOP]

 

When I do this:

 

<?php
 $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " where customers_id = '" . $customer_id . "' order by products_name";
//  $wishlist_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_WISHLIST_PRODUCTS, $wishlist_query_raw, $wishlist_numrows);
//  $wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);
 $wishlist_query = tep_db_query($wishlist_split->sql_query);
?>

 

I get this:

 

1065 - Query was empty

 

[TEP STOP]

 

So...how can I fix this? Am I totally missing something? I've read this thread what seems like a million times...

 

Any help is appreciated.

Link to comment
Share on other sites

I have a good idea as an add on for this Contribution but have been struggling to write it as I am not the best with SQL queries and joins. It would be really cool to have a page in Admin where you can view your customer's wishlists - what products are on them, date created, etc. Anyone interested in taking this on? It would be a really helpful addition to this already wonderful Contribution.

 

Thanks,

Aaron

Link to comment
Share on other sites

It would be really cool to have a page in Admin where you can view your customer's wishlists - what products are on them, date created, etc.

 

I would be interested in the same ability also...

 

But I can not write it either. :(

 

 

Boyd

Link to comment
Share on other sites

Aaron thats a great idea, but also with maybe away to sort the products across all customers .....most popular product in wishlist. Cause then you could do something about getting it at a better price for them or something.

 

Maybe enough interested people could chip in and pay someone for their time to write it.

Gecko

this time it'll go :-)

Link to comment
Share on other sites

I have installed this contribution and customised it to my site and it works great. I have also read through this entire forum as I went and just have one remaining request that has not been fixed yet (as far as I can see):

 

Customers visiting your shop would think that this is a great thing to have, but as stated time and time again there is no reference to this unless signed in.

 

Can the next upgrade include as others have suggest an 'add to wish list' in the product info without being logged in.

 

Clicking on this should of course prompt the login screen.

 

If this has been done by anyone, could you please share the code with me?

 

Also when you are in your wishlist there should be a button to continue shopping, I think I can add this myself though.

 

I did set up the mod that sends an email with a link back to your entire wish list on site, but all I kept getting was 'your wish list is empty'. Could not get this to work.

 

This is a great contrib with just a couple of tweaks left.

Link to comment
Share on other sites

Hi Guys,

 

I just installed this great contribution but I have one problem. When I add products to the wishlist, it would display the products but I am missing the right column. When I have no products in the wishlist, both the right and left column will show up. Does anyone have any clues?

 

Thanks in Advance,

StrictlyPC

Link to comment
Share on other sites

Hi there,

 

Has anyone modified this contrib to work with options/attributes....if so please post the necessary changes/additions to the mysql and the required php files.....

Link to comment
Share on other sites

  • 2 weeks later...
I have just done a clean install of 2.2. And get the same error as below.

 

Rob,

 

1. A couple of issues with the latest.

The images are still not showing up.? I created images, but when I updated, they were gone again)

 

2. You missed 2 lines in english.php

 

define('BOX_TEXT_MOVE_TO_CART', 'Add to Cart');

define('BOX_TEXT_DELETE', 'Remove from Cart');? ? ? Or whatever wording..

 

This is what displays in the wislist:

 

Wishlist?

 

 

Send your Wishlist to a friend.

 

 

Displaying 1 to 2 (of 2 items on your wishlist) Result Pages:? 1?

 

There are NO items showing...just the line saying displaying, but nothing is displayed.

 

Vin

Try using v2.2 if you like.

I am still getting tihs error and I have followed the instructions 03/05/04 - Incoporated Ruben's Contrib.

 

I had to remove it because this problem couldn't be solved..

Link to comment
Share on other sites

  • 2 weeks later...

I have getting this Error whenever i try to add a product to my wishlist or if i try to view it.

 

 

Warning: Division by zero in /html/apache/htdocs/includes/classes/split_page_results.php on line 59
1064 - 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 'MAX_DISPLAY_WISHLIST_PRODUCTS' at line 1

select * from customers_wishlist where customers_id = '2' order by products_name limit -0, MAX_DISPLAY_WISHLIST_PRODUCTS

[TEP STOP]

 

 

Can anyone post detailed steps on how to correct this error.

Link to comment
Share on other sites

Hi guys,

 

There is a long time I'm thinking about doing some hack to this contrib to make the wish list avaible to third people (I think it is the main purpose of it) and I need some help to make right.

 

Here is how I was thinking to do it:

 

1. to make avaible to the others, add a field with the customer ID if not logged in. so people who are receiving the wishlist by email will be able to see it. and if it is the owner of the wishlist, to grab automaticly its Customer ID.

 

2. Add a line for the email saying " to see this wishlist use this code:XXX"

 

3. make a little hack on the wishlist page as the shopping cart that if the third party is buying the stuff the wishlist will change its status to a little phrase saying " this Item has been baught by one of your relative".and if the customer doesn't confirm his order the status will remain the same.

I think the button move to the shopping cart + the wishlist ID could help it.

 

I guess this hack doesn't need a lot of work but as far as I can see, this needs to now the code well (not my case).

 

Can anyone help or suggest? <_<

Link to comment
Share on other sites

I know I am not one of you $6,000 an hour code jocks and I apologize if this is like a stupid question, but I have searched everywhere, web, php.net, various versions of the source, this thread etc .. and I just can't find it anywhere

Does anyone know where or what $lvnr and $lvanz are set to or set from?

they are used here in app top

// 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_POST_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($goto, tep_get_all_get_params($parameters), 'NONSSL'));
                             break;

(my knowledge is so small you would think that an ant was a genius in comparison)

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