Jump to content
defender39

Wishlist 2.0 Support Thread

Recommended Posts

Now if you have MS1 then get MS2 and rip the function from there are add it to your general.php but name it split_page_results2...

Hello,

 

I've followed the thread to implement all the changes to get this working, but I am still stuck on the split_page issue. I think I am following how this patch is meant to work, but I am unclear as to the piece of code to be added to the general.php file. So far what I have tried hasn't worked. Could someone tell me what should be added there? :blink:

 

Thanks!

 

 

 

-Eric

Share this post


Link to post
Share on other sites

Guys

 

I have the same issues that others have had

 

I get an error when I add the split page script that matt did

 

Parse error: parse error in /homepages/34/d84309762/htdocs/catalog/wishlist.php on line 59

 

products_name";

$wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);

$wishlist_query_raw, $wishlist_numrows);

 

The bit in red is the line 59

 

anybody an idea pls

 

thanks

 

mark


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Mark,

 

This is what I have (the whole thing, lines 63-71)...Copy and paste it to see if it works for you:

 

<?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_query_raw);

 if ($wishlist_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
?>

Share this post


Link to post
Share on other sites

thanks Jeff

 

That didn't work so i commented out the following

 

$wishlist_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_WISHLIST_PRODUCTS, $wishlist_query_raw,

  $wishlist_numrows);

 

and uncommented out this and it works fine now

 

// $wishlist_split = new splitPageResults($wishlist_query_raw,

 

Just got to get the image to sit right now!

 

Thanks again

 

mark


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Well I have it all working nicely now - I see that there was a bug where the send to friend was not showing up and I have that problem

 

any fixes or advice pls would be appreciated

 

thanks

 

mark


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Sorry I been busy for the last 2 days with my site. I have over 200 orders to get out today. WOO HOO!

 

Anyways...

 

For the split_page_results() change to split_page_results2 and hack the version of spr you dont have. If you are MS1 then get the MS2 spr and if are you are MS2 then get the MS1 spr. This worked for my MS1 and I am sorry I cant help you MS2 people more. I have not yet updated and dont plan on it either. Maybe MS3 in the summer when I have time.

 

My wishlist_send is the one from the contrib on 2.0. Exactly the same. Please look in your configs in admin to make sure that you have HTML send on and that tell a friend is enabled. This could be a problem that some of you are having.

 

Theoretically it should be easy to send HTML emails with the product images, descriptions, and a nice format.

 

One idea that was good was for a public veiwable wishlist by email. This is very possible to do and a nice idea...not sure why I hadn't thought about it.

 

As for Vader and his desire that guests create wishlists...please think that out. It's not practical. How do you tell a guest when they leave your site and then return a week later? ANSWER: YOU CAN'T! Also a guest most likely would just add things to cart and leave...if they won't bother to even create an account then you ain't gonna make a sale. The wishlist won't help that. Maybe having the wishlist image to add is smart and then when they attempt to add to wishlist they are prompted to create an account. I like that idea better.

 

 

I have a question. Who has this working well on a MS2? Could you create a test account for other MS2 users? Could you post your files in the contrib?

Share this post


Link to post
Share on other sites

Jesse,

 

Congrats on your sales.

 

I am using MS2 and I have to comment that Wishlist 1.3 worked fine for what it was. This upgrade has broken more things than its fixed (so far). It adds items fine but the 'Add to Cart' and 'Delete' functions display a "1064 - You have an error in your SQL syntax". Since your not using MS2 I understand your limitations. I think I will try to step back through the 1.3/2.0 changes to see if I can solve this.

 

I see your name a lot as I cruise the forums.

Thanks for all your help, old and new!! :D

 

 

 

Comments / Suggestions

 

The way I would picture a wish list system to work would be for a customer to create a wish list and then assign it to an e-mail list. A "Wishlist ID" would be generated and assigned to this list in the database when it is e-mailed out. The e-mail would include this Wishlist ID in the link address like a SID. Friends who receive the link would be directed to your site where a page (like a search results page) would display all the items with a text heading like "Johnny's Wish List". In this way they could view the list without being logged in or seeing any other account info from the sender. This would make it possible for a customer to send different wish lists to different people. Of course a created list would have to have a shelf life of say 120 days before it would be automatically purged from the database (to avoid db bloat). Then again you could have a Customer Wishlist Manager.... never mind. But you can see what I mean.

 

 

