Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 2.0 Support Thread


defender39

Recommended Posts

Found it, minor error in the install text regarding application_top.php ...

 

// include the who's online functions
?>

 

 

that 2nd line shouldn't be there at all. Removed it and the mod seems to work great. Just going to make some cosmetic changes and I'm on my way. :)

Link to comment
Share on other sites

:huh:

 

Can some one tell me what did I do wrong or what's going on here please, ....

 

temp8.gif

 

1. I notice that it's trying to call the name of the box and such, however, it fails to do so, and is costing my right column to be abnormally wide (I think)

 

2. I see that items has been added to the data base ok, however, it's not showing up on the screen.

 

 

Thanks! B)

Link to comment
Share on other sites

Hi Guys, never mind on the first question, I found out why, I did the replacement file by draging the folder to FTP, and I have "Languages" instead of "languages" as the folder name so the replacement never got to the right place... I been checking and wondering what's going on... I thought I've defind it in english.php already.... :) ... Anyway, but the second problem still exist:

 

temp9.gif

 

1. I though if I have more than 4 items, it suppose to show up below the " My Wishlist [+]" ?

 

2. The items in wish list table are still not showing up on the page...

 

 

Please help..... ... Thanks.

Link to comment
Share on other sites

is there a way to format the wishlist code in html rather than php.

becuase im trying to use the wishlist with the STS product info template

 

is there a way i can just attach this code to a button?

 

<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">

Link to comment
Share on other sites

Hi Guys, I'm still having problem.. Please Help... this is what I've found out today, I notice that when I click on the "Add to Wishlist" button on the product information page, only the customer ID was send to the database table but not the product model number and name See Picture below :

 

temp10.gif

 

I hope this help...

Link to comment
Share on other sites

Hi Jon, Gabriel,

On my site, this is working fine, and ALSO has these columns empty.

 

To troubleshoot the issue, can you please do a view source in your browser, and then look at the lines between

<!-- customer_wishlist //-->

and

<!-- tell_a_friend //-->

 

this should give a clue if there's an issue with the display (table layout), or the actual retrieval of the data.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi Jon, Gabriel,

On my site, this is working fine, and ALSO has these columns empty.

 

To troubleshoot the issue, can you please do a view source in your browser, and then look at the lines between

<!-- customer_wishlist //-->

and

<!-- tell_a_friend //-->

 

this should give a clue if there's an issue with the display (table layout), or the actual retrieval of the data.

 

hi bruyndoncx, it would be kind of you if you can explain what you have done, to solve this problem, because i got the same here.

Link to comment
Share on other sites

Hi all,

 

I don't know why there are so many problems, it's still fine on my version. I haven't tried it with the STS contrib, so I don't know if that is causing a problem.

 

However in light of all the problems that people are having. I'm going to do a fresh install and start working on the update of the contribution and the updates to the install.txt

 

Hopefully I'll post a full complete working version in the next few days.

Link to comment
Share on other sites

Hi@all,

I found out, that the problem is only, when i have the "search engine friendly url" at "on". When it is "off", there are no problems with this wonderfull contrib.

Why??????

 

But, Thanks to the worker of this contrib!!!

 

greatings from Germany

Asmus

Link to comment
Share on other sites

Hi,

now it works on my site with this change in application_top.php:

---------------------------------------------------------------------------

tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $HTTP_GET_VARS['products_id'] . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )");

-------------------------------------------------------------------------------------

Thanks to Ingo Malchow from Germany

 

Greetings from Asmus

Link to comment
Share on other sites

I haven't even had a chance to start on the update that I mentioned, as my hard drive died. eurabia Please feel free to add the change into the contrib (don't forget to change the install.txt) and upload it. It will save me having to re-write the whole thing.

 

Thanks

 

Craig

Link to comment
Share on other sites

i did the necessary installations, but nothing changed.

the problem is the same. now there appeared another problem,

that the button "buy now" does not has any function, when i'm logged in.

 

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

delete from customers_wishlist WHERE customers_id=2 AND products_id=

[TEP STOP]

 

:unsure:

Link to comment
Share on other sites

Hi Guys, thanks for all of your help, (expecially Asmus :) ), and Craig, thank for your contribution and hard work, it is appreciated. Yes indeed that is the problem, I knew it has something to do with the $HTTP_GET_VAR . B) , Can't believe I didn't catch that... anyway, since you guys are all busy and I've made the changes to the installation instruction already, I'll put it up here, Again, thanks guys!

 

_________________________________________________________________

 

 

03/05/04 - Incoporated Ruben's Contrib, but moved it around a little to stop the

negative paging issue (when nothing is in the wishlist) that effects some users. - Craigey

 

29/04/04 - some bugfixes to Wishlist for osC - craig freeman - craigey

 

Changes to Wishlist 2.0.1 by Rob Woodgate 29/3/04

- Added fixes in Support Thread to date for MS2

- Various other fixes including proper pagination of wishlist and errors when no items in wishlist.

 

Changes to Wishlist 2.0 by Jesse Labrocca http://www.videogamedeals.com for live site demo 11/22/2003

 

 

Changes to Wishlist for osC Version 2.2-MS1 by JOHNSON v1.3

 

Copyright © 2003 Matti Ressler - [email protected] 2.2-MS1

 

Released under the GNU General Public License

 

 

This is a complete install for MS2.

 

 

To install:

 

1. run the wishlist.sql in phpmyadmin to update your sql tables

 

2. Upload all the original files as the are into your catalog directory.

 

3. Make the next set of custom changes file by file:

 

THis might seem complicated but its not. Follow instructions carefully and BACKUP any files you changes FIRST! This is SUPER IMPORTANT.

 

 

 

