Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 3.0 Support Thread


dblake

Recommended Posts

this is a follow up to my last post. we found the fix for this problem suggested by Bighawk.

 

<?php echo tep_draw_form('wishlist_form', tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id=' .$public_id)); ?>

 

this seems to work in so far as it now correctly adds the product to my cart from wishlist_public.php, but...

 

...it does not remove the item from the wishlist after I purchase it. I have two users created. the wishlist belongs to user A. I'm logged in as user B and purchasing it from user A's wishlist. should it remove the item from the wishlist (belonging to user A) when user B purchases it for them? I would like it to, but I'm not sure the module functions that way.

 

On an additional note, I would also like to be given the option, as user B, to ship the item to user A (to whom the wishlist belongs). how big a deal would that be? anybody know how to make that happen?

 

thanks,

 

Brance

Link to comment
Share on other sites

Thats a lot of coding that I won't be doing for free. That will be more like a gift registry, not a wishlist. Maybe there is a contribution out that does that, I don't know. But that is what your looking for.

 

-Dennis

Link to comment
Share on other sites

I was able to make it do this by adding this code to wishlist_public.php at line 19

 

// add wishlist_delete session variable
$wishlist_delete = $public_id;
session_register("wishlist_delete");
// end wishlist_delete session variable

 

and then in includes/classes/wishlist.php I changed

 

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

 

to

 

tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'");

 

I think that was line 106 and then the same thing in the next line that alters TABLE_WISHLIST_ATTRIBUTES. any reason not to do it this way? it seems to work just fine and do exactly what I wanted it to do. this way if they email their wishlist to 10 people, when the first person buys an item off their wishlist, it removes it so that other people won't buy it for them a second time.

Link to comment
Share on other sites

ok, one last thing.

 

I had to go back into includes/classes/wishlist.php and add this line of code after the last changes I made

 

session_unregister("wishlist_delete");

 

so now my includes/classes/wishlist.php file looks like this at line 99

 

	function clear() {
global $customer_id;

	// Remove all from database
	// changed $customers_id to $_SESSION["wishlist_delete"]
	  if (tep_session_is_registered('customer_id')) {
			  $wishlist_products_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'");
		  while($wishlist_products = tep_db_fetch_array($wishlist_products_query)) {
			tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'");
			tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'");
			session_unregister("wishlist_delete");
		  }
	}
}

Link to comment
Share on other sites

Well what happens if a person browses the public wishlists? What happens if I send you my wishlist and you click on it, and say HEY I want that. So you buy it for yourself and it gets deleted from "my" wishlist?

 

Or what happens if you have items in your wishlist and decide to purchase them. If you dont view or add the items from your public wishlist, they will never get deleted as its looking for the session variable that you defined on the public_wishlist.php page.

 

Just things to think about if you want the full proof.

 

-Dennis

Edited by dblake
Link to comment
Share on other sites

this unregisteres the wishlist with the session. that way if customer B returns and buys something else for himself that was on customer A's wishlist, it won't get removed from A's wishlist.

 

the problem now is unregistering this variable when they don't buy anything from the wishlist. I'm working on it, but feel free to chime in if you have any ideas.

Link to comment
Share on other sites

OH also, your unregister is within the while loop, so if there is more than one item purchased, it will only clear the first one as the variable will be cleared before teh 2nd one can go through.

 

-Dennis

Link to comment
Share on other sites

I installed the Wishlist Contribution 3.5d, and it's very helpful.

 

One thing: If you type wishlist_public.php?public_id=#, it shows the user's first name, and the wishlist of that user in realtime. By the time it was sent, the user may have changed this list. It can be problematic if user wants to send different wishlist to different people.

 

Here is how I would like to modify the contribution:

 

User "A" would keep his own wishlist private and could create more than one wishlist.

 

When comes the time to send his wishlist, user "A" select the one he wish to send.

 

User "B" receives the email. The link it contains would let recipient add the products specified in that link to one of his wishlists or create a new one and give it a new name.

 

I would need your advice on this...

 

Would someone help to put this in concrete form?

 

Thanks in advance

Link to comment
Share on other sites

Thanks in Adavnced for your Help!

 

I installed this great contribution but the add to wishlist button does not appear.

This is the code from my catalog/product_info.php

 

<td ><a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath); ?>"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a></td>
<td ><?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>
<td ><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>
<td ><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

As you can see i have a back button in there also.

 

Thanks again.

Link to comment
Share on other sites

Hmm, know what contributions you install and what they do? You would have to just review and look around to debug. Clear cache in admin console?

 

-Dennis

Thanks Dennis!

 

These are the Contributions i have installed

 

1. Basic Design Pack 1mk6

2. Ultimate SEO URLs

3. cDynamic Meta Tags v1.4

4. Free amount 3.5c