Now if I only had a 100 hrs in a day, a 1000 days in a year.... :lol:

 

 

Eric

Share this post


Link to post
Share on other sites

Ok Jesse I am using MS2 and have the wishlist working just fine - i have had to make some changes that have already been discussed here...The hardets for me was the bit in product_info.php but I have managed to get it working great - I also was unable to get the send to friend function working so I created my own link

 

My Store (Adult Toys so be warned)

 

login using test@test.co.uk and pass testing

 

Just so you are aware I tried to install the cont b4 but was getting an error "unable to determine page kink" which I found went away when i disabled search engine safe urls in my admin area

 

anyway have a look and thanks for your hard work getting this to work!

 

Regards

 

Mark

Edited by crash3903

Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Hi,

 

I have my admin settings set to 'Use MIME HTML when sending emails' in the store, but still when it sends the email out, the links are not clickable.

 

This is the only thing which is preventing me from making the wishlist live on our site. If the emails sent don't have clickable links, our users will be confused (some of them are beginner users).

 

Claire

Share this post


Link to post
Share on other sites

Anyone have any idea what's missing here? I'm trying to get the Wishlist 2.0 contribution to add the customers_firstname, customers_lastname and customers_email_address to the customers_wishlist_table in the database. Here's what I have so far:

 

In shop/includes/application_top.php around lines 408-427:

 

//beginning of wishlist
     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 {
                                 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
 $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)));

// Add product to the wishlist 

     case 'add_wishlist' :  if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
                             if  ($HTTP_POST_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, customers_firstname,
       customers_lastname, customers_email_address, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $customers_firstname . "', '" . $customers_lastname . "', '" . $customers_email_address . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )"); 
                             } 
                           }

 

In shop/includes/modules/wishlist.php, line 11-13:

 

// retreive the wishlist
 $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND customers_firstname = ' customers_firstname' AND customers_lastname = ' customers_lastname' AND customers_email_address = ' customers_email_address' order by products_name";
 $wishlist_query = tep_db_query($wishlist_query_raw);

 

In shop/wishlist.php, lines 63-71:

 

<?php
  $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND customers_firstname = ' customers_firstname' AND customers_lastname = ' customers_lastname' AND customers_email_address = ' customers_email_address' 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_query_raw);

 if ($wishlist_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
?>

 

This is functioning except for the fact that none of the additional information (first name, last name, email address) is being inserted into the database.

But even worse than that, nothing can be added to a wishlist now, even though there are previous items still listed in a test wishlist, in the customers_wishlist table (4 items altogether that were there previous to trying to modify all of this).

I'm not getting any errors but as I said, the mod isn't working properly. I'm not sure if I'm missing the addition of any clauses or anything else from other files here, but I'd like to get this wrapped-up so I can submit a "allow guest to view wishlist" modification to this great contribution.

I'd appreciate someone with some PHP/MySQL background/knowledge lending me a guiding hand with this mess I've created. Thanks :).

Share this post


Link to post
Share on other sites

Regarding the email problem

 

I set the html mime to false in admin

 

My outlook express is set to receive emails in html and thats how i get them - For people that have not got the html capability (Few i hope) within their email client i add the phrase "if you have not got HTML enabled email then copy and paste the link below into your browser"

 

Just a thought to consider

 

regards

 

mark


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Hi,

 

I'm sending and receiving the e-mail message for the wishlist okay, the only problem I'm having now is...

 

The message link looks like this:

http://www.mydomain.com/catalog/product_info.php?products_id=313

 

And it should look like this:

http://www.mydomain.com/catalog/product_info.php?cPath=6&products_id=313

 

I have added this code as suggested in earlier post:

 

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/catalog/product_info.php/products_id/".$resultarray[0] . "\n\n";

 

And No luck fixing the problem.

 

Is there a fix for this??? ;)

 

Thanks!


Running osC - 2.2MS2. P.S. Please don't ask for a link to my site, it is on a production server and not available for the general public, yet!

Share this post


Link to post
Share on other sites

what is your site because the cpath is a category and should not be required

PM me your site address

 

as for the HTML emails...why not just code <a href> into the email send

Edited by defender39