1. in /catalog/includes/filenames.php add this line:

 

//Wishlist

define('FILENAME_WISHLIST_SEND', 'wishlist_email.php');

define('FILENAME_WISHLIST', 'wishlist.php');

define('FILENAME_WISHLIST_HELP', 'wishlist_help.php');

 

2. in /catalog/includes/languages/english.php add the following lines:

 

// wishlist box text in includes/boxes/wishlist.php

define('BOX_HEADING_CUSTOMER_WISHLIST', 'My Wishlist');

define('BOX_WISHLIST_EMPTY', 'You have no items on your Wishlist');

define('IMAGE_BUTTON_ADD_WISHLIST', 'Add to Wishlist');

define('TEXT_WISHLIST_COUNT', 'Currently %s items are on your Wishlist.');

define('TEXT_DISPLAY_NUMBER_OF_WISHLIST', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> items on your wishlist)');

define('BOX_HEADING_CUSTOMER_WISHLIST_HELP', 'Wishlist Help');

define('BOX_HEADING_SEND_WISHLIST', 'Send your Wishlist');

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

define('BOX_TEXT_DELETE', 'Delete');

 

 

3. in /catalog/includes/database_tables.php add the next set of lines:

 

//Wishlist

define('TABLE_WISHLIST', 'customers_wishlist');

 

 

4. 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'])) {

// begin mod for Wishlist v2.2

tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");

// end mod for Wishlist 2.2

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;

// 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 . "', '" . $HTTP_GET_VARS['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

}

}

 

// include the who's online functions

 

 

 

 

 

 

5. in /catalog/includes/application_top.php

 

After

-----

 

 

// customer adds a product from the products page

case 'add_product' : 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;

 

 

 

Add

---

 

// Modificacion Wishlist Checkboxes

case 'add_products_wishlist' : if (isset($HTTP_POST_VARS['add_wishprod'])) {

if ($HTTP_POST_VARS['borrar'] == 0) {

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 . "'");

$cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

}

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_redirect(tep_href_link(FILENAME_WISHLIST));

}

}

break;

// Fin Wishlist Checkboxes

 

 

 

 

 

 

 

 

6. in /catalog/includes/application_top.php

 

After

-----

 

// performed by the 'buy now' button in product listings and review page

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

 

 

Add

---

//Wishlist 2.0.1 Modification

if (tep_session_is_registered('customer_id')) { tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$products_id"); }

// End Wishlist 2.0.1 Modification

 

 

7. in /catalog/product_info.php

 

After

-----

 

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

 

 

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 :)

 

 

 

8. add to /catalog/includes/configure.php the following lines:

 

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

 

 

 

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

 

require(DIR_WS_BOXES . 'shopping_cart.php');

 

now add this on the next line:

 

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

 

 

 

Enjoy!

 

______________________________________________________________-

Link to comment
Share on other sites

now there appeared another problem,

that the button "buy now" does not has any function, when i'm logged in.

:(

 

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 '' at line 1

delete from customers_wishlist WHERE customers_id=2 AND products_id=

[COLOR=red][TEP STOP][/COLOR]

Link to comment
Share on other sites

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]

 

OK - i installed according to the install.txt in the download. Got that mistake.

Changed application_top according to post on previous page (and the other files) - but still get this SQL error - where? Why?

 

HELP ... :o

 

Mel

Edited by Potzblitz
Link to comment
Share on other sites

thanks for the great contribution. i've installed three or four different versions now and i've read the entire forum.

 

here's my question. what would it take to make this work with SEF urls? because as mentioned by several people here, what happens if you have SEF urls turned on is that a record is added to the customer_wishlist table, but it has no data in it. turn off SEF urls and it works fine.

 

i will help if i can. i know a bit of perl and regular expressions. just curious about the future development of the contribution. and if this fix already exists.

 

thanks,

josh

 

edited for a typo

Edited by ffffffffffffff
Link to comment
Share on other sites

OK - I THINK the changes in application_top are not 100% ok yet.

PLUS they seem to interfere with "whois_online".

 

Normally in Whois_online, I get shown what current visitors have in their baskets. With the changed application_top, it doesnt show anymore. The basket column isn't even there.

 

And there seems to be an SQL Syntax error somewhere ....

 

Can anyone please HELP?

 

I think this is a great contrib, but it would be even better, if I could get it to work ... ;-)

 

Looking forward to any input :)

 

Mel

Link to comment
Share on other sites

RUBY :

 

what you need to do is in application_top.php , find this line :

 

if (tep_session_is_registered('customer_id')) { tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$products_id"); }

 

(Yes, that's a line that Wishlist has added to application_top.php)

 

just add // iinfront of that line to get rid of it and the problem should go away.

 

 

 

 

 

 

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.

 

 

 

 

 

 

 

 

JOSH :

 

Don't use the installation instruction that came with the contribution you've download, I've posted a new installation instruction on June 1, 2004, it's a very minor change to one of the line. The SEF Url will work when turn on if you use the new installation instruction. And if you're have problem with the Buy Now function, see the note I've wrote to Ruby.

Link to comment
Share on other sites

How do I make the wish list info box visible all the time. I would like each visiter to realize that this feature is available. This is the code from the right column:

 

if (tep_session_is_registered('customer_id'))

include(DIR_WS_BOXES . 'wishlist.php');

 

I tried include(DIR_WS_BOXES . 'wishlist.php');

 

and I receive an sql error.

 

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 'order by products_name' at line 1

 

select * from customers_wishlist WHERE customers_id = order by products_name

 

Also what is the difference between a require andn an include statement?

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