5. Fast easy checkout 3.0

6. Google XML Sitemap

7. Margin Reporting v2.5.6

8. Easy populater 2.79a

9. Dynamic sitemap v1.6

10. UPSXML v1.2.2

11. Froogle datafeeder v162d SEO

12. Allproducts

13. Average rating 1.1

14. QBI

15. Optimize_tep_get_tax_ratev1.1

Link to comment
Share on other sites

Dunno what basic design pack does, but try clearing your cache in admin, then I have seen a contribution move your product_info.php page to the index.php page. Dunno but I have seen it, you may want to check there. Otherwise I couldn't tell ya without looking at it myself.

 

-Dennis

Link to comment
Share on other sites

Dunno what basic design pack does, but try clearing your cache in admin, then I have seen a contribution move your product_info.php page to the index.php page. Dunno but I have seen it, you may want to check there. Otherwise I couldn't tell ya without looking at it myself.

 

-Dennis

From the install instructions

 

Basic design pack 1.6

This is not a real contribution as such...its just an easy to use short-cut to make your own osc design.

 

What will this pack do?

 

1. It will center your shop and give you the possibilety to set outside background color in the stylesheet.

2. It will remove the default oscommerce cartoonish icons

3. It removes the rounded infobox corners and replaces them with square transparent ones, so you can change the colors in the styleaheet.

4. It removes the osCommerce banner in the footer

5. It will make it easy to have 1 top graphic logo filling the whole header width.

6. It will make automatic thumbnails of your products images

7. It will replace all your graphical buttons with css based ones , ie. button styles is defined in teh stylesheet and will automatically adjust to suit different languages.

8. It will give you a new categories/menu box with a better and more intuitiv marking of navigation. This menu is further customizable in stylesheet.css and uses 3 images located in this folder images/categories/

I do not have #7 the css buttons installed. I use the regular osc buttons.

Any other ideas how to fix the Wishlist button?

Link to comment
Share on other sites

Hi Wishlist guys,

 

I have a question. I need the following functionallity:

Repeat customers come back to reorder the same products.

Instead of looking up the products they need, they have multiple wishlists stored in my website's database.

So they spend some time preparing, filling and organizing wishlists for themselfs and then quickly

fill a cart from their wishlists with poducts needed over and over again.

So It is probably not a wishlist, it's more like favorite items lists.

 

So my questions are:

Is this contribution capable of doing this?

Do you know any other contribution which does it?

Is it posible/planed to include such functionality into this contribution?

 

Thank you.

Link to comment
Share on other sites

Hi Jacob,

 

Just remove the addition that was added to checkout_process.php;

 

$wishList->clear();00

 

and your customers wishlist should be unchanged after buying the items. I am using the wihlist as a favorite items list.

 

And thanks to Dennis who helped me with this earlier.. :)

Edited by Fredrik.r
Link to comment
Share on other sites

Two months ago I asked if it's possible to add a feature in the contribution "Simple Wishlist Report" that reports if the customers has sent their wish list to friends, how many that received the list and so on. I'm just wondering if someone has done this? It is of big interest to really see if the customers are sending out their wishlist. I am not trying to fetch or collect their email addresses, that is not needed or fair. I just want to see if they are using their lists and informing friends.. The Simple Wishlist Report is quite simple and it's just showing which items visitors have put in ther lists.

 

Sorry, but their is no thread for Simple Wishlist Report.

Edited by Fredrik.r
Link to comment
Share on other sites

Thanks Fredrik,

 

This may work for me, I'll give it a try. :)

 

But there are no multiple lists, which would be sweet :(

 

Well, at least I can start from here. Thank you.

 

Best Regards.

Link to comment
Share on other sites

Will take some planning and coding/db knowledge but you can build a function that will take the user/sending the email's id (if logged in) email (if guest, and you could use for marketing purposes to actually get them to sign up) and who they sent it to, (collect emails so what, its good marketing for you) then you have a target audience of who uses it, and a target audience of potential buyers. Put all in the db for you ;) Then you can do anything with it :)

 

-Dennis

Link to comment
Share on other sites

Thanks Fredrik,

 

This may work for me, I'll give it a try. :)

 

But there are no multiple lists, which would be sweet :(

 

Well, at least I can start from here. Thank you.

 

Best Regards.

Hi LAMPB, I posted a request few days ago about multiple wishlist/favorites... here's the link:

 

http://www.oscommerce.com/forums/index.php?sho...=166244&st=440# [post#458]

 

I've not started yet... and I think I'm gonna need help!

Edited by Plascual
Link to comment
Share on other sites

Hi Plascual,

I'd be glad to help, but I'm afraid I can't. I'm such a newbie.

I haven't even finish my first book on PHP. :)

If you see that I can be of any help let me know.

Regards.

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