Share this post


Link to post
Share on other sites
As for Vader and his desire that guests create wishlists...please think that out.? It's not practical.? How do you tell a guest when they leave your site and then return a week later?? ANSWER: YOU CAN'T!? Also a guest most likely would just add things to cart and leave...if they won't bother to even create an account then you ain't gonna make a sale.? The wishlist won't help that.? Maybe having the wishlist image to add is smart and then when they attempt to add to wishlist they are prompted to create an account.? I like that idea better.

Who said anything about guest creating wishlist. I'm saying having the wishlist available for guest to view and add products to cart and when they go to checkout, it makes them login or create account.

 

 

Please go back and read my previous posts.

http://forums.oscommerce.com/index.php?showtopic=67290&st=70

 

http://forums.oscommerce.com/index.php?sho...ndpost&p=267023

 

Thanks.

Edited by vadertech

Share this post


Link to post
Share on other sites
I'm saying having the wishlist available for guest to view and add products to cart and when they go to checkout, it makes them login or create account.

 

I agree with Vadertech 100%...For those of you unfamiliar with Amazon's wishlist "system", I strongly urge you to check it out. It's extensive in capability and well-put-together.

Those of us using Wishlist 2.0 are quite happy, I'm sure, that we now have this contribution at our disposal. And, the "upgrade" to allow guests to view a friend's wishlist is exactly what I'm working on...If anyone with better php/css experience (mine's minimal at best) can help me out with this, I'd appreciate it. :) Just PM me and let me know. Thanks.

Share this post


Link to post
Share on other sites

I installed Wishlist v2.0 last night on my MS2 Demo Store and started receiving all of the errors and issues that everyone here has discussed.

 

So I decided that I would try and fix these problems once and for all and make Wishlist fully compatible with MS2. And... I think I've been successful! It is working for me.

 

Please remember these changes are ONLY for MS2

 

For the SQL errors and splitPageResults problem...

 

In /catalog/wishlist.php, change...

  $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_query_raw);

To this...

  $wishlist_query_raw = "select * from " . TABLE_WISHLIST . " WHERE customers_id = $customer_id order by products_name";
 $wishlist_split = new splitPageResults($wishlist_query_raw, MAX_DISPLAY_WISHLIST_PRODUCTS);
 $wishlist_query = tep_db_query($wishlist_split->sql_query);

 

Change all instances of...

  if ($wishlist_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {

To this...

  if ($wishlist_split > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {

 

Change all instances of...

            <td class="smallText"><?php echo $wishlist_split->display_count($wishlist_numrows, MAX_DISPLAY_WISHLIST_PRODUCTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_WISHLIST); ?></td>
           <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $wishlist_split->display_links($wishlist_numrows, MAX_DISPLAY_WISHLIST_PRODUCTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

To this...

                <td class="smallText"><?php echo $wishlist_split->display_count(TEXT_DISPLAY_NUMBER_OF_WISHLIST); ?></td>
               <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $wishlist_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

 

For the issue with the Tell-A-Friend box not showing up at all... Its because the page listing split IF statement is before the Tell-A-Friend section of code and the } that finishes the IF statement is located after the Tell-A-Friend section of code.

 

Look for this in /catalog/wishlist.php...

      <tr>
       <td>
<!-- tell_a_friend //-->

And place the move the following code just ABOVE it...

          <tr>
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td class="smallText"><?php echo $wishlist_split->display_count(TEXT_DISPLAY_NUMBER_OF_WISHLIST); ?></td>
               <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $wishlist_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
             </tr>
           </table></td>
         </tr>

<?php
   }
?>

That will isolate the page listing split so that it will not effect the Tell-A-Friend section of code.

 

That's it for /catalog/wishlist.php.

 

Next, there is an issue in /catalog/wishlist_email.php where the link displayed is not correct. Look for the following...

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/product_info.php/products_id/".$resultarray[0] . "\n\n";

Change it to this...

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/product_info.php/products_id = " . $resultarray[0] . "\n\n";

This should display the Product Link correctly in the email box. But, the link still has an issue in the actual email that is sent. I will be looking into that next and will post a fix.

 

Let me know if you have any questions.

 

I hope this helps others!

 

-R


"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

 

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

Share this post


Link to post
Share on other sites

Okay... for the wishlist_email.php product link issue...

 

Find this...

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/product_info.php/products_id/".$resultarray[0] . "\n\n";

Change it to this...

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/product_info.php/products_id=" . $resultarray[0] . "\n\n";

The email that is sent will now contain the correct link back to the product.

 

Feedback? Problems?

 

Let me know.

 

-R

Edited by ugottasalsa

"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

 

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

Share this post


Link to post
Share on other sites
And, the "upgrade" to allow guests to view a friend's wishlist is exactly what I'm working on...

I checked out your site and it looks like your on the right path.

 

ugottasalsa

Thanks for the fixes. Everything is working how they were intended.

Share this post


Link to post
Share on other sites

I got it to work, finally. :o

 

I changed:

 

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/catalog/product_info.php/products_id/".$resultarray[0] . "\n\n";

 

to:

 

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/catalog/product_info.php?products_id=".$resultarray[0] . "\n\n";

 

And set the e-mail option in the admin to send HTML e-mails to false.

 

Now the product links are okay, and they are also clickable. :D

 

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

 

Thanks defender39 for updating the mod for bluephoenix (the original wishlist mod creator) and dreamscape who added mods, and now yourself - defender39 for adding the e-mail the wishlist feature.

 

Just thought I'd post some "credit" statement here, since there was none in the mod anywhere. ;)


Running osC - 2.2MS2. P.S. Please don't ask for a link to my site, it is on a production server and not available for the general public, yet!

Share this post


Link to post
Share on other sites

Vader... happy to hear it works right. I spent many hours trying to figure out the right way to get this done.

 

Hey GD... what about me?

 

Good Luck to all!

 

-R


"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

 

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

Share this post


Link to post
Share on other sites

ugottasalsa,

 

Okay you too. :P

 

But, the last code you posted didn't work for the e-mail links.

 

Examples:

 

Yours(not working):

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/product_info.php/products_id=" . $resultarray[0] . "\n\n";

 

(Working):

$wishliststring .= $resultarray[1]."\n" . HTTP_SERVER ."/catalog/product_info.php?products_id=".$resultarray[0] . "\n\n";

 

Thanks :)


Running osC - 2.2MS2. P.S. Please don't ask for a link to my site, it is on a production server and not available for the general public, yet!

Share this post


Link to post
Share on other sites

I just found a MAJOR issue and want to get some suggestions on how to proceed.

 

When an item is on a customers wishlist, and that item is then added to cart by either the customer themselves, or a friend of the Customer that is browsing the Wishlist, the item is immediately removed from the Customers wishlist.

 

Now, what happens if the "friend" (or the customer for that matter) has second thoughts after adding this item to their cart and abandons the order? The item has already been removed from the Customers wishlist when it was added to the cart.

 

See my point?

 

If someone wanted to be really mean, they could add all of the items on someones wishlist to cart, and then abandon the order... even before having to register for an account!

 

My inclination is to place this functionality of removing an item from a Customers wishlist at the end of checkout, in checkout_process.php. This is the same place that the Order info is populated to the database. So why not add the wishlist removal process there too? Having it at the end of checkout will remove all possibilities of someone tamporing with Customer's wishlists.

 

Thoughts? Ideas? Feedback?

 

Let me know.

 

-R


"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

 

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

Share this post


Link to post
Share on other sites

It seemed as if I had installed wishlist correctly, but when I try to add anything to my list, it puts it into the shopping cart.

any suggestions on how to correct this

thanks in advance

tony

Share this post


Link to post
Share on other sites

Tony,

 

Check the thread for this contribution, specifically page 4 (you're on page 13)...

It sounds like you're missing a </form> tag somewhere, but I can't say which one. You'll have to check your wishlist.php file.

Share this post


Link to post
Share on other sites

I am looking for a way to have the product added to the wishlist and then redirect back to the last page visited. If a customer wants to add a bunch of items, it could take a while going to the wishlist, then finding their way back to where they were.

Kinda ned something like display cart after adding product=false

 

application_top.php has this:

 ? ? case 'add_wishlist' : ?if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? if ?($HTTP_POST_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;

 

And when I change it to anything else, nothing changes, it still goes to the wishlist.php.

Any help will be greatly appreciated,

Marg :)

Edited by Marg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×