VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: Forrest on February 03, 2010, 11:45:34 am

Title: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 03, 2010, 11:45:34 am
Hello VM fans,


This hack is based off the original wishlist hack by KMAN for vm1.0

I've modified the orginal hack, and added to it, to work for vm1.1 (vm1.1.4 tested) with J1.5 (J1.5.15 tested).

This was kind of a rush job. There are a few non XHTML vaild lines (missing alt or title attributes).

I did this hack revision after purchasing two different wishlists and was very unsatisfied.

This wishlist system is a hack to the core, but overall, the core hacks are minor, and are commented (search for "wishlist" in core hacked files if necessary). It includes a module as well, which installs via the regular Joomla mod install.
(http://www.thewebdna.com/images/boxes/wishlist.jpg)
Wishlist system:
1. Logged in users can create wishlists.
2. Users can add items to wishlists via flypage, right next to add-to-cart-button. This is the only place it makes real  sense other than also on the cart page.
3. Users can use an entire cart to create or add to wishlist. That's right! Unlike other wishlists, users can just add all their items in a cart to a new or already created wishlist in one click! Button right under the cart so easily visible.
4. Users can share, via an email system, with non-registered users the items they have added to wishlists. Multiple emails per share.
5. Users can create UNLIMITED public and private wishlists. Wishlists become public when users share wishlist via email.
6. Users can delete, modify, share, unshare wishlists.
7. Wishlists are stored in database for user / visitor retrival at any time.
8. Wishlists show image of items, not just name.
9. Users may access wishlists anywhere on site via the module.
10. Users/visits can add singular products to cart  from wishlist, or the entire wishlist to cart with one click.
11. Users can adjust wishlist quantities, add, or alter products & quantities at anytime.
12. Only wishlists system with VM admin panel for administrator review of wishlists, popular wishlist products,  users using wishlists, etc.

Screenshots of admin panel wishlist tab Most Common Wishlist Items:
(http://www.thewebdna.com/images/boxes/admin-wishlist1.jpg)
Screenshots of admin panel wishlist All Users for this Item:
(http://www.thewebdna.com/images/boxes/admin-wishlist2.jpg)
Screenshots of admin panel wishlist tab All Wishlist from Users:
(http://www.thewebdna.com/images/boxes/admin-wishlist3.jpg)
Screenshots of admin panel wishlist Specific Wishlist of User:
(http://www.thewebdna.com/images/boxes/admin-wishlist4.jpg)

That's about it! PLEASE POST ANY ISSUES HERE.
Please post any feedback as well.

NOTE: If you are using VM router.php for SEF, you will want to make some additions to it for proper SEF functioning. Post questions here if you need help.

NOTE: ps_wishlist may need to be altered if you are having an array problem. While I didn't take the time to carefully fugure out why, it seems to be a PHP version issue with earlier php. Symptoms are what Roderick1 had with no product images and names being carried to wishlist. http://forum.virtuemart.net/index.php?topic=66530.msg226992#msg226992

UPDATE: Now v1.2 -> For SSL users (https)

UPDATE: Now v1.3 -> For NON-SSL (http) or SSL (but not forced)

UPDATE 03-07-10: Download v1.4

UPDATE 03-14-10: Download v1.5

UPDATE 03-17-10: Download v1.6

UPDATE 03-21-10: Download v1.7

UPDATE 04-04-10: Download v1.8

UPDATE 05-07-10: Download v1.9


UPDATE 10-15-10: DUTCH TRANSLATION of wishlist for VM 1.1.5


Please take a minute of time to leave a review here: http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=331&Itemid=

If you like or found useful, please donate at http://www.paypal.com to forrestchamberlain@hotmail.com

[attachment cleanup by admin]
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 03, 2010, 16:20:53 pm
Hello Forrest,

This module sounds great and I have been looking for something like that for quite some time. I am newbie so can you explain how to proceed with the installation? I open the README file and I do not understand the bullet point #3 saying "Run the SQL file now located at (modify the 'jos_' prefix as is necessary): * sql.virtuemart.module.wishlist.sql
Can you guide me throught the installation?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 03, 2010, 19:12:51 pm
You need to use PHPMyAdmin or similar to add the SQL file to your database. You probably don't need to worry about the jos_ renaming if you don't know what that is.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 03, 2010, 22:28:04 pm
Thanks for your reply. So what should I install in order for the module to work fine? Is it possible that non registered member use the wishlist?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 03, 2010, 22:52:59 pm
You must delpoy the sql and hack files before the mod will work. The mod is only a little addon making it easy for users to access their wishlists... and they can only access them if you have deployed the hack by replacing all the files included and running the sql to add the database tables/changes.

Non-registered users can SEE registered users wishlists that have been sent to them by the register user. This way non-registered can add these products to a cart before checkout/registration.

Non-registered users may add products to a cart, but will not see the "Add cart as wishlist" until they either 1. Register, or 2. Checkout (which causes registration 1st).

Non register users can see the Add-to wishlist on the product-flypages as well for each product, but when they click on it, it redirects them to login or create an account.

Pretty much, in order to HAVE a wishlist, you need an account. This is how we know WHO'S wishlist is WHO'S! We need a user ID to relate the wishlists to.

good luck!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 03, 2010, 23:13:50 pm
It sounds terrific!

Ok let's try to install the module. I do not understand what you mean by deploy the sql and hack files (I am really a beginner). Can you guide me step by step through the process?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 04, 2010, 01:26:54 am
Well I'll be frank is saying of you're this new, I don't recommend hacking until you are comfortable with the way Joomla/VM functions, and likewise, understand where the files are that you need to edit.

Having said that.

1. Backup your installtion.
   a) backup for files
   b) use PHPMyAdmin to backup your database.

2. Use PHPMyadmin to add/deploy the included SQL.
   a) You can do this by entering the PHPMyAdmin panel and clicking "Import" -> "Browse" (which you browse to the .sql)
   b) Once you have the file selected for import click "Go"
   c) This will execute the .sql file and add the needed databse tables/colums

3. Now you need to FTP over the newly hacked files.
   a) You can only do it this way if you are using VM1.1.4 and have not already hacked the files to be replaced with other hacks.... otherwise you will overwrite the hacks with this one. If you are not using VM1.1.4, but it is a 1.1.x version, then you would need to look at each file, and copy the code for the hack over to the original 1.1.x file.
   b) FTP the "administrator" folder over to your Joomla root... which will overwrite the original files with the hacked ones.
   c) FTP the "components" folder over to your Joomla root... which again, will overwrite the original files with the hacked ones.

4. Now install the module
   a) Log into Joomla (should be already) and go to Extensions -> Install/Unintall -> Browse
   b) Select the mod found in the hack (mod_mv_wishlist).
   c) Install it!

5. Go to Extensions -> Module Manager and make sure you publish the module, and it is the position you want.


Done. Hack is now working.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 04, 2010, 03:43:00 am
Thank you so much for all the time you spent answering me. As you said, such modifications are kind of scary to the newbie I am so I will go step by step.

In the meantime, do you know where I can find a simple module for what I am trying to do. Your module looks great but much more elaborated compare to what I want to do. In my project, there is no cart, no check out, no price involved and no login required. It is just an online catalogue. I would like the user to be able to select products from the catalogue in a wishlist and to be able to save this wishlist on his computer.

Let me know if you know anything like that and thank you again for your help.
Wally

Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 04, 2010, 03:56:10 am
IT seems to me the best thing to do is to keep Virtuemart NOT in catalog mode, but still have it work like a catalog.
See my posts here to make that part work:
http://forum.virtuemart.net/index.php?topic=66466.msg220054#msg220054
http://forum.virtuemart.net/index.php?topic=65510.msg219904#msg219904

Then instead of using the cart as a real cart, just change out the language files for it to say WISHLIST... and turn your checkout button into a link to execute an EXPORT of the products in the cart to a CSV file. A simple PHP code can make that work.

Good luck... at this point you are on your own! Search the forums :)
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 04, 2010, 04:19:24 am
I am going to try hard  ;D
Thank you so much for your help!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: ptiang on February 05, 2010, 19:42:29 pm
Hi Forrest,

I managed to implement your wihlist successfully, except that when I tried to share my wishlist and email to my friends, they cannot seem to view my wishlist, regardless whether they are logged in or not.

Perhaps you can enlighten me on this.

Thanks for the effort!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 05, 2010, 20:23:55 pm
Yep, good catch. Looking at it now.
 Likewise, there is added code in that needs to be removed:
components/com_virtuemart/themes/vmj_genx/templates/wishlist/emails/email_english.txt

Remove everything above "Hello!"
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 05, 2010, 21:12:23 pm
UPDATE: Now v1.2 ->
1. Fixed error of non-registered users not being able to see sent wishlists.
2. Fixed email template for sharing wishlists.
3. Fixed login forms to include "Register" link, should users want to register.
4. Made login forms look the same.
5. Fixed public wishlist item template to look same as other item templates (100% width on table)

Files changed:
components/com_virtuemart/themes/vmj_genx/templates/wishlist/public/wishlist_item_list.php
components/com_virtuemart/themes/vmj_genx/templates/wishlist/emails/email_english.txt
administrator/components/com_virtuemart/html/wishlist.index.php
administrator/components/com_virtuemart/html/wishlist.save_cart.php
administrator/components/com_virtuemart/html/wishlist.share.php
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 19:40:33 pm
Ok, I did everything you said and I ended up getting this error message on my website, so I disabled the module until I could figure it out.  Here's the error message:


Warning: require_once(/home/pricein3/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php) [function.require-once]: failed to open stream: No such file or directory in /home/pricein3/public_html/modules/mod_vm_wishlist/mod_vm_wishlist.php on line 31

Fatal error: require_once() [function.require]: Failed opening required '/home/pricein3/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pricein3/public_html/modules/mod_vm_wishlist/mod_vm_wishlist.php on line 31
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 06, 2010, 21:27:34 pm
Sounds to me like you didn't extract the files (specifically ps_wishlist) to your ftp site root. Maybe you only installed the module? There is a whole bunch of files that need to be copied over.

Your error message in sitself states the problem!
Failed opening required '/home/pricein3/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php' No such file or directory.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:00:17 pm
Yea, thats probably it.  All I did was install mod_vm_wishlist and the sql file sql.virtuemart.module.wishlist.sql.  Was I supposed to install the files in the folder mod_vm_wishlist?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 06, 2010, 22:04:57 pm
Yes, this is a core hack, which means you will be over-writing/adding-to a few VM1.1.4 files with the hacked versions I have included.

So yes, FTP over the 2 folders, "administrator" and "components", to your site root... in your case /home/pricein3/publichtml/

Then you can re-enable the mod, and your off an running.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:06:56 pm
But wont that overwrite the com_virtuemart folder I already have?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:09:29 pm
Well I backed up my files so I'll give it a shot and see what happens.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 06, 2010, 22:10:59 pm
FTP replaces files within folders... not overwrite folders... you'll be ok!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:40:10 pm
Ok, it worked now.  I can see the wishlist module.  However, I can't add products in my store to the wishlist.  Did I miss something?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:48:50 pm
Ok, it was working but now I see this error message whenever I have the wishlist module enabled: 

Fatal error: Call to a member function query() on a non-object in /home/pricein3/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1616
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 22:50:36 pm
Actually I think I messed that part up by reuploading the shopping cart module because I never uploaded it to begin with.  I was using my site as a catalog.  I'll go back and reinstall the files that I overwrote, however I still would like to know how I can add products to the wishlist; that doesn't appear to be working for me.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 06, 2010, 23:02:57 pm
Nope, I reuploaded the files and I'm still getting the same error message:


Fatal error: Call to a member function query() on a non-object in /home/pricein3/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1616


I looked at the code and it's this line:

   $result = $db->query( $q );
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 07, 2010, 00:19:27 am
Ok... so it's just the module that is not working correct?

Everything else is functioning ok? You can add products to a list, share it, etc, right?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 07, 2010, 01:58:24 am
the wishlist works when I'm not logged in, but if I'm logged in as a user then it shows the error message that I posted.  However, what I need is a site that requires people to be registered to see the wishlist. 
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 07, 2010, 02:10:45 am
I understand you get an error when you are logged in.

WHERE are you getting this error... in the module? or on the content of the page? I am tying to understand if the error is ONLY IN THE MODULE, or if it is somthing within the HACK files when you are logged in.


Quote
However, what I need is a site that requires people to be registered to see the wishlist.
That can be done pretty easily. You just need to edit administrator/components/com_virtuemart/html/wishlist.index. Look for the lines:

Quote
// no user specified -- wishlist code?
if ($result === false && isset( $wishlist_code ) && !empty( $wishlist_code ) && trim($wishlist_code) != '')
{
   // convert wishlist_code to wishlist_id
   $return_value = ps_wishlist::wishlist_code_to_id( $wishlist_code );
   if ($return_value !== false)
   {
      // this will take precedence over any wishlist id that might have been passed
      $wishlist_id = $return_value;
   }
}

The way it works right now, when users get an email with the wishlist code, it allows users to access the wishlist because it see's the code. I would recommend you redirect users to the wishlist login form instead:

Something like replacing the code above with this:

Quote
// no user specified -- wishlist code?
if ($result === false && isset( $wishlist_code ) && !empty( $wishlist_code ) && trim($wishlist_code) != '')
{
      show_login( $output, $wishlist_id, $wishlist_code, $sent_user_id );
}


Now, I have not tested this, but that would be my first stab at it.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 07, 2010, 02:19:37 am
Likewise, one of the downfalls to my hack (at least for now) is that when someone clicks on a wishlist link sent to them, it takes them straight to the wishlist page for the user that sent them the link.

Problem being, is once they leave this page (say to register) they cannot get back to the wishlist without going back to the email and following the link again. In other words, there is no link within the wishlist module that give them access to OTHER users wishlists that have been sent to them.

Two ways to handle this.
1. (THE HARD WAY) Make sure the wishlist code is always passed along in J1.5 registration, and use that as an identifier in login to redirect them to the wishlist page of that user. Requires hacking J/VM registration, and possibly J login

2. (Slightly Easier) Still requires passing the wishlist code in J/VM registration (hacking it to do so), but instead of redirecting after login to the wishlist page of user who sent it, have the wishlist MODULE check for the wishlist code within the URL and provide a link from the module.


Either way, it's a tough one to deal with. If that is what you wanted, which is what I DID NOT WANT, you may want to look at the few other wishlists for VM around.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 07, 2010, 06:17:29 am
I understand you get an error when you are logged in.

WHERE are you getting this error... in the module? or on the content of the page? I am tying to understand if the error is ONLY IN THE MODULE, or if it is somthing within the HACK files when you are logged in.



It is in the content of the page.  My page appears completely white with only an error message at the top.  For some reason though, whether I'm logged in or not, I can see my pages and the wishlist module when I'm only viewing my product catalog pages, but if I try to view any other pages on my site it goes to the blank page with the error message. 
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 07, 2010, 06:21:04 am
I have a feeling this has something to do with the fact you are in catalog mode within VM.

Just for kicks, try turning off catalog mode and see if it makes a diff. Just a guess.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 07, 2010, 06:29:48 am
I have a feeling this has something to do with the fact you are in catalog mode within VM.

Just for kicks, try turning off catalog mode and see if it makes a diff. Just a guess.


No, I had turned it off yesterday and it made no difference.  I'm using Joomla 1.5 with Virtuemart 1.4, would that be a problem?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 07, 2010, 06:32:29 am
1. Tell me what version of 1.5... is it 1.5.15?
2. Tell me what version of VM?... is it 1.1.4?

3. Please provide a link to your site... that would help. Txs
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 07, 2010, 07:46:27 am
1. Tell me what version of 1.5... is it 1.5.15?
2. Tell me what version of VM?... is it 1.1.4?

3. Please provide a link to your site... that would help. Txs


I sent you a private message with the details.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 08, 2010, 23:21:27 pm
Git it, I'll have a look. Got caught up with other tasks. Gimmie a few days.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 09, 2010, 01:32:29 am
Git it, I'll have a look. Got caught up with other tasks. Gimmie a few days.


Ok.  Thanks for the help.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 10, 2010, 01:15:32 am
Berserker:

Here is a few things.

1. You do not have SSL installed and working on your server. My links to "login" and "create account" are set to use SSL. If you do not plan to use SSL on your site, change:
modules/mod_vm_wishlist/mod_vm_wishlist.php
Locate at end of this file:
Quote
<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&amp;page=shop.registration', true, 1) ?>" title="Create an Account">Create an account</a> or <a href="<?php echo JRoute::_('index.php?option=com_user&amp;view=login', true, 1) ?> " title="Login to Your Account">Login</a><br /> to start creating or to view your wishlists.

and use instead:
Quote
<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&amp;page=shop.registration', true, 0) ?>" title="Create an Account">Create an account</a> or <a href="<?php echo JRoute::_('index.php?option=com_user&amp;view=login', true, 0) ?> " title="Login to Your Account">Login</a><br /> to start creating or to view your wishlists.

This will take care of the server 500 errors, as it will stop the redirect to SSL, therefore staying http, not https.

2. I did not see the "Add to Wishlist" on your product pages, which means you don't have the product details file correct (or you have temporarily commented it out?)

3. Lastly, you will need to search for instances of JRoute within the entire wishlist hack files I provide, or manually go into these 4 other files where SSL is being forced to be used to remove the force ssl command.
Files are:
administrator/components/com_virtuemart/html/wishlist.add_item
administrator/components/com_virtuemart/html/wishlist.index.php
administrator/components/com_virtuemart/html/wishlist.save_cart.php
administrator/components/com_virtuemart/html/wishlist.share.php

You will need to change the lines in these files
from:
Quote
JRoute::_('index.php?option=com_virtuemart&amp;page=shop.registration', true, 1)
to:
Quote
Quote
JRoute::_('index.php?option=com_virtuemart&amp;page=shop.registration', true, 0)

Again, it's currently forcing to use SSL, which you don't have, and instead we need to turn that off (specifically by telling JRoute ssl param to be "0", not "1".


SO YOU CAN DO EVERYTHING ABOVE OR I have posted another upload available from first post of this topic with all files updated, if you wish to just get the new version with NON-force of SSL usage. It is version 1.3 also available here: http://forum.virtuemart.net/index.php?action=dlattach;topic=66530.0;attach=13786
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 10, 2010, 05:33:30 am
Ok, everything is working now except for the Add to Wishlist button.  I did previously edit my product description page to make it look nice.  Do you think messing with some of the dimensions and such could have screwed that up?  I might have also edited out the code to display the cart on the product description page.  What file would I find that code on for the product description page?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 10, 2010, 23:26:28 pm
<!-- WISHLIST START -->
<br /><a href="index.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id ?>&amp;flypage=shop.<?php echo $flypage ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem" title="Add to Wishlist"><i><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_ADD_TO') ?>!</i></a>
<!-- WISHLIST END -->

That is the code shown for the product details page, but it is loaded via the
components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 10, 2010, 23:33:55 pm
Hello Forrest,

I replied to your post at the very beginning. I wanted to do a simple and basic wishlist without having to hack or make big drastic modifications. I am glad to say that I am almost there! Now I have a nice wishlist that works perfectly fine. The only missing part is to turn the checkout link into a button that would send the cart content by email. Have you any idea how to do that?
Wally
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 10, 2010, 23:36:37 pm
Are you using my hack to have the wishlist or something else all together?.. such as my suggestion to convert the cart to your wishlist?

Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 10, 2010, 23:54:09 pm
Your suggestion to convert the cart into a wishlist was the best for my newbie status. It works great actually. Now instead of being in the cart, the user is in a wishlist. He can select items, no prices appear. I am now at the final step. In the cart (transformed into a wishlist), he has the checkout link. I would like the user to click on this link (no registration required) and to send the wishlist by email. How can I turn off the checkout process and get directly to the order confirmation email?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 10, 2010, 23:57:04 pm
If you are using the cart as your wishlist, then seems to me you want to turn off the checkout process (as you mention), ie disable all payment options and shipping options in VM, and turn off step one and two in the checkout config.

then you can use the Order Confirmation email template to remove unnecessary stuff (like payment, shipping, etc). When they hit confirm, they will get the Order confirmation email, but you can rename to whatever you want!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 11, 2010, 00:07:30 am
Sound terrific to be so close ;D
Is there any way to bypass the login screen and go directly to the Order confirmation email?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 00:11:26 am
Try turning off the "allow user registration" and "new user activation" in JOOMLA config "system" tab.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 11, 2010, 00:16:57 am
I did so. when I click on check out, I am getting the following message:
"User registration is disabled, it must be enabled in order to proceed."
What do you think?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 00:22:39 am
Make sure you turn off registration (set to no account creation) as well in VM config.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 11, 2010, 00:32:05 am
Great! But I am still getting check out step 1 and 2 even if I uncheck checkout in VM. Any idea?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 00:38:23 am
did you turn off all shipping and payment options in the shipping and payment sections of VM.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 11, 2010, 00:46:32 am
Shipping tab: nothing is checked
Check out tab: Choose your store's checkout process is not checked, the first two boxes are not checked, the last two are checked but are in grey (like inactive). They are for step 3 and 4.
Should I look some place else?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 00:50:25 am
Look under the "Store" menu in VM for "List Payment Methods" and turn them all off. Not sure this will work, but that is my first guess.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 11, 2010, 00:52:21 am
You were right! I was doing that while waiting for your answer. I made all of them unavailable. Now after filling out the form, I am going directly to the check out page with all the details. But when I click on confirm order, I get Error: Please select a Payment Method.
Do you know why?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 01:38:06 am
Based on what I've now read, there is not an easy way to do this without hacking the core to turn off payment check. I'm sure I could do it, but I don't have the time to poke around. I would look at in this order...

1. administrator/components/com_virtuemart/html/checkout.index.php (try that fist! I bet it's right in there and an easy fix with an if statement)

2. administrator/components/com_virtuemart/classes/ps_checkout.php
3. administrator/components/com_virtuemart/classes/ps_order.php
4. administrator/components/com_virtuemart/classes/ps_payment_method.php


Otherwise, the other way to handle it without hacking is to apply a payment method of Purchase Order, and change the language files to make sense... something like...

radio button: Send me an detailed email of the wishlist.

This is the only "payment" option, which is now not a payment option, so they can't select anything else. Kinda cluegy, but it would work.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 02:04:39 am
<!-- WISHLIST START -->
<br /><a href="index.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id ?>&amp;flypage=shop.<?php echo $flypage ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem" title="Add to Wishlist"><i><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_ADD_TO') ?>!</i></a>
<!-- WISHLIST END -->

That is the code shown for the product details page, but it is loaded via the
components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php


Yea, I checked and that code is in my addtocart_form.tpl.php page.  So, the problem must be with the page that executes the code in the product details page.  What page would that be?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 02:21:55 am
Whatever flypage you have chose to work with:

The default is:
components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php

If you are seeing the add-to-cart button, then the other link should be there since they are loading from the same file (addtocart_form.tpl.php). But maybe it is off to the right side, and not visible because of your template layout.

Use Google Chrome (right click on add-to-cart button and inspect element) or for firefox get Firebug... does the same thing. You can inspect the elements of your site and their locations, css, etc. This will help you troubleshoot.

I would expect to see my wishlist code link right after the add to cart button.

You might want to add a <br style="clear:both;" /> right before my hack to make sure it does show up below the add to cart, and not to the right side.

Also maybe you are using a different addtocart_xxxx template which doesn't include my hack.?

-F
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 02:44:40 am
Whatever flypage you have chose to work with:

The default is:
components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php

If you are seeing the add-to-cart button, then the other link should be there since they are loading from the same file (addtocart_form.tpl.php). But maybe it is off to the right side, and not visible because of your template layout.

Use Google Chrome (right click on add-to-cart button and inspect element) or for firefox get Firebug... does the same thing. You can inspect the elements of your site and their locations, css, etc. This will help you troubleshoot.

I would expect to see my wishlist code link right after the add to cart button.

You might want to add a <br style="clear:both;" /> right before my hack to make sure it does show up below the add to cart, and not to the right side.

Also maybe you are using a different addtocart_xxxx template which doesn't include my hack.?

-F


I think I might have made the text for my add to cart button white so that it can't be seen.  I'll have to go in and check.  However, for the time being can you help me with that other issue; I can't make any more posts there because I checked the problem as being solved.  The issue now is that when someone logs in and tries to view the store, they can see the store but for some reason it shows them as being logged out, unless they go back to the home page.  You can check out the site to see what I mean; I've already sent you the details in that previous pm.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 02:58:54 am
Whatever flypage you have chose to work with:

The default is:
components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php

If you are seeing the add-to-cart button, then the other link should be there since they are loading from the same file (addtocart_form.tpl.php). But maybe it is off to the right side, and not visible because of your template layout.

Use Google Chrome (right click on add-to-cart button and inspect element) or for firefox get Firebug... does the same thing. You can inspect the elements of your site and their locations, css, etc. This will help you troubleshoot.

I would expect to see my wishlist code link right after the add to cart button.

You might want to add a <br style="clear:both;" /> right before my hack to make sure it does show up below the add to cart, and not to the right side.

Also maybe you are using a different addtocart_xxxx template which doesn't include my hack.?

-F


Ok, I reuploaded the flypage from the original files and the add to cart button didn't appear; just some other things did which I had initially edited like the availability text.  So, what else could possibly be wrong? 
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 03:28:29 am
Looks to me like the form isn't being loaded. Did you enable a stock check? Or not put pricing in the price field?

These things would prevent the add to cart from loading.

I sent you a PM regarding the other issue (virtuemart.php)
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 04:03:51 am
Looks to me like the form isn't being loaded. Did you enable a stock check? Or not put pricing in the price field?

These things would prevent the add to cart from loading.

I sent you a PM regarding the other issue (virtuemart.php)


Ok, the other issue is solved, so thanks for that.  Concerning this issue, I did have the pricing off, so I turned it on and now I can see all the buttons for add to cart, etc.  However, it doesn't put the products in my wishlist; it just adds them to another cart.  Also, the reason why I disabled the pricing initially was because for some reason, unless the prices are perfectly whole numbers like 2, 3, 4, etc., they get screwed up.  For instance, $2.33 gets turned in $2, etc.  I think it's either rounding up or rounding down.  So, I disabled it for that reason.  Is there a way to fix that issue so I can get the prices correct?  If not I could probably just turn the text white so that no one could see it.  The biggest issue right now, and the last problem I have really is that the products aren't going to the wishlist for some reason.  Visit my site to see what I mean.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 07:34:13 am
Ok... looks like the add to wishlist works great! No problems for me... added to a new wishlist I created, which you can see all wishlists created in the admin as well BTW (a Wishlist menu item is available in admin for viewing all created wishlists and items in the wishlists)

As for your price not showing decimal places, you need to check your VMadmin -> Store -> Edit store and make sure the decimal places are set to "2".

Then you should be rockin and rollin.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 08:05:04 am
 
Ok... looks like the add to wishlist works great! No problems for me... added to a new wishlist I created, which you can see all wishlists created in the admin as well BTW (a Wishlist menu item is available in admin for viewing all created wishlists and items in the wishlists)

As for your price not showing decimal places, you need to check your VMadmin -> Store -> Edit store and make sure the decimal places are set to "2".

Then you should be rockin and rollin.



Ok, I just noticed that the wishlist function is working properly.  My  mistake.  However, I already had the decimal places set to two and it still isn't working.  
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 08:17:41 am
Also, what files are the "Checkout" link and the "Share this Wishlist" link located?  I want to remove them because I'm only using my store as a product catalog so there's no need for a checkout process, and I can't have people sharing their wishlists with non-subscribed people; those functions serve no purpose for me.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 08:36:03 am
Apparently, a lot of other people have had the same issue before so I searched around and found the answer.  Even though I had my currency selected as dollars, put my dollar symbol, and specified 2 decimal places, that still wasn't enough because I had to list my default country in my store as the United States.  Now it works just fine.  Weird.  Anyways, thanks for all the help Forrester; my site should be up and running in the coming days now that I've gotten all of these minor issues out of the way.  Time to fill my catalog and do the other necessary stuff. 
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 08:45:12 am
Oh yea.  Forgot about removing the "Checkout" link and the other link. 
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 11, 2010, 11:57:31 am
These are VM template files. Look in the components/com_virtuemart/themes/default/templates/basket/
and
components/com_virtuemart/themes/default/templates/wishlist/

files.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 11, 2010, 23:48:25 pm
These are VM template files. Look in the components/com_virtuemart/themes/default/templates/basket/
and
components/com_virtuemart/themes/default/templates/wishlist/

files.


Ok, I found the "Share this Wishlist" link and deleted it.  However, I've looked through every file in basket and wishlist and I can't find the code for the "Checkout" link.  I've been using firebug, but I don't know how to check what page the html code I'm looking at is from; the stuff on the lefthand side.  Do you know how?


edit:  Problem solved, never mind.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 12, 2010, 04:25:51 am
Hi again Forrest,

I am almost there! Everything works perfectly, thanks so much for your help. The last thing I am trying to apply to the button send registration, the code of the button confirm order. Like this, I can skip the step 2 of the check out and go directly to the confirmation and thank you screen. Is that possible? And if yes, who can I do it?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: berserker on February 12, 2010, 05:51:42 am
Ok, never mind.  I found the solution to my problem in a previous thread on this forum.  Now, I've removed the checkout link as well.  That's the last thing I need.  Thanks again Forrest.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 12, 2010, 08:23:21 am
Glad you got it! Best of luck :)
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 12, 2010, 14:04:39 pm
Hi Forrest,

Don't know if you see my last message as it was mixed with the on-going thread. What do you think?
Wally
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 12, 2010, 21:06:25 pm
I'm not understanding your question.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: walter_moclear on February 12, 2010, 21:11:06 pm
Here is it again. I will try to make it more clear  :-\

When the user click on "send registration", I would like to skip the step 2/2 of the checkout and go directly to confirmation screen that says Thank you...

Is it possible?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 12, 2010, 22:31:59 pm
With a little hacking effort I'm sure it is. Payment option in step 2 is needed for checkout, hence why I had you turn it on and select Purchase Order. You would need to find a way to pass that info in the first button. Off hand, not sure, but a little research and trial-error you probably can get it.
Good luck!
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: syknarf on February 22, 2010, 21:12:29 pm
Hi.

First of all, thanks to Forrest for sharing this great module.

And now a little problem that I have.

When a customer logs in in my website, two warning messages are shown in "My Whishlists" box:

Quote
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/39/d243038590/htdocs/shop_/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1597

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /homepages/39/d243038590/htdocs/shop_/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1597

But the module works really fine, can add products, view lists, send emails.... all ok.
These warnings dissapear whe the customer access to the Wishlists System or go to a different page on the site. Also these warnings don't appear whe the customer is no looged.

Please could you help me to avoid these warnings to appear?

Thanks
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 22, 2010, 22:10:55 pm
Well, I looked into this and while I don;t have an immediate fix, I can tell you your store visitors will NOT have this issue.

This problem only appears if you login with an ADMIN or STOREADMIN account. I am assuming you are using your admin account to test this. Try creating a normal user account and test it... Should be just fine.

I will look to fix this on the next rev.

-F
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 22, 2010, 22:22:42 pm
What version of Joomla and VM you using?
This post may help: http://forum.virtuemart.net/index.php?topic=52567.0
May be a previous version of Joomla bug.

I believe if you update your J1.5 version, you will find it solved. But again, this should only be a problem with Admin and StoreAdmin accounts, so you only need to update this if it bothers you. Your shoppers won't see this.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: syknarf on February 22, 2010, 22:37:03 pm
Well, I looked into this and while I don;t have an immediate fix, I can tell you your store visitors will NOT have this issue.

This problem only appears if you login with an ADMIN or STOREADMIN account. I am assuming you are using your admin account to test this. Try creating a normal user account and test it... Should be just fine.

I will look to fix this on the next rev.

-F

Thanks for your fast answer Forrest.

I'm testing with admin and standard user accounts, and the warnings are shown in both accounts types.
Perhaps the server identify all these accounts with the same IP.

But there is another thing, only appears when login from Home page (menu item not linked to virtuemart), if the user login is in another page (p.e. shop, linked to virtuemart) the warnings didn't appears.

If I comment the line indicated by the warnings, these didn't appear, and all looks to work fine.
This is the code in administrator\components\com_virtuemart\classes\ps_wishlist.php:

...
if ($user_id == '' && !$perm->check( 'admin,storeadmin' ))
      {
         $user_id = $my->id;
      }
      elseif ($user_id != '')
      {
         // this can be called by a module -- thus vmInputFilter is not initialized
         if (isset( $vmInputFilter ))
         {
            $user_id = $GLOBALS['vmInputFilter']->safeSQL( $user_id );
         }
         else
         {
            $user_id = mysql_real_escape_string( $user_id );
         }
      }
...

the red line is that I comment. I don't know very well what this line of code do, so the module seems to work fine, but surely this isn't the proper fix.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 22, 2010, 22:43:31 pm
I think I have provided the proper fix in my prev post.

Update your Joomla to v 1.5.15... the latest rev. I'm assuming you are using an older version?

Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: syknarf on February 22, 2010, 22:47:52 pm
I'm using J1.5.9 and VM 1.1.4 stable
But joomla is configured in compatibility mode (due to some module that I have installed, don't remind what it was)
Updating joomla perhaps changes some hacks that I made...
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 22, 2010, 22:51:37 pm
Ah, yep, well that is an issue. If you read my previous posts, I included a link referring to the mysql_real_escape_string issue. Here it is again.
http://forum.virtuemart.net/index.php?topic=52567.0

This seems to be the problem. Likewise, I'm not sure that Legacy mode is not a problem either. Might try turning off legacy mode just for a second to see if this might be a problem... though I doubt it.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: syknarf on February 22, 2010, 23:04:20 pm
Ah, yep, well that is an issue. If you read my previous posts, I included a link referring to the mysql_real_escape_string issue. Here it is again.
http://forum.virtuemart.net/index.php?topic=52567.0

This seems to be the problem. Likewise, I'm not sure that Legacy mode is not a problem either. Might try turning off legacy mode just for a second to see if this might be a problem... though I doubt it.

Ok, when not running in legacy mode, the warnings not appear. This seems to be the real problem.
Well, now I need to find what module or pluging needs the legacy mode, and uninstall it if I don't really need it (I have installed so many modules and plugins many time ago, and some of them were not really important)

I'm so gratefull for your help, many thanks also for the fast answers, Forrest.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 22, 2010, 23:34:12 pm
If you upgrade to PHP5 this should solve it as well. If it doesn't then you really don't have a choice but to do one of three things:

1. Keep legacy off
2. Upgrade Joomla
3. Not use my hack
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: syknarf on February 23, 2010, 01:07:23 am
If you upgrade to PHP5 this should solve it as well. If it doesn't then you really don't have a choice but to:

1. Keep legacy off
2. Upgrade Joomla
3. Not use my hack

At the moment with legacy option off, there is no problem...
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 07, 2010, 03:36:53 am
Are you all going to want this for VM version 1.5 when it's released?
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: klutzon on March 07, 2010, 08:23:30 am
Are you all going to want this for VM version 1.5 when it's released?

I think that should be a definite yes (by default). :P
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 07, 2010, 09:56:41 am
fair enough :P
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 11, 2010, 21:39:19 pm
Firstly, thanks for making an amazing VM addition. This should be added to the core in my opinion.

I've pretty much got it all running and styled, apart from one issue.
The 'create a list' and 'add to list' forms send the user back to the home page (which is using a different template) and not the template assigned to the Virtuemart link.

I'll send you a PM with a link and a registered user account login.
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 11, 2010, 22:11:06 pm
Can you try using the attached file instead?

overwrite with:
administrator/components/com_virtuemart/html/wishlist.index.php

txs

[attachment cleanup by admin]
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 14, 2010, 22:26:23 pm
Thanks for the file.
It fixed the 'create a list' page, but the 'add to wishlist' link still takes you to the homepage after adding the product to the wishlist.

edit:
i've fixed it.
line 57/58. admin/com_vm/html/wishlist.add_item.php

edit the line to read;
$wishlist_form_action = URL .'index.php?option=' . $GLOBALS['option'] . '&page=wishlist.index&Itemid=' . $GLOBALS['sess']->getShopItemid();

echo '<form action="' . $wishlist_form_action . '" method="post" name="addtowishlist" id="addtowishlist">';
Title: Re: HACK Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 15, 2010, 00:07:26 am
yep... great. I'll update these files for the new rev. Glad you got it working.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 15, 2010, 01:48:45 am
FYI, I believe just changing out $mm_action_url with URL in my original doc would do the trick. All the other params you added in $wishlist_form_action are already included as input elements in the form, and are overwriting anyways the callouts you are making, since they are called after the action element. Plus, wihslist.index is not the proper page to redirect to.

Essentially what this means is the only thing you changed in doing what you did was calling out URL instead of $mm_action_url, so I am assuming that simple change would do the trick as well.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 15, 2010, 01:54:49 am
UPDATE 03-14-10: Download v1.5
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 16, 2010, 23:36:40 pm
Hi Forrest!

First, thank you for this amazing hack. People like you is what have made Joomla & virtuemart so fantastic.

I have installed your hack, and I still having the problem with the redirection, as other users in previous post, and at least in my case, the last version 1.5 doesn't resolve the problem.

I tried the modification that AndyZL proposed some post before about including the following lines:

Code: [Select]
$wishlist_form_action = URL .'index.php?option=' . $GLOBALS['option'] . '&page=wishlist.index&Itemid=' . $GLOBALS['sess']->getShopItemid();
echo '<form action="' . $wishlist_form_action . '" method="post" name="addtowishlist" id="addtowishlist">';

but unfortunatelly doesn't works for me as expected.

I have even formated the link exactly in the same way that was the url in my navigator, before click in the "add to wishlist" link. In my case, I have made some changes in your code to allow display the "add to wishlist" link in the browse page, in fact I don't use a link, but a button,  that I designed in my browse page template before to know that there was a nice guy, (you), that had developed a hack to allow "favourites/wishlist" in virtuemart.

All seems to be OK. The button works, I can add an item to the wishlist with no problem, and after to clicki in the "Add to favourites" button, something happens that avoid me to being redirected properly to the previous page, but in my navigator the url is correct and displays exactly the url I have wrote. In fact, if I update the navigator with this url the page that comes is exactly the expected page.

This is the code I'm using in the file wishlist.add_item.php:

Code: [Select]
// LOGGED-IN ?
if (!isset( $GLOBALS['my'] ) || !isset( $GLOBALS['my']->id ) || $GLOBALS['my']->id <= 0)
{
show_login( $product_id );
}
else
{
// OPEN form
global $mm_action_url;

// I need to get the category_id because I need to use it in the url to return to the previous page I came from
$category_id = vmGet($_REQUEST,'category_id');

$wishlist_form_action = URL .'index.php?page=shop.browse&category_id='.$category_id.'&option=' . $GLOBALS['option'] . '&Itemid=' . $GLOBALS['sess']->getShopItemid();

echo '<form action="' . $wishlist_form_action . '" method="post" name="addtowishlist" id="addtowishlist">';

As you can see I have replaced the wishlist_index page as in the AndyZL modification by my shop.browse page.

The page I was before click in the favourite button is:

http://localhost:8888/yeepdoo/index.php?option=com_virtuemart&page=shop.browse&category_id=13&Itemid=64

and after click in the "Add to wishlist" link the url in my navigator is exactly the same.

So, why am I not being redirected correctly?
It's unsane!! LOL

WELL, forgive my english I'm from Spain (Europe), and forgive me that I was a joomla newbie.

¿Any Idea?

Thanks in advance!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 17, 2010, 00:08:04 am
Hi again!

Only trying to make clearer my explanation.

I attach here two images of my virtuemart local installation:

The first one is what happen when I click in the "Add to Wishlist" link in my browse page, although is happening exactly the same when I click in the link allocated in the Product details page.

And the second one is what happen after click in the "Add to WishList", as you can see instead of being redirected to the browse page I receive this, although in the navigator the url is corect.

Nothing more...
I hope you can help me.
I'm excited with your hack it's exactly what I was looking for!



[attachment cleanup by admin]
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 00:19:26 am
First, you can't just redirect to the browse page, and what you have shown me above in images seems to be the correct steps. Just like the products details page, when a user adds the product to a wishlist, they:
1. Are taken to a page to ask what wishlist they want to add the product to.
2. Then click add to wishlist, and are directed to the page where the item is added to their wishlist and the wishlist list is shown.

This is exactly how this hack was designed to work.

The reason your added url isn't working (besides the fact that it wouldn't work anyways) is exactly the reason I gave to AndyZL. His wishlist URL is just being overwritten by the input values of the form (a few lines below his added code)

Quote
   // HIDDEN variables
   echo '<input type="hidden" name="page" value="' . $page . '" />';
   echo '<input type="hidden" name="product_id" value="' . $product_id . '" />';
   echo '<input type="hidden" name="func" value="wishlistAddItem" />';
   echo '<input type="hidden" name="option" value="' . $GLOBALS['option'] . '" />';
   echo '<input type="hidden" name="Itemid" value="' . $GLOBALS['sess']->getShopItemid() . '" />';

I the end, the form needs to redirect to this page in order to execute the product addition to the wishlist.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 17, 2010, 01:11:47 am
OK! Now I have perfectly understood your hack.

I love it, however I see a problem for the user.

In my current local installation I have deactivated the product details page, and I offer to users all the amount of data about the product in a hidden div that appears when they click in a "plus" button. I made this because I want to avoid users too many clicks in order to hear and buy my music as fast as possible. Your hack actually is exactly what I'm trying to avoid. It will be nice to offer the favourites/wishlist button to my users, but I want to avoid them to make two clicks each time they decide to add an item to their favourites/wishlist and finally arrive to a place (url), that will make them to make two clicks more in their navigators to go back to the previous screen.

I wonder if all these things could be made in a modal box, without leave the current page, or even better with Ajax. As I told you, I'm a newbie, not only in Joomla, and I don't know how to do this, but I'll be happy to pay for this.

¿could you be able to do this kind of work?
AJAX?

I think that all the process could be automatic, becuase in fact If a user want to see all his Wishlist, he can clicks in the proper button at the wishlist module.

SO, Let me know if you are this man, I really want to use your hack.

Anyway, if you can't make this kind of work, don't worry, If you give me your permission I'll contract to a programmer to make the magic, and then I return you the changes to offer for free to the community, OK?

Let me know,
And forgive my poor english again.

Thanks in advance!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 01:31:31 am
An easy fix to this is to have the add-to-cart buttons open in a pop-up window, or highslide window, etc.

Instead of index.php in the urls of add-to-cart buttons, you can put index2.php, which will load the page without the template.

Then add a variable to pass ($is_index = index.php or $is_index = index2.php) for other operations of wishlist (update, remove, etc), which will need to use one or the other, depending on how the page was accessed (either by index.php or index2.php).
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 17, 2010, 02:34:47 am
FYI, I believe just changing out $mm_action_url with URL in my original doc would do the trick. All the other params you added in $wishlist_form_action are already included as input elements in the form, and are overwriting anyways the callouts you are making, since they are called after the action element. Plus, wihslist.index is not the proper page to redirect to.

Essentially what this means is the only thing you changed in doing what you did was calling out URL instead of $mm_action_url, so I am assuming that simple change would do the trick as well.

I tried your update with mm_action_url, and at least for me, it didn't solve it. It is weird because it should use the hidden inputs for the redirection (like you say), but it doesn't seem to.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 02:46:11 am
It is using those inputs... trust me, at least it is on my system with FF, EI8, and Chrome. You can test it yourself as Hermes tried, with a totally different page, itemid, etc... you will see the inputs just overwrite it, and you can tell this by what your URL ultimately shows.

Very odd.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 03:02:59 am
what may be lost is what the inputs are calling out for session, etc... which I didn't look into. I did notice what you grab from another section of my code to create your URL is not the same as the inputs below... specifically itemid, and another one I think. so maybe one of the inputs is incorrect in value call out.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 17, 2010, 03:26:06 am
Just found another redirection issue on the form that shares the wishlist (page=wishlist.share&func=wishlistShare). Same problem with it going to the index.php page and not being redirected. Again, it is still ignoring the hidden inputs you've got there

Line 44, admin/comp/vm/html/wishlist.share.php
changed it to;
global $mm_action_url;
$form_action = $mm_action_url . 'index.php?option=com_virtuemart&page=wishlist.index&Itemid='.$GLOBALS['sess']->getShopItemid();

seems to fix it though.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 03:28:46 am
The thing is it CANT be ignoring all the inputs, otherwise the form wouldn't work at all. But it does. Like I stated above, likely it's one of the inputs not passing correctly, or something very unique to your system, as I cannot replicate your issue on my end, and no one else has had it. ??
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 03:36:46 am
What you could do, since we can't replicate, is narrow it down some... by removing your inputs one and a time and testing.

$form_action = $mm_action_url . 'index.php?option=com_virtuemart&page=wishlist.index&Itemid='.$GLOBALS['sess']->getShopItemid();

$form_action = $mm_action_url . 'index.php?option=com_virtuemart&page=wishlist.index

$form_action = $mm_action_url . 'index.php?option=com_virtuemart

$form_action = $mm_action_url . 'index.php?

This would pinpoint which is causing the problem. My guess is if you had:

$form_action = $mm_action_url . 'index.php?Itemid='.$GLOBALS['sess']->getShopItemid();

That this alone would solve the issue (itemid issue).
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 03:44:25 am
To try and wrap this up, I think it's itemid because of your template issue.

And if this is the case, you can see the way you call out itemid in your link is different than the input form.

So just changing the form INPUT itemid to the value you use, $GLOBALS['sess']->getShopItemid() should do the trick, and that is what I updated in v1.7 already.

Again, this is all a guess since I can't replicate on my live sites, and would appreciate if you can verify! :) thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 17, 2010, 10:42:43 am
Heyyy!!

All solved at least for me!

I didn't know that going to index2.php instead of index.php load scripts without the template. It's cool, and this advise will solve, just in my case, more that one problem I was having, like this one.

I have changed in the link (in my case button) that take user to the wishlist.add_item.php file index.php by index2.php, and I have included in this link the ability to open this link into a lightbox. The only problem is that the code lost the CSS styles, but nothing that can't be repared. As a newbie, I found a solution for this fact. At the file component.php inside "templates/system/" I have added a line of code calling to the css file, in my case, template_css.css and the magic is done.

Each time a user click in the wishlist link (in my case favourites button) a lightbox appears an the user don't live the current page he's viewing. COooool!

Probably, is not the best solution, and probably the best would be to do with Ajax, but at the moment, is a good solution, and avoid users a lot of clicks.

Hey AndyNZL!!, I think that you could try this option and forget the problem with the redirections.

Anyway, in my opinion, Forrest, the best option would be to avoid users going to the entire list of favourites each time he adds a new item to the list. He actually can do this by clicking in the "View my wishlist" link into the module. So that, why to go to the entire list everytime. But, it's my opinion, of course.

It's only that many times we don't think in the users, and somethings that could be nice abilities in our applications, sometimes becomes annoying abilities that at final users never use. And don't take my words hard, but your hack is nice, very nice, and I really need it, but 4 clicks for each item are a lot of clicks, ¿Don't you think so?

Anyway, using a modal box and redirecting to index2.php instead index.php is the best solution so far, and now works for me.

Think in my advises, don't take so hard my words, FORGIVE ME again my poor english, and AGAIN THANK YOU SO MUCH FOR THIS HACK MAN!!

Best Regards from Spain!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 17, 2010, 14:22:00 pm
This works brilliantly, i am still on 1.1.3 and using rt_mynxx so had to find and copy all the codes to my files, but everything was so simple, much better than mobyjams and at least this already includes all the features that moby has promised and is yet to deliver.

My only thing is the Add to Wishlist! Link, being an RT theme it looks really odd under my Add to cart button and i don't know php well enough to actually make it a button or add a background image or whatever needs to be done to make the link fit in better with my site.

What would i need to edit to be able to use my button image?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Roderick1 on March 17, 2010, 15:10:45 pm
First of all, thank you so much for this great option, WoW!!

I have installed like you told me to in the readme file, but i get some errors.

In virtuemart administration is see where the new tab was made called wishlist but if i click o it nothing happends see sreenshot1 please:
(http://www.top-casing.be/screenshot1.jpg)

When i add a product it shows me no products name or picture, look screenshot:
(http://www.top-casing.be/screenshot3.jpg)

My wishlist overview shows no pictures and names, see screenshot:
(http://www.top-casing.be/screenshot2.jpg)

How to solve this?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 17, 2010, 23:20:43 pm
Ok, one at a time :)

HERMES:
Thank you for your input, and I'm glad you've found a working solution for your concept. As for double clicks, There is a reason for the 2 click process.

So as you can see, a two click process is necessary. The one way to avoid this is to have the "Select a wishlist" form on the same page as the product, but to me this seems like a lot more to load on every product page (and in your case also category page), adding confusion to the process.
Granted, an ajax like popup process or index2 process works as well in terms of keeping clients on the same page, however, for a hack, and considering AJAX js script conflicts with templates is known to be an issue with so many users, I don't think at this time it would be best, as the support for this would be considerably more, and support takes my free time :)


CRANIALBLAZE:
Thanks for your compliments. You can use css to apply this as a button. If you want to apply the same button you have for add-to cart to the wishlist, then you just need to assign the same CLASS to the add-to-wishlist button. In default templates this class is: addtocart_button (class="addtocart_button").
You can view your classes by viewing the source, or using an element inspector like Firebug for Firefox, or Google Chrome's element inspector which is build in.
Once you know the class of the button you want to add, you will need to add this class to my add-to-wishlist links found:
com_virtuemart/themes/YOURTHEME/templates/product_details/addtocart_form.tpl.php
com_virtuemart/themes/YOURTHEME/templates/basket/YOUR2CARTTEMPLATES.html.php


RODERICK1:
I am assuming that your using another language file for your admin and site! If you look at me hack files you will see a language doc has been edited for:
administrator/components/com_virtuemart/languages/common/english.php
This is where I have defined many variables for the wishlist system! You will want to add these parameters for your Common language file as well. All wishlist language items are located at the bottom of the english.php document. This will solve quite a few problems.
As for your product images, are you not using product thumbnails? Look at the products via admin, and tell me if you have thumbnail images for your products. If you don't this is why. You could reference your full images if this is the case, by editing:
administrator/components/com_virtuemart/classes/ps_wishlist.php
find line:
   $row['product_thumb_image'] = $p_row['product_thumb_image'];
and change to:
   $row['product_thumb_image'] = $p_row['product_full_image'];
That should do the trick!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Roderick1 on March 18, 2010, 00:09:13 am
Hello,

I really messed up my live site now  :(

Getting massive errors:
Notice: Undefined index: product_price in /home/topcasi1/domains/top-casing.be/public_html/administrator/components/com_virtuemart/classes/ps_product.php on line 1835

Notice: Undefined index: product_currency in /home/topcasi1/domains/top-casing.be/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 1551

Notice: Undefined index: product_price in /home/topcasi1/domains/top-casing.be/public_html/administrator/components/com_virtuemart/classes/ps_product.php on line 1835

Notice: Undefined index: product_currency in /home/topcasi1/domains/top-casing.be/public_html/administrator/components/com_virtuemart/classes/ps_checkout.php on line 1551

Notice: Undefined index: product_price in /home/topcasi1/domains/top-casing.be/public_html/administrator/components/com_virtuemart/classes/ps_product.php on line 1835

Im going to place my backup back on the site.
Forrest, would you install this for us maybe and we pay you to do this?

O for the dutch people:

/* WISHLIST MOD */
   'PHPSHOP_WISHLIST_MOD' => 'Wishlist',
   'PHPSHOP_WISHLIST_ADMIN' => 'Wishlists',
   'PHPSHOP_WISHLIST_REPORTS' => 'Wishlist Reports',
   'PHPSHOP_WISHLIST_LIST' => 'Lijst Wishlists',
   'PHPSHOP_WISHLIST_LIST_LBL' => 'Wishlist Lijst',
   'PHPSHOP_WISHLIST_REPORT_LBL' => 'De Meest voorkomende Items in de Wishlists',
   'PHPSHOP_WISHLIST_USER_LBL' => 'Gebruiker',
   'PHPSHOP_WISHLIST_LIST_TITLE' => 'Wish Lists voor ',
   'PHPSHOP_WISHLIST_TITLE' => 'Wish List',
   'PHPSHOP_WISHLIST_SHOW' => 'Mijn WishLists',
   'PHPSHOP_WISHLIST_CREATED_BY' => 'Gemaakt door',
   'PHPSHOP_WISHLIST_CREATED_LBL' => 'Gemaakt',
   'PHPSHOP_WISHLIST_MODIFIED_LBL' => 'Bewerkt',
   'PHPSHOP_WISHLIST_PUBLIC_LBL' => 'Gedeelt',
   'PHPSHOP_WISHLIST_ITEM_COUNT' => 'Aantal Items',
   
   'PHPSHOP_WISHLIST_ERROR_NO_NAME' => 'Geef aub een naam op voor deze wishlist.',
   'PHPSHOP_WISHLIST_ERROR_DUPLICATE_NAME' => 'Sorry, een wishlist met deze naam bestaat al.',
   'PHPSHOP_WISHLIST_ERROR_NO_COMMENT' => 'Voer commentaar toe aan deze wishlist.',
   'PHPSHOP_WISHLIST_ERROR_NO_WISHLIST' => 'Selecteer aub een wishlist of voer een nieuwe wishlist naam in.',
   'PHPSHOP_WISHLIST_ERROR_NO_PERM' => 'Sorry, je hebt geen toestemming voor deze actie.',
   'PHPSHOP_WISHLIST_ERROR_NO_EMAIL' => 'Voer aub een geldig emailadres in.',
   'PHPSHOP_WISHLIST_ERROR_EMAIL_1' => 'Het emailadres ',
   'PHPSHOP_WISHLIST_ERROR_EMAIL_2' => ' is niet geldig.  Voer aub alleen een geldig emailadres in zoals hier aangegeven \'naam@voorbeeld.com\'.',
   'PHPSHOP_WISHLIST_ERROR_EMAIL_NO_FILE' => 'Er bestaat geen email template!',

   'PHPSHOP_WISHLIST_SUCCESS_EMAILED' => 'Je emails zijn met succes verzonden.',
   'PHPSHOP_WISHLIST_SUCCESS_SAVED' => 'Wish List Met Succes Opgeslagen.',
   'PHPSHOP_WISHLIST_SUCCESS_CART_SAVED' => 'Uw winkelmandje is opgeslagen.',
   'PHPSHOP_WISHLIST_REMOVE_SUCCESS' => 'De Wish List is verwijderd.',

   'PHPSHOP_WISHLIST_ADD_NEW' => 'Nieuwe Wishlist Toevoegen',
   'PHPSHOP_WISHLIST_ADD' => 'Voeg Wishlist Toe',
   'PHPSHOP_WISHLIST_ADD_TO' => 'Aan Wishlist Toevoegen',
   'PHPSHOP_WISHLIST_REMOVE' => 'Verwijder Wishlist',
   'PHPSHOP_WISHLIST_REMOVE_FROM' => 'Verwijder',
   'PHPSHOP_WISHLIST_REMOVE_CONFIRM' => 'Ben je er zeker van dat je de wishlist wilt verwijderen met alle items erin?',
   'PHPSHOP_WISHLIST_SHARE' => 'Deel deze Wishlist',
   'PHPSHOP_WISHLIST_STOP_SHARE' => 'Stop Met Delen van deze Wishlist',
   'PHPSHOP_WISHLIST_STOP_SHARE_CONFIRM' => 'Dit zorgt ervoor dat niemand anders meer je wishlist kan zien, ook mensen die je hebt uitgenodigd. Weet je het zeker?',
   'PHPSHOP_WISHLIST_SAVE_CART' => 'Sla deze winkelmand op als wishlist',

   'PHPSHOP_WISHLIST_CART_ADD_TO' => 'Voeg alle items toe aan de winkelwagen',
   'PHPSHOP_WISHLIST_SAVE' => 'Opslaan',

   'PHPSHOP_WISHLIST_NO_WISHLISTS' => 'Je hebt geen wishlists.',
   'PHPSHOP_WISHLIST_NO_WISHLISTS_ITEMS' => 'Er zijn geen items in deze wishlist.',
   'PHPSHOP_WISHLIST_NAME_SELECT' => 'Selecteer aub een wishlist:',
   'PHPSHOP_WISHLIST_OR' => 'OF',
   'PHPSHOP_WISHLIST_NAME_NEW' => 'Voer aub een naam in voor een nieuwe wishlist:',

   'PHPSHOP_WISHLIST_CODE_LABEL' => 'WishList Code:',
   'PHPSHOP_WISHLIST_LINK_LABEL' => 'Link:',

   'PHPSHOP_WISHLIST_EMAIL_HEADER' => 'Deel Deze WishList',
   'PHPSHOP_WISHLIST_EMAIL_DESCRIPTION' => 'Deze wishlist is nu public gemaakt.  Wil je graag de wishlist emailen naar anderen?  De ontvangers zullen een link ontvangen met een het stukje commentaar wat je hieronder kunt invoeren.',

   'PHPSHOP_WISHLIST_EMAIL_TRY_LINK' => 'Probeer het',
   'PHPSHOP_WISHLIST_EMAIL_ADDRESSES_LABEL' => 'Email adres(sen) (gescheiden door commas):',
   'PHPSHOP_WISHLIST_EMAIL_COMMENTS_LABEL' => 'Bericht om te versturen (optioneel):',
   'PHPSHOP_WISHLIST_EMAIL_SEND' => 'Verstuur deze WishList',

   'PHPSHOP_WISHLIST_EMAIL_SUBJECT' => 'wil je graag zijn/haar wishlist zien.',

   'PHPSHOP_WISHLIST_LOGIN' => 'AUB Inloggen.'
   /* END WISHLIST MOD */
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 00:24:48 am
Sure, just shoot me a PM for discussion.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 18, 2010, 00:58:14 am
Hi Forrest!

Thank you for your kind words!

As I told you the add to wishlist link is working perfect in a modal box. However, as expected, the other links like: "share wishlist" and "Add all items of this wishlist to the cart", etc... still show the entire template inside the box. Of course, I can change in the wislist.index all index.php redirections to index.2php, but the look of your amazing hack would be awfull each time user would access to it from the fontpage, or throught the module, isn't it?

I have been searching how to close the modal box just in case user clicks on any of these other links, and I haven't found anything, nor in any of my Google searches. The real problem is that I'm a really newbie, more than you can imagine....
I'm not have many acknowledge about JQuery or MooTools, and I don't know how to close my "Shadowbox" at the same time the script redirect to the needed url out of the box.

Whatever!
It's not your problem, your hack works like a charm as you designed it.

About My opinions about how to improve the hack, forget my words! because you are right! The nice of this hack is that it offers to user the posibility to choose in what list he wants to save his favourite item. And reading your words, I realize that my complaining has nothing to do with your hack, because I'm talking about other type of hack, I'm talking about a list of selected items of the user (that as in your case could be added to the cart or not. I'm talking about a "PLAYLIST" not about a List of Favourites which is your hack. In fact I realize that I need both hacks. My online store is about profesional music to use in video productions, tv programs, etc... It would nice that users use your hack (List of Favourites) or Whislist) to save all the songs that he considers are OK to use in their productions, although not for the production or work they are searching for music in this moment. And It would be nice too, to have another hack, probably more simple hack, that allow users to save songs in a (Playlist) that would be deleted or not after they left the site, that match with the current project that they are searching for music. Of course, the best option would be that this list is viewed in a module at the frontend page, and this playlist, exactly in the same way that your hack works, could be managed (users can delete items), or added to the cart, or even better, added as a new List of Favourites. Uuuuuuh!! This could be fantastic!!

Of course, this playlist would be unique, so that User don't need to give it a name, so that the add to playlist process would be simpler.

Whatever, it's only and Idea, but it reflects how I was worm¡ng about your hack. Forget my words, I was talking about other type of hack, your hack is Marvelous, absolutely fantastic as it is.

By the way, if there is someone reading this post that can make light in my problem about how to close my modal box "ShadowBox" when user clicks in the wishlist link inside abox, I will be gratefull all my life! LOL

Nothing more Forrest.
I will be following this post just in case you find any solution to the redirections, and find a solution better than me, to avoid clicks to users.

Thank You!!


Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 02:41:40 am
UPDATE 03-17-10: Download v1.6

NOTE: ps_wishlist may need to be altered if you are having an array problem. While I didn't take the time to carefully fugure out why, it seems to be a PHP version issue with earlier php. Symptoms are what Roderick1 had with no product images and names being carried to wishlist. http://forum.virtuemart.net/index.php?topic=66530.msg226992#msg226992


You can download update on first post of this thread.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 02:54:30 am
Hermes, it's not that your concept is bad, it actually is not a bad idea. It's similar to being able to add a product to cart without leaving the product page, which VM supports.

The issue is that it is a two click process, so it takes a little more than a pop-up saying "Product was added to your wishlist".

Having said that, maybe down the road I will consider a version of such that does this in a modal or popup or similar. Frankly, it's not that hard.

What would need to be done is every link would have to be a variable for "index.php": ie $is_index. And $is_index would vary depending on how someone accessed the wishlist system.

If someone accessed it from the mod, it would just be index.php, and all links within wishlist would retain index.php (add, update, share, etc).

However if someone accessed it via "Add to wishlist" from flyapge or cart, then yes, it would be a modal box with index2.php, and all links within wishlist(add, update, share, etc) would then retain the index2.php.

So conceptually I like it, but again my concern is I'm adding a whole other level of support, as anything that looks good would require some js... which means js conflicts! So I'm hesitant.

We'll see. Thanks for your ideas. And I do see what you see about playlist. Feel free to modify my hack to achieve such, and share it here!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 18, 2010, 03:32:15 am
I found, and fixed another issue. On the wishlist.index page, the category id is missing from the product link.

line 204, add.
require_once(CLASSPATH.'ps_product_category.php');

line 222, add.
$ps_product_category = new ps_product_category;
$cid = $ps_product_category->get_cid( $wl_item['product_id']  );

line 227, change to;
$tmp = str_replace( "{product_url}", $wl_item['product_link'].'&category_id='.$cid, $tmp );

I will get back to you on the Itemid thing.

edit: this only works when you have SEF urls turned off.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 03:39:18 am
Thanks for the work AndyNZL, however this was specifically left out, as I assign multiple categories to a single product, and this function just choses the last (or is it first) category in a multiple category select.

Therefore, rather than just assigning it to a random category, it's discluded. I didn't have a good reason why it should be, though for some, it may be handy if they do not use multiple categories.

Look forward to the itemid response.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 18, 2010, 06:39:16 am
Ok, one at a time :)

CRANIALBLAZE:
Thanks for your compliments. You can use css to apply this as a button. If you want to apply the same button you have for add-to cart to the wishlist, then you just need to assign the same CLASS to the add-to-wishlist button. In default templates this class is: addtocart_button (class="addtocart_button").
You can view your classes by viewing the source, or using an element inspector like Firebug for Firefox, or Google Chrome's element inspector which is build in.
Once you know the class of the button you want to add, you will need to add this class to my add-to-wishlist links found:
com_virtuemart/themes/YOURTHEME/templates/product_details/addtocart_form.tpl.php
com_virtuemart/themes/YOURTHEME/templates/basket/YOUR2CARTTEMPLATES.html.php

Thanks, working perfectly now, great mod. Implemented yesterday and my clients went mad with it. Have more wishlist items now in just a few hours than i had in the 3+ months i was using the MobyJam mod.

Also unlike moby this mod does not seem to add random items, my user account had over 20 items in the list i had not added a single 1.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 06:45:20 am
Great CranialBlaze!


As a reminder to all users, please take a minute of time to leave a review here: http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=331&Itemid=
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: AndyNZL on March 18, 2010, 21:32:31 pm
Ok, so that category id addition doesn't  work with sh404sef, so I've had to remove it. Any ideas on passing through the id from the wishlist list page to the product flypage?

Also, I tested removing the get parameters from the wishlist.add, wishlist create, and wishlist.share pages and it still works :D. So your theory is correct :D
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 22:39:03 pm
Thanks for your valuable feedback AndyNZL. Do you still have login enabled for me on your site? and ftp access? PM me so we can look further.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 18, 2010, 23:23:02 pm
Great CranialBlaze!


As a reminder to all users, please take a minute of time to leave a review here: http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=331&Itemid=

I would love to but for the love of me i cannot see a link/button to add a review with, and yes i am logged in.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 18, 2010, 23:38:04 pm
Oh, first click on the product to which you want to review, then at the bottom of that page you will find a review form. I know if you are using google chome, it doesn't show for some reason.

Thanks!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Ventsi Genchev on March 19, 2010, 15:59:00 pm
This is a great hack, but I noticed one problem.

When a product is not published, it can be seen in the list as
 .... (unpublished).
But, can be inserted in the card and to make contract.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 19, 2010, 18:26:02 pm
?? Not fully understanding you, but if you see an product that is unpublished, you are logged in with administrative rights... you are not a shopper.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Ventsi Genchev on March 19, 2010, 20:31:38 pm
I mean the products in the wishlist. I see:
Product test (Unpublished)
Am not an administrator account. I see (Unpublished), which is called by ps_wishlist.php:

if( $row[ 'product_publish' ] == 'N' )
         {
            $row['product_name'] .= ' (' . $VM_LANG->_('CMN_UNPUBLISHED') . ')';

As I said the problem is not the case, but that can be added to shopping cart product that has not been published.

EDIT:
Let me explain a little more detail:
The client has a favorite product, added to the list. When the owner of the shop away from the post this product, it remains in the client list and he can add it to your cart.

And one more question. Will there be an update by adding the price of products in the wishlist?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 19, 2010, 22:23:31 pm
I understand now. I will look into it. Pricing is easy.. I may consider it in next update.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Ventsi Genchev on March 19, 2010, 22:42:25 pm
Great.

Last question.
I use a template Mynxx. If this hack using the standard add product to cart, I can use the functionality of Mynxx. Will not be displayed every time the page with the cart, but will work Mynxx dropdown menu.

As to price, which will be shown, it should be different according to the groups.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 20, 2010, 00:19:00 am
I am not familiar with Mynxx and it's dropdown "menu"? Maybe you PM me your link and more details.

Yes, the pricing function does this inherently with VM as long as called out right.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Ventsi Genchev on March 20, 2010, 06:35:44 am
Unfortunately my site is still on the local server, but you can look here:
http://demo.rockettheme.com/?template=mynxx
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 20, 2010, 06:53:54 am
Great.

Last question.
I use a template Mynxx. If this hack using the standard add product to cart, I can use the functionality of Mynxx. Will not be displayed every time the page with the cart, but will work Mynxx dropdown menu.

As to price, which will be shown, it should be different according to the groups.

My site uses the mynxx theme, I assume you are referring to adding an item from your wishlist to the cart, then it does not call the mynxx ajax query, but it should be possible to implement the ajax query as long as you can find it in the mynxx theme files i am sure Forest can tell you what to replace.

Its a simple call to function change, before using mynxx i had a lot of yagendoo's mods and 1 of their mods changed that specific function. I am far from that good with php, but if i can find the function of rockets i can try and switch it into the wishlist.

@ FOREST
I will just need to know where to find the add to cart instruction is in the wishlist files.

Other than that the ajax function remains in tack on the normal browse and details pages.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 21, 2010, 01:24:39 am
UPDATE 03-21-10: Download v1.7


Get update on first page, first post of this thread.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 21, 2010, 01:35:27 am
mynxx looks to be calling out from the same function as the typical add-to-cart ajax function, so likely my new update will automatically work on mynxx. I believe mynxx has just customized the css and js for the add-to-cart function to achieve their ascetics.

PLEASE NOTE: I did not have a chance to test my update for v.17 at all, so please someone let me know that this new update is working right :)
I suggest you try all combinations: Shopper group pricing, discounts, coupons, attributes... both with ajax on and off, as add to cart functions are handled differently based on ajax setting.

Further note, you will see 3 options for description in your wishlist item templates (public & private).
{description} = the attributes for item the user selected when adding to list.
{product_s_desc} = the product short description
{product_desc} = the product full description

AndyNZL, I didn't integrate any category passage option yet, but it can be. Maybe next update.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 23, 2010, 20:00:41 pm
Thanks, working brilliantly on my side. awesome mod...
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 23, 2010, 20:03:23 pm
cool, thanks for feedback CranialBlaze
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 24, 2010, 01:42:41 am
Hi Forrest!

I'm happy to see your hack is getting better day by day.
By the way, I tried the new versión 1.7, and I addded the modifications you made on every of my hacked files, and Yeaaah! It Worked perfect!

I only corrected one thing, well, the same thing in two files, exactly in the wishlist_item_row.php (Public & Private). When I tried to see the products added to the cart I didn't see the icons "addto cart", nor "removecart" to the right of the product. I took a look at the code, and I don't know if I'm wrong but I added to the path of the image inside the input submit tags the word "default" that allows to search for the images inside the path themes/default/add-cart-sm.png.

This is code that works for me:

Code: [Select]
<form action="{addtocart_link}" method="post" name="addtocart" id="{uniqid}" class="addtocart_form" {onclick}>
<input type="submit" style="background: url(components/com_virtuemart/themes[color=red][b]/default/[/b][/color]images/add-cart-sm.png); width:24px; height:24px; border:0px; padding:0px; margin:0px;" value="&nbsp;" />
<input type="hidden" name="product_id" value="{prodid}" />
<input type="hidden" name="prod_id[]" value="{prodid}" />
<input type="hidden" name="quantity" value="{product_quantity}" />

Code: [Select]
<form action="{remove_link}" method="post" class="addtocart_form">
<input type="submit" style="background: url(components/com_virtuemart/themes/[b][color=red]default/[/color][/b]images/remove_from_cart1.png); width:24px; height:24px; border:0px; padding:0px; margin:0px;" value="&nbsp;" />
</form>

About our conversation last week, sorry to don't answer you before, I've been sick all week, but today I return to work on my website. I want to make you a question...

Hermes, it's not that your concept is bad, it actually is not a bad idea. It's similar to being able to add a product to cart without leaving the product page, which VM supports.

The issue is that it is a two click process, so it takes a little more than a pop-up saying "Product was added to your wishlist".

Having said that, maybe down the road I will consider a version of such that does this in a modal or popup or similar. Frankly, it's not that hard.

What would need to be done is every link would have to be a variable for "index.php": ie $is_index. And $is_index would vary depending on how someone accessed the wishlist system.

If someone accessed it from the mod, it would just be index.php, and all links within wishlist would retain index.php (add, update, share, etc).

However if someone accessed it via "Add to wishlist" from flyapge or cart, then yes, it would be a modal box with index2.php, and all links within wishlist(add, update, share, etc) would then retain the index2.php.

So conceptually I like it, but again my concern is I'm adding a whole other level of support, as anything that looks good would require some js... which means js conflicts! So I'm hesitant.

We'll see. Thanks for your ideas. And I do see what you see about playlist. Feel free to modify my hack to achieve such, and share it here!

I'm not sure where to insert this new variable $is_index in order to achieve what would be my dream, to have working all the links inside my modal box.

I tried in some files to put this new variables but I just got links opened in my modal box, or opened out from the box, not both ways working as expected, or not exactly how I expected to be able to make work your nice hack.

¿Can you enlight me on this aspect?
¿Should I add this new variables in the class? ¿Where? ¿Or in the wishlist_index.php file? ¿Any idea?

I have changed so many files in my virtuemart/joomla installation with my only 5 months of php, in order to adapt virtuemart and Joomla to my needs. But Believe Me, I'm a completely newbie as programmer, but instead I'm a wonderfull Conductor of Orchestra, I can enlight you if you have doubts about notes ansd silences, LOL!!

Any help will be appreciated!!

Thanks again for the time you give to users as me, and thanks for your efforts and for this great Hack!

Bye!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 24, 2010, 03:04:34 am
Hermes, thanks for the reply.

I did adjust the folder in the new install (as you will see). Images folder now outside of default theme, so that image dir doesn't have to be changed based on theme.

As for $is_index, this is not something I can step you through. Though it is easy for me because I know where everything is at, it would take more time for me to step you through it than to do it... either one is something I have not time for right now.

Maybe in another update!

(but if you want to try..)
You'd need to use $_GET command to get page index.php or index2.php, and then set $is_index = to it. Now that $is_index is = to index.php or index2.php, you can use that variable in place of all index.php for links, forms, etc... hence passing along the proper value.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 24, 2010, 08:56:03 am
Hi Forrest!

About the images path, as I just was inserting the code you changed on every file, I didn't realize that you have changed the position of the images folder. I'm so sorry!

And about my modal box question and links redirections, OK! Now, I realize how to do it! You're the man!

I'll try to do it, and I'll tell you if I succeed, OK?
And of course, I'll offer to the community.

Thanks Again!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 24, 2010, 10:51:52 am
Look forward to hearing about your success. :)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 24, 2010, 21:54:14 pm
I just spotted 1 little inaccuracy in the admin section, nothing to worry too much about.

On the wishlist report, it indicated that it is displaying 1 - 10 of 10 products when in fact there are 27, because of this using the drop down to change the display of how many products does not work, it was on the default of 20 and still displaying all 27 products, that may become a bit of a problem when sites start hitting triple digits for wishlist items
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 24, 2010, 21:57:51 pm
hmmm, k, thanks for input again. I'll look at it during next release.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 25, 2010, 14:02:53 pm
Hi Forrest Good & Bad News...

First, I have succeed with your idea about the $is_index variable, and now I have got my wishlist system working perfect, as far as I know, and as far as I have tested. So, when you click in the add to wishlist at ant product a nice modal box is open and all the actions are made inside without leave the modal box. Otherwise, when the user access by clicking at the module link, any modal box is open, and all the process happen at the frontend. Yeahhh!!

The bad new is that I used the previous version of your hack, because in my case, dosen't work. I told you that works actually, and it seems to be working really, but when you try to add an item to the cart, or delete an item, doesn't delete, nor add to the cart nothing. Maybe, well I'm sure that the problem is me, that I'm using a button to go the script instead of your link. In fact, I realize after that if I change in the wishlist_item_row.php (private & public) files of the new version 1.7 the <form> buttons by the links {addtocart_link} & {remove_link} of the previous version 1.6 all seems to be working. So, I guess that the problem is a variable that is lost anywhere, or something like this, because, Believe, although I have succeed changing your hack to adapt to me need, I still don't know exactly how your hack works! Ha,ha,ha... Remember, that I'm a newbie, I'm sure the most newbie programmer you ever know, LOL!!

Well, then... How I have succeed making that the script be open in a modal box or in the frontend, according with the way you access to the script, by the link or by the module, and Please, Forgive me evreyone my poor english, OK?

Actually, I have inserted the variable $is_index everywhere, and sometimes I added in the url and as hidden field at the same time, because, in some scripts the variable was lost after making some action. I'm sure that you will see how to reduce the number of code lines, or how to declare this variable as global in the hack, or something like this. Or of course, you can forget the fool idea of a newbie using your hack, LOL!

1) The first thing to do is to set the value of the variable $is_index inside the two places that is evoked the script which are: a) into the file mod_vm_wishlist.php and inside the file addtocart_form.tpl.php. If someone is using as me another button in the browse template to access to the wishist script different that the link added to the addtocart_form, of course you must change the value of $is_index inside the browse template you was using, and also in the flypage you was using, OK?

The way to do it, in my case, I used the 1.6 version, so in the links that point to the script, in the case of the link in the template I used index2.php to get the script open in my modal box, and index.php to get the script open in the frontend. Here my code in both cases:

mod_vm_wishist

Code: [Select]
// Set the value of $is_index
$is_index = 'index';

?>
<div>Crea o visualiza tus Listas de Favoritos!<br />
<a class="" href="<?php $sess->purl($GLOBALS['mosConfig_live_site'] . "/index.php?page=wishlist.index&is_index=$is_index")?>" title="Crea o visualiza tus Listas de Favoritos!">&bull; <strong><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_SHOW'); ?> <?php echo $wishlist_count?></strong></a>
</div>

addtocart.tpl.php Remember that I'm using the 1.6 version that have links instead of a form to obtain the buttons.

Code: [Select]
<!-- WISHLIST START -->
   
<?php
// Set the value of $is_index
$is_index 'index2';
?>

   
<a rel="modalbox;width=750;height=575" href="<?php echo $is_index ?>.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id_wish ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id_wish ?>&amp;flypage=shop.<?php echo $flypage_wish ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem&is_index=<?php echo $is_index ?>" class="bt_fav"><img src="http://localhost:8888/yeedooh/images/yeedooh/vm_yeedooh/heart.png" title="Adjuntar a Lista de Favoritos" alt="Adjuntar a Lista de Favoritos">&nbsp;</a>
   
<!-- WISHLIST END -->

2) To add the variable inside the file whislist.index.php

after this line:
Code: [Select]
$wl_list = ps_wishlist::get_wishlists( $user->id );
I added the following line:
Code: [Select]
// Get the is_index;
$is_index = $_POST['is_index'];
($is_index != "") ? $is_index : $is_index = $_GET['is_index'];

Then I replace this line:
Code: [Select]
$base_url = URL . 'index.php?option=' . $GLOBALS['option'] . '&page=wishlist.index&Itemid=' . $GLOBALS['sess']->getShopItemid();
by this other line:
Code: [Select]
$base_url = URL . $is_index . '.php?option=' . $GLOBALS['option'] . '&page=wishlist.index&Itemid=' . $GLOBALS['sess']->getShopItemid();
Then I replace this line:
Code: [Select]
$url = JRoute::_($base_url . '&wishlist_id=' . $wl['wishlist_id'] . '&uid=' . $user->id);
by this other:
Code: [Select]
$url = JRoute::_($base_url . '&wishlist_id=' . $wl['wishlist_id'] . '&uid=' . $user->id . '&is_index=' . $is_index);
Then I replace this line:
Code: [Select]
$wishlist_form_action =  JRoute::_($base_url . '&uid=' . $user->id);
by this other:
Code: [Select]
$wishlist_form_action =  JRoute::_($base_url . '&uid=' . $user->id . '&is_index=' . $is_index);
Then after this line:
Code: [Select]
$wishlist_form_hidden .=  '<input type="hidden" name="Itemid" value="' . $GLOBALS['sess']->getShopItemid() . '" />';
And finally, I added the following line:
Code: [Select]
// Pass hidden the value of is_index
$wishlist_form_hidden .= '<input type="hidden" name="is_index" value="' . $is_index . '" />';

3) At the file whislist.add_item.php

After this line:
Code: [Select]
// OPEN form
global $mm_action_url;

I Added the following lines:
Code: [Select]
// Get the is_index;
$is_index = $_GET['is_index'];

echo '<form action="'.URL. $is_index . '.php" method="post" name="addtowishlist" id="addtowishlist">';

// End Hack

Then after this line:
Code: [Select]
echo '<input type="hidden" name="Itemid" value="' . $GLOBALS['sess']->getShopItemid() . '" />';
I added:
Code: [Select]
// Pass hidden the value of is_index
echo '<input type="hidden" name="is_index" value="' . $is_index . '" />';

And by the way, this has nothing to do with the modification but I commented after this lines the following lines to reduce the space displaying the form:
Code: [Select]
/*echo '<br style="clear:both;" />';*/
/*echo '<br />';*/
but this is a silly thing, it's only that in my case, as I'm using a modal box, the space becomes a big important thing.

4) At file whislist.save_ cart.php

After this lines:
Code: [Select]
show_login( $Itemid );
}
else
{

I added the following:
Code: [Select]
// Get the is_index;
$is_index = $_GET['is_index'];

And replace this line:
Code: [Select]
echo '<form action="' . $mm_action_url . 'index.php" method="post" name="addtowishlist" id="addtowishlist">';

by this new one:
Code: [Select]
echo '<form action="' . $mm_action_url . $is_index . '.php" method="post" name="addtowishlist" id="addtowishlist">';

Then after this line:
Code: [Select]
echo '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
I added:
Code: [Select]
// Pass hidden the value of is_index
echo '<input type="hidden" name="is_index" value="' . $is_index . '" />';

5) At the file wishlist.list.php

After this line:
Code: [Select]
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_WISHLIST_LIST_LBL'), $GLOBALS['keyword'], $modulename, "list");

I added:
Code: [Select]
// Get the is_index;
$is_index = $_POST['is_index'];
($is_index != "") ? $is_index : $is_index = $_GET['is_index'];

Then I replace this line:
Code: [Select]
$url = $_SERVER['PHP_SELF'] . "?page=$modulename.list&wishlist_id=" . $wl['wishlist_id'];
by this one:
Code: [Select]
$url = $_SERVER['PHP_SELF'] . "?page=$modulename.list&wishlist_id=" . $wl['wishlist_id'] . 'is_index=' . $is_index;
Then I replace this line:
Code: [Select]
$url = $_SERVER['PHP_SELF'] . "?page=product.product_form&product_id=" . $wl_item['product_id'];
by this one:
Code: [Select]
$url = $_SERVER['PHP_SELF'] . "?page=product.product_form&product_id=" . $wl_item['product_id'] . 'is_index=' . $is_index;
And FINALLY at the file whislist.share.php

After this line:
Code: [Select]
// PAGE Title
$mainframe->setPageTitle( $GLOBALS['VM_LANG']->_('PHPSHOP_WISHLIST_EMAIL_HEADER') );

I added:
Code: [Select]
// Get the is_index;
$is_index = $_GET['is_index'];

Then I changed these lines:
Code: [Select]
// prep
$form_action = URL . 'index.php';

$wishlist_link = URL . 'index.php?option=com_virtuemart&page=wishlist.index&wishlist_code=' . $wl['code'];

by these new ones:
Code: [Select]
// prep
$form_action = URL . $is_index . '.php';

$wishlist_link = URL . $is_index . '.php?option=com_virtuemart&page=wishlist.index&wishlist_code=' . $wl['code'];

After this line:
Code: [Select]
$hidden_inputs .= '<input type="hidden" name="Itemid" value="' . $GLOBALS['sess']->getShopItemid() . '" />';
I added:
Code: [Select]
// Pass hidden the value of is_index
$hidden_inputs .= '<input type="hidden" name="is_index" value="' . $is_index . '" />';

Ooooh Yeahhh!!

Finally, I finished!!

Well, of course Forrest, I guess that some of the lines I added could be ineffective. So try to fix my mistakes as far as possible, or choose another way to get work the modification, OK?

Nothing more.... Thank you again for this Hack!!

Bye!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 25, 2010, 18:39:14 pm
Well, not bad Hermes. It could be cleaned up a little, but overall good job.

I believe the fact the script isn't working in v1.7 is because you have the AJAX turned on (in VM config) for add to cart. So it works in regular template, but with index2.php, I'm pretty sure ajax is not loaded, so the form fails to do any action.

You could just load ajax into index2.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: alikon1 on March 25, 2010, 20:03:34 pm
Thank you, very useful and functional component.

Install this hack (Last 1.7). All function works. Do not work wishlistUpdateitem and wishlistDeleteitem functions(
1. When pressing Update quantity button, get warning message "Sorry, you do not have permission to do this action."
// VERIFY we're either an admin, or the user who created this list
But I am user who created this list, check in PHPmyAdmin, list has my correct user_id.
2. When pressing Delete item from wishlist - nothing happens at all. But I can delete entire wishlist with all items.
What can you advise?
Thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on March 25, 2010, 20:19:19 pm

I believe the fact the script isn't working in v1.8 is because you have the AJAX turned on (in VM config) for add to cart. So it works in regular template, but with index2.php, I'm pretty sure ajax is not loaded, so the form fails to do any action.

You could just load ajax into index2.

Upps!
¿How can I upoad ajax into index2.php?
You always forget that I'm a newbie, LOL!

By the way, you told Vrs. 1.8. The last version available to download is Vrs. 1.7. ¿? Whatever...

Anyway, I still have all the files of Vrs. 1.7 with my modifications made, I haven't deleted them, so that whether to load ajax into index2.php is an easy job, I can test very soon and tell you if all is working, OK?

Thanks Again!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 25, 2010, 23:04:08 pm
alikon1: Are you trying to use Ajax option? Or do you have ajax off and it still isn't working. I need to know which one is causing problems, or both.

Hermes: K, my bad on versions. 1.7 i correct, latest released version up till now. I'll have to look into ajax loading. Not sure off top of head. You might try searching forum to see if you can find something on it yourself.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: alikon1 on March 26, 2010, 05:49:39 am
alikon1: Are you trying to use Ajax option? Or do you have ajax off and it still isn't working. I need to know which one is causing problems, or both.
Yes, I'm using Ajax and Addtocart button works OK.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 26, 2010, 07:18:39 am
Ok, I should have read your post better. Sounds to me like you have a permissions settings problem. This hack installs several new VM modules & associative functions. I would check your
VM admin -> List modules -> wishlist

module and function group permissions.

See attached image for settings.

[attachment cleanup by admin]
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: alikon1 on March 26, 2010, 16:50:19 pm
Ok, I should have read your post better. Sounds to me like you have a permissions settings problem. This hack installs several new VM modules & associative functions. I would check your
VM admin -> List modules -> wishlist

module and function group permissions.

See attached image for settings.

\administrator\components\com_virtuemart\html\wishlist.index.php
I notice in line 209, in previous version was &wishlist_item_id='.$wl_item['wishlist_item_id']., but in 1.7 it missed.  Add this parameter and Delete/Update buttons works now.

Have some suggestions:
1. After adding item to wishlist, return customer to category (browse.php or flypage), where he press link "Add to wishlist".

2. If item alredy in wishlist, do not show link "Add to wishlist"

We look forward for new releases.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 26, 2010, 17:47:49 pm
Thanks for the catch alikon! I'll update immediately.
I'll consider your other ideas in future releases.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jangju on March 27, 2010, 04:39:28 am
Hi, I am a newbie and I just found this topic and try to install it to my local website. After finishing steps, It works but I do not see the wishlist tab in admin panel as screen shot at first page. And when I try to add to cart from my wishlist which is the quantity in my wishlist is larger than in stock and I get this message ..administrator\components\com_virtuemart\classes\ps_wishlist.php on line 1015

I have no idea about this can you help me? Thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 27, 2010, 20:42:14 pm
jangju: sounds like you didn't copy header.php (and/or english.php language file) over for no wishlist tab problem.

I'll look into over-stock add-to-cart in a few days.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on March 28, 2010, 21:13:34 pm
FEATURE REQUEST:

I was working in the admin wishlist section, would it be possible to change or make an alternate scrip so that we can see who added item X to thier list instead of being directed to the admin page of said product.

Currently i am wanting to use the wishlist to work out a special pre-order discount for the GTX400 cards coming out, would be much easier to get a list of the 10 people who added the cards t their list as opposed to having to check each list separately.

I have AWO Coupon loaded and it allows you to make very specific coupon codes, i can assign the code to a single user and or a single product with a fixed or percentage discount as well as expiry date so i can do a really nice personalised pre-order discount for my users with that in combination with your wishlist.

Thanks...
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 29, 2010, 21:06:53 pm
NP, next release... about 1 week away.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jangju on March 30, 2010, 06:02:44 am
jangju: sounds like you didn't copy header.php (and/or english.php language file) over for no wishlist tab problem.

I'll look into over-stock add-to-cart in a few days.

Thanks, it works now.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jbmaca on March 31, 2010, 07:24:22 am
Hi,

I see from your post that the next release is a week away?  Would you advise that I wait for that instead of installing ver 1.7?

Also, sorry for the stupid question but I'm a newbie and just wanted to be absolutely certain before proceeding.  I've done a lot of changes to my common language file so just wanted to copy over the relevant wishlist lines if possible.  Are the only lines I need to add the ones between the lines below?  Nothing else?

Quote
   /* WISHLIST MOD */
   /* END WISHLIST MOD */

Many thanks for your help.  And thanks for coming up with this plugin by the way.  It appears to be just what I need. :D
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 31, 2010, 18:12:19 pm
No guarantees on timeline here. You can surely wait for it, though 1.7 has very little wrong with it as well.

Quote
/* WISHLIST MOD */
/* END WISHLIST MOD */
Yes, that's correct.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jbmaca on April 02, 2010, 14:47:42 pm
I installed the module and it works like a charm.  Thanks again for providing this. :D

The only problem I ran into is that the Add to Shopping Cart and Trash icons don't seem to be working.  It might be because I commented out all the references to Quantity in the php files.  Each product is unique so I had to remove anything that pertained to quantity.  Can this somehow be remedied?

Also, no text appears on the popup when you click on the shopping cart - just "Notice" and Continue and Cart buttons.  I remember there was text there prior to the wishlist module installation.  Can I put that back?  If not, is it possible to just remove that popup altogether?

Many thanks again for your help.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 02, 2010, 19:35:53 pm
The text will still be there on your regular add to cart buttons (non wishlist related). They are not there now for wishlist because you commented out the quantity.

You can probably sidestep this whole issue by turning off ajax in VM theme config settings. This will remove all pop-ups, including the ones for your other add to cart buttons.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jbmaca on April 03, 2010, 01:35:32 am
Hi Forrest,

I put back all the lines pertaining to quantity but just changed all values for input type to hidden.  This did the trick as the wishlist shopping cart icon is working again.  The trash icon still doesn't work though.

I tried switched off AJAX as you suggested but that prevents the wishlist shopping cart icon from working.  It looks as if it has to be switched on for it to work.  No worries on this one though as this is more of a cosmetic issue.

Any suggestions on the trash icon issue?  Many thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 03, 2010, 07:06:24 am
Probably same problem as posted by another user on previous page!
Will be fixed in next release.

http://forum.virtuemart.net/index.php?topic=66530.msg228925#msg228925
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jbmaca on April 03, 2010, 11:11:04 am
Probably same problem as posted by another user on previous page!
Will be fixed in next release.

http://forum.virtuemart.net/index.php?topic=66530.msg228925#msg228925

Thanks for pointing me in the right direction Forrest.  I added that line and the trash icon is now working perfectly.  Problem solved.  Thanks again for a great extension. :)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 04, 2010, 08:45:02 am
UPDATE 04-04-10: Download v1.8

Note: You can download the update from the first post / first page of this thread.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on April 05, 2010, 13:53:01 pm
Excellent, thanks for the updates, still a problem with the admin list section.

It now does show only the set limit, lets say 20, but when clicking next or 2 for the 2nd page it shows all the listed items just starting at 21, so basically if there are 100 items it will show 21 - 120 instead of 21 - 40.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 05, 2010, 22:56:48 pm
Hmm, thought I tested that. Must have something still missing. I'll check it out for next release.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on April 06, 2010, 15:31:18 pm
ANother Problem i noticed, when deleting an item, at least with Ajax on the mynxx template, i get the "added to cart" dialogue without it fortunately adding it to the cart

Would it be possible to remove the 'delete from wishlist' function from the ajax query and have it generate a normal refreshing html query so that it does not look like its doing nothing or even just a notice saying it has been deleted and forcing a refresh?

UPDATE: Tested in IE, delete function generates no visual response, but refresh does remove the product.

BTW I am a chrome user.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 06, 2010, 19:35:45 pm
Damn, it shouldn't do that. I think it must be a mynxx issue.

You can change this however, by making the remove button a link rather than a form.

Currently in private template wishlist_item_row:
Code: [Select]
<form action="{remove_link}" method="post" class="addtocart_form">
<input type="submit" style="background: url(components/com_virtuemart/themes/images/remove_from_cart1.png); width:24px; height:24px; border:0px; padding:0px; margin:0px;" value="&nbsp;" />
</form>

You can change to something like:
Code: [Select]
<a href="{remove_link}" title="Remove" >
<img src="components/com_virtuemart/themes/images/remove_from_cart1.png" alt="Remove" title="remove" /></a>

You might need to add a little styling to the button to get it to line up right since it's not in a form.

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on April 06, 2010, 20:11:42 pm
Damn, it shouldn't do that. I think it must be a mynxx issue.

You can change this however, by making the remove button a link rather than a form.

Currently in private template wishlist_item_row:
Code: [Select]
<form action="{remove_link}" method="post" class="addtocart_form">
<input type="submit" style="background: url(components/com_virtuemart/themes/images/remove_from_cart1.png); width:24px; height:24px; border:0px; padding:0px; margin:0px;" value="&nbsp;" />
</form>

You can change to something like:
Code: [Select]
<a href="{remove_link}" title="Remove" >
<img src="components/com_virtuemart/themes/images/remove_from_cart1.png" alt="Remove" title="remove" /></a>

You might need to add a little styling to the button to get it to line up right since it's not in a form.



Thanks, that was insanely easy, no style modification either, it stayed exactly where it was in the form.

I am almost certain it would be a mynxx issue, it has given me its fair share of design nightmares when doing my own custom modifications, but the extra work is all worth it for such a nice template and i have moulded my entire site around it so it would b a million times more work to change the template.

I dred the day i get bored of it and decide it needs a facelift.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 06, 2010, 20:28:26 pm
:) It will come.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 06, 2010, 21:41:32 pm
Please remember to place a review on my hack here!
http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=331&Itemid=
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: alikon1 on April 14, 2010, 19:45:47 pm
UPDATE 04-04-10: Download v1.8
Addition: When adding item to wishlist, "Continue Link" now appears in wishlist returning user to category of added item. Just add {continue_link} in your private wishlist_item_list.php template.
Files changed:
administrator/components/com_virtuemart/html/wishlist.add_item.php - this file changed too. Without update of this file, {continue_link} do not work.

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 14, 2010, 20:52:19 pm
Txs!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: alikon1 on April 16, 2010, 16:50:24 pm
Couldn't find how to add review (here (http://extensions.virtuemart.net)), but it's very useful hack which have many features. I spent half an hour to make all modifications and now it works perfect. Thank you.

Only one thing, that can make this hack better - not to show "Add to wishlist" button if item already in wishlist.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on April 16, 2010, 17:27:18 pm
Couldn't find how to add review (here (http://extensions.virtuemart.net)), but it's very useful hack which have many features. I spent half an hour to make all modifications and now it works perfect. Thank you.

Only one thing, that can make this hack better - not to show "Add to wishlist" button if item already in wishlist.

Try another browser, i used chrome and the add review function literally was not their, i cannot remember if i wrote my review using IE or FF, but it definitely does not work in chrome.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 16, 2010, 22:09:48 pm
alikon1: Thanks for your effort in leaving a review... CranialBlaze is right, I think it's FF that will work.

The add-to-wishlist button not appearing after adding to wishlist probably won't be implemented, at least not soon. Surely it could be on your own with a bit of effort, but the issue resides in the number of queries this would add in category view... which is already "slow" and has many posts on too many queries.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on April 20, 2010, 10:38:34 am
FEATURE REQUEST

Print wishlist, i just had  client contact me he wants to show the wishlist to someone else who does not have a computer, yes i know its the 21st centuary, but still it does sound like a good idea.

Print without pics or anything, just name, price, and maybe sku, or maybe edit the email template sot hat it mails with a item list and a link.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 20, 2010, 22:08:32 pm
Sure, that is pretty easy. I'll look at it for the next rev. If you want to right now, you can create a link to the print page by using index2.php in the URL (rather than index.php). That will create the printable page. I'll add this to next release.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: yannis1998 on April 22, 2010, 10:53:36 am
Hi Forrest,

first of all thanks for this great addon! However, I can;t make it to work.....I've followed your instructions, everyting seems to work fine but I can not see the "Add to Wishlist" button when viewing a product...Any idea??? Thanx in advance,
Yiannis
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 22, 2010, 20:39:55 pm
That button is part of the VM flypage template. Likely you are using a different flypage template than the default one.

/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php

In the above file you will see:

<!-- WISHLIST START -->
<br /><a class="wishlist_button" href="index.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id ?>&amp;flypage=shop.<?php echo $flypage ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem" title="Add to Wishlist"><i><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_ADD_TO') ?>!</i></a>
<!-- WISHLIST END -->

This is the add-to-wishlist button, but this is for the default VM flyapge template. Again, if you are using another VM template, you will need to copy this to your other flypage -> addtocart_forn.tpl.php
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: yannis1998 on April 23, 2010, 14:36:51 pm
Thank you very much Forrest! That was the problem! Thanx a lot!

Take care,
Yiannis
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: yannis1998 on April 23, 2010, 16:46:22 pm
Hi Forrest,

one more thing... My site is multilingual and I am trying to translate the text in files wishlist_list.php (e.g. Wishlist System, Name, Comments, Date added etc.). However I can not :(  What I do is the following: I add inside components\com_virtuemart\languages\common\english.php the key: 'PHPSHOP_WISHLIST_SYSTEM' => 'WISHLIST SYSTEM', and I modify file wishlist_list.php accordingly:
<h1 class="componentheading"><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_SYSTEM'); ?></h1>
However what I get as a title in my site is the following: _('PHPSHOP_WISHLIST_SYSTEM') ?>

Can you please tell me what I am doing wrong???

Thanx!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 24, 2010, 07:28:44 am
Are you adding these variables to your language file in
administrator/components/com_virtuemart/languages/common/your_language_file.php
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: tsili on April 26, 2010, 11:44:12 am
Hi Forrest,

Yes I do. Do I have to include any i.e. global variable or use any "require" statement?

Thanx!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 29, 2010, 08:59:41 am
?? I'm not following you. Is this from an older post?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: tsili on April 29, 2010, 19:26:29 pm
No Forrest, I just changed my username to tsili!!! I am still stuck with the translation problem... Any idea???
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 29, 2010, 21:21:39 pm
Not off the top of my head. Should work fine if you have included these as variables in your common language file.

Just for kicks, try adding it to your common english.php file and see if that works.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: conmen80 on May 03, 2010, 12:54:34 pm
Hi, a great mod to added to my page, thanks!

a little issue to ask about, how could I change it to a button instead of a text link?

I open "addtocart_form.tpl" to mod the following

Code: [Select]
<!-- WISHLIST START -->
<a class="wishlist_button" href="index.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id ?>&amp;flypage=shop.<?php echo $flypage ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem" title="Add to Wishlist"><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_ADD_TO'?></a>
<!-- WISHLIST END -->

into this

Code: [Select]
<input type="button" value="<?php echo $VM_LANG->_('PHPSHOP_WISHLIST_ADD_TO'?>" onclick="index.php?option=<?php echo $option ?>&amp;Itemid=<?php echo $Itemid ?>&amp;product_id=<?php echo $product_id ?>&amp;category_id=<?php echo $category_id ?>&amp;manufacturer_id=<?php echo $manufacturer_id ?>&amp;flypage=shop.<?php echo $flypage ?>&amp;page=wishlist.add_item&amp;func=wishlistAddItem" title="Add to Wishlist">

While I click on the button there is no response to the direct page.

Any idea?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 03, 2010, 22:12:16 pm
Don't change it to a button. I think I have noticed this before with the add-to-cart and other buttons. Keep it as a URL, and use css to alter the a.wishlist_button in your css. Use a background image, etc.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 08, 2010, 01:45:33 am
UPDATE 04-07-10: Download v1.9


Please remember to place a review on my hack here!
http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=6&sobi2Id=331&Itemid=
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DesignKing on May 12, 2010, 02:07:28 am
Hi Forrest

I have uploaded these files to my site and although it doesnt work properly i feel that it is not a million miles away from being correct.

I added the sql file and module absolutely fine (quite easy really) but there is not a 'Add to Wishlist' link next to my products.

I have tried this whilst not being logged in and being logged in. No difference.

Do you know what the problem is?

Please help ASAP  :)

Many thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on May 13, 2010, 19:34:11 pm
Great hack!
Works well, I have only one problem - and that's not a bug, but a feature request ;).
I try to use it together with Custom Attribute Extended hack http://forum.virtuemart.net/index.php?topic=39666.0 and I have a problem... when I add an item from the cart to the Whishlist the attributes are passed correctly, but the price which is not passed correctly - the basic, unaltered price of the product is shown. But, fortunately when I send back the products from whislist to the cart, everything works normally.
So I have a quick and dirty solution for this: I can simply hide the prices in wishlist until we found a solution for it. I will find my way around with this, I described the situation here to made clear what I want to archieve.
A bigger problem - and I'm afraid, a more complicated one is that regardless when I hit the Add to Whislist button on product page (before or after I made the selections related with Custom Attributes Extended) the unaltered, basic product data is sent to the whislist and all customisations are lost.
Any help/hint would be great!!! For the site I'm working on is crucial that the passing of customisations to the whislist to work as smooth as possible, and withouth data loss in the process.
Here it is a link to the development site to see what I'm talking about if someone is interested!
http://www.mamaandteddy.com/index.php?option=com_virtuemart&Itemid=2 (http://www.mamaandteddy.com/index.php?option=com_virtuemart&Itemid=2)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 13, 2010, 22:39:43 pm
@DesignKing: The wishlist hack changes the DEFAULT VM template files. You are likely not using the VM default template, and would need to add the "Add-to-Wishlist" functions from the template files over to your non-default VM template.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 13, 2010, 22:48:07 pm
@webgobe: This hack stores the attributes in an array in the jos_vm_wishlist_itsm table called: product_description.

I would check out the file: administrator/components/com_virtuemart/classes/ps_wishlist for adding and retrieving product data.

Tho I am familiar with what custom attributes extended does, I do not have it running, so I am not much more help than to point you in the right direction.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on May 14, 2010, 16:27:26 pm
Thanks for the tip!
I will try that. I'm one of the co-authors of CAE hack, so I know it very well ;) that's my problem . But your tip saves for me miles of mouse trip on the desk, hopefully I will find something - and will share with you my findings.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 14, 2010, 22:20:28 pm
Sounds good. I had an email from someone saying they used CAE as well. They said if they added products to the CART FIRST, then added the cart to the wishlist that in fact it did work. Only when adding straight from product page did it fail to pass the custom params correctly.

You might want to verify that is the case... and could be a heads up to what function is "acting up". The add-to-wishlist on product page is a different function than the add-to-wishlist cart page.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on May 17, 2010, 10:23:54 am
Confirmed, my problem is the same, adding from the cart to whislist works correctly (in conjunction with CAE), adding to whishlist directly from product page don't passes the parameters correctly.

I'm in emergency situation here, any hint to fix it would be great.
Anyway, the solution (found by me, by you or byt common effort) WILL BE SHARED WITH COMMUNITY, of course!
Denes
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 19, 2010, 07:13:10 am
I can try and help this coming week-end.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on May 19, 2010, 09:14:57 am
TIA!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: scothern99 on May 23, 2010, 16:31:57 pm
Hi Forest.  I just installed this and it seems to be about 80% working for us.  I copied over the files after backing up and I injected the .sql file into MySQL via PHPMyAdmin.  When I enable the module, I just get a . that is a Hyperlink to the create/edit wishlist screen.  I can create a wishlist, but I do not get an "Add to wishlist" option anywhere.  Also all of the buttons (if any) are missing and not showing up.  Thoughts?  Suggestions?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 25, 2010, 10:02:50 am
You are probably using a different template than the DEFAULT VM template.
In the download hack, check out the files/sub-folders for   components/com_virtuemart/themes/default

You are not using /default, but rather another VM template, so when you copied over the files, all file adjustments for files/sub-folders under default need to be copied into the VM template you are using.

Backup the VM template folder you are using first! Then test.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: scothern99 on May 25, 2010, 16:03:46 pm
You are probably using a different template than the DEFAULT VM template.
In the download hack, check out the files/sub-folders for   components/com_virtuemart/themes/default

You are not using /default, but rather another VM template, so when you copied over the files, all file adjustments for files/sub-folders under default need to be copied into the VM template you are using.

Backup the VM template folder you are using first! Then test.

It works wonderfully actually.  I had an FTP error and it missed a couple of files.  Thanks again.  I am usign a different template but it actually updated fine.  Is it possible to change the text "Add To Wishlist!" to an image for use as a button?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 26, 2010, 01:28:16 am
@scothern: glad it's working for you now. The "Add To wishlist" has a class applied to the link. All you have to do is create your own buttons and use css to apply them :).
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: scothern99 on May 26, 2010, 08:10:42 am
Cool, well I wil ltake a look at that.  Don't know CSS so this will take me some reading but I will look at it.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: maxtor on June 01, 2010, 17:11:34 pm
i have error. when i login from vm module or login page, i see blank page whith error message:
Fatal error: Call to a member function query() on a non-object in Z:\home\linz\www\administrator\components\com_virtuemart\classes\ps_wishlist.php on line 1779
but when i login from page which appears after i press button "add to whishlist!" i can browse vm area (product page or cart), and when i try browse to joomla area (mainpage or contact) i again see this error.

vm 1.1.4 joomla 1.5.18 test on localhost

please help me, and sorry for my english.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 05, 2010, 10:39:46 am
Hmmm, hard for me to troubleshoot when I cannot replicate. Very odd. How about a link?

Anyone else with this issue? I have not upgraded to 1.5.18. Perhaps there is something new.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on June 07, 2010, 10:19:09 am
Blank pages are related in 99% of cases with minor typos in PHP or Java script code. It's a nasty business... You must check your modified code, especially the one referenced by the error message - but not only, the error may be in some other related code (content of files included or called byt the active functions on that page.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DreamMaster on June 07, 2010, 13:00:28 pm
For me, blank page with error "Fatal error: Call to a member function query() on a non-object in administrator\components\com_virtuemart\classes\ps_wishlist.php on line 1779"

It will appear if I enable virtuemart module in conjunction with wishlist module in same page.

Please kindly check, Thank you.

Best Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: tsili on June 07, 2010, 18:26:04 pm
Hi Forrest,

Everything works fine now (even the translations I was asking you in a previous post!) except from one thing: I am now facing the problem you describe in your first note (no product images and names being carried to wishlist). The problem happens only in the front end and only for the product's name and image (in the front end I can see the price, tax or quantity - in the admin section I can see all the details like the product's image and description).
In case it helps, my template is ja_zeolite ii from Joomlart, and the wishlist template I am using is item_row.
Any idea?
I can send you ftp/joomla credentials by pm in case you want to check it online.

Thanx!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: maxtor on June 07, 2010, 18:58:11 pm
For me, blank page with error "Fatal error: Call to a member function query() on a non-object in administrator\components\com_virtuemart\classes\ps_wishlist.php on line 1779"

It will appear if I enable virtuemart module in conjunction with wishlist module in same page.

Please kindly check, Thank you.

Best Regards
yes, when i turn off virtuemart module, this error disappear, but this module need me for my site. I hope you fix it if possible.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: vbkun on June 08, 2010, 15:37:55 pm
Is there a way to get the "add to wish list" button apart from the add to cart button?
I'm setting the store "without stock" so i can get a "call for pricing" for all itens, but seems the add to wish list only shows when i have the add to cart button (and i'm pretty clueless bout how to solve this).

I'm thankfull for any direction on this issue.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Csabesz on June 08, 2010, 15:54:29 pm
I just installed this and it seems to be working until i want to login from the wihslist module, i get the: Forbidden access (Flooding). error.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on June 08, 2010, 20:44:45 pm
That seems more likely to be a sh404SEF related problem....
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Csabesz on June 09, 2010, 08:07:59 am
Yes, it is possible. Any method to fix it?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on June 09, 2010, 08:56:40 am
See in sh404SEF's security setting, play with the values for Flooding until you find a good value for you -  or disable eventually the flooding protection.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Csabesz on June 09, 2010, 10:54:53 am
Solved, thank for your help.
I finished translation in romanian language if needed by anyone.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DreamMaster on June 10, 2010, 10:10:36 am
Excuse me all, Now while I share wishlist by email then my wishlist's mail entry to junk or spam mail box. How is method to solve this problem. Thank you in advance for any help.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on June 10, 2010, 10:24:35 am
You need to whitelist the email address of the site (the shop owner's e-mail, the one from where the whislists are sent from). This is not the hack's problem, it's your POP3/IMAP server's and/or your mail client's settings. Probably is set to catch all commercial mails ;)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DreamMaster on June 10, 2010, 10:38:07 am
You need to whitelist the email address of the site (the shop owner's e-mail, the one from where the whislists are sent from). This is not the hack's problem, it's your POP3/IMAP server's and/or your mail client's settings. Probably is set to catch all commercial mails ;)
You mean that I should add shop owner's e-mail to form for send mail,right?
Do you know where I can add this mail to source code.
Thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: webgobe on June 10, 2010, 11:48:46 am
No, that's picked up automatically. The email addresses are picked up from your settings, you don't need to do anything on that end. You need to tweak not the site - but your mail client/mail server to tell him to not put those mails in the spambox!
How you can do this - depends on the exact client you use or the mailserver you are retrieving your mails from.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DreamMaster on June 10, 2010, 12:04:19 pm
Yes, I already understand. Thank you so much for your reply.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: arnav on June 10, 2010, 15:17:27 pm
Hi,I am using a slideshow plugin called phatfusionslideshow.
when i view the wishlist, this does not work proper.is there any way to correct it or not show it when viewing the description via wishlist?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 10, 2010, 22:36:06 pm
@DreamMaster: I have noticed with spam filters on, that you should be careful what you TITLE/SUBJECT the emails. Long titles, or ones with odd names, may automatically be moved to spam, depending on your spam filter settings. And did you solve your flooding error?

@arnav: Hmmm, plugins cannot be disabled for certain pages. A link to the site may help. Working "proper" is not very descriptive.

@webgobe: any luck with testing environment? Txs for responding to everyone :)

@Csabesz: feel free to post your translation! I will add to main page download... And same goes for anyone else with language translations.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DreamMaster on June 11, 2010, 04:17:04 am
Hi Forrest,
I'm still checking this. If I found any solve then I will post here, sir.
Thank you for your help and very good hack.

Regards,
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: arnav on June 12, 2010, 09:03:18 am
I apologize

The site link is http://testgw.a60.us/gw/index.php

When checking the wishlist, i see lines of code for example:
{phatfusionslideshow components/com_virtuemart/shop_image/product/abseiling1.jpg,components/com_virtuemart/shop_image/product/resized/abseiling1_thumb.jpg; components/com_virtuemart/shop_image/product/abseiling2.jpg,components/com_virtuemart/shop_image/product/resized/abseiling2_thumb.jpg; components/com_virtuemart/shop_image/product/abseiling3.jpg,components/com_virtuemart/shop_image/product/resized/abseiling3_thumb.jpg}

but this is for a slideshow plugin.

Thanks,
Arnav
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 12, 2010, 10:56:58 am
ya, the VM wishlist pages are not parsing the plugin. I don't have a fix for this off top of head.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: arnav on June 12, 2010, 11:09:12 am
ok.

Np.

anyway i can disable this from the wishlist page?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: arnav on June 12, 2010, 11:12:09 am
or probably disable the whole description and just keep the name of the product?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 12, 2010, 11:18:37 am
Maybe, but it would be inside of the plugin, not my hack. I would be more tempted to try to get the plugin to work properly.

Otherwise, I suppose you could add some php check in the plugin to not activate on wishlist pages.

Or, you could edit the code to search and replace "str_replace" and replace it with <img src=".

None are great solutions, other than getting the plugins to parse. It must be something small like adding virtuemart_parser.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 12, 2010, 11:21:04 am
Sure, you could disable the whole description. That is easy, just edit the wishlist templates in components/com_virtuemart/themes/xxxx/templates/wishlist

pubic and private folders. (wishlist_item_row.php)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: rb on June 12, 2010, 15:55:00 pm
Forrest, not sure if this will help or not with arnav's issue.  If there's a plugin referenced inside a variable called $product_desc, then this code should process it:
Code: [Select]
$product_desc = vmCommonHTML::ParseContentByPlugins( $product_desc );
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: molahs on June 12, 2010, 23:52:04 pm
Forrest - will this also create SEF urls?
Thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 13, 2010, 10:13:06 am
@rb. Thanks! Likely that's it. I'll give it a shot.

@molahs, no.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Studio 42 on June 17, 2010, 21:45:24 pm
your files router.php on the zip is bugged
in function getCategoryTitle($id)
SELECT GROUP_CONCAT( category_name
         SEPARATOR  '/' )
         FROM #__vm_category
         WHERE category_id IN (".$catIdsStr.")"
reorder the category randomly
if you have Cat1ID,cat2ID,cat3ID you can have cat2/cat3/cat1 as result if cat2>cat3>cat1.

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: rajpandha on June 18, 2010, 06:31:40 am
Hello,
I am getting this error when I try to save wishlist
Error: Function Not Registered. wishlistAddItem is not a valid VirtueMart function.
please help........................
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 18, 2010, 09:23:22 am
@Electrocity: Thanks, I didn't make the router.php. It was available o this forum. I just added to it for wishlist functionality. But thanks for the update. I have not personally noticed this on any sites I have this router.php running.

@rajpandha: Sounds like you did not run the virtuemart_wishlist.sql included in this hack. The sql will create the registered functions for VM.

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Joomlanz on June 22, 2010, 06:00:53 am
Hi - Thanks for this great hack - it works great.

How would we add a scroll bar to the print popup so that we can see the long list

Also how can we add the SKU to the wishlist items table

Thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on June 26, 2010, 00:55:50 am
@Joomlanz:

for SKU: Look at classes document: ps_wishlist.php

find
function get_wishlist_item
AND
function get_wishlist_items

Add:
   $row['product_sku'] = $p_row['product_sku'];
or
   $new_rows[$k]['product_sku'] = $p_row['product_sku'];

for the respective function. Just look in the functions where the other variables are called out like this. Doesn't matter the order.


Then in HTML folder document wishlist.index.php, find the areas where "$tmp = str_replace (" variables are listed. This is where the template is getting its values.
You'll need to add to this list (again, order doesn't matter):
   $tmp = str_replace( "{product_sku}", $wl_item['product_sku'], $tmp );

So now in your VM wishlist templates (public and private) add {product_sku) where you want the sku :)

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

For scrolling: Look at HTML folder document wishlist.index.php
Find:

$has_print .= '<a href="javascript:void()" onclick="javascript:window.open(\' '. URL .'/index2.php?option=com_virtuemart&amp;page=wishlist.index&amp;'. $wl_print_url .'&amp;pop=1\', \'width=640\', \'height=480\')" title="Print"  style="margin-right:10px;">';


Change to:

$has_print .= '<a href="javascript:void()" onclick="javascript:window.open(\' '. URL .'/index2.php?option=com_virtuemart&amp;page=wishlist.index&amp;'. $wl_print_url .'&amp;pop=1\', \'width=640\', \'height=480\', \'scrollbars=1\')" title="Print"  style="margin-right:10px;">';

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Joomlanz on June 28, 2010, 00:05:28 am
Hi

Thanks for that - Adding the SKU works perfectly.

I could not get the scroll bars to show on the print popup.

I would also like to show the attributes in the list - in my case size and colour. Can you show us how that would be done - I have tried...
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: chas on June 29, 2010, 02:21:51 am
Hi
i love the wishlist feature
got a slight problem not quite sure what to do ?
im new go easy !

Error: Function Not Registered. wishlistAddItem is not a valid VirtueMart function.
Error: Module Not Registered."wishlist" is not a valid VirtueMart core module.
Add to Wishlist
DG 1176 01
DG 1176 01
Frame Size:


Warning: Invalid argument supplied for foreach() in /home/specmake/public_html/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1303

site www.specmakers.net
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: chas on June 29, 2010, 22:04:46 pm
its fixed

thanks for the wishlist
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: anotheradrian on July 01, 2010, 13:58:01 pm
Thanks for a great module, i'm just gettin some error messages that i dunno how to fix, this comes up in the block

Notice: Undefined index: wishlist_code in /var/www/vhosts/jellybeanzbabydeli.co.za/httpdocs/modules/mod_vm_wishlist/mod_vm_wishlist.php  on line 30

i can create a list and email/share it but this also comes up when i click to view my list...

Notice: Undefined index: wishlist_code in /var/www/vhosts/jellybeanzbabydeli.co.za/httpdocs/administrator/components/com_virtuemart/html/wishlist.index.php  on line 36

could anyone help please :)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: rb on July 01, 2010, 19:01:01 pm
anotheradrian, since you're receiving a Notice and not an error, it may just be your PHP settings on your host server.  Check the setting for "error_reporting" in your php.ini file (if you don't know where it is, ask your hosting company).  If it's set as

     error_reporting = E_ALL

you could change it to something like

     error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
   
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on July 06, 2010, 11:41:31 am
I was just wondering, how would i get the wishlist to display my availability images.

My suppliers stock reports don't indicate available quantities so i use the images basically to say "In Stock" " Out of Stock" or "Contact Us"
I tried just putting in the image call place holder from the template, but i assume i am missing the call function.

Any help would be appreciated.

Thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Joomlanz on July 14, 2010, 07:24:43 am
I would also like to show the attributes in the list - in my case size and colour. Can you show us how that would be done

Many thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: dfadayomi1 on July 27, 2010, 15:28:29 pm
Customization quote request:

I would like to find out if someone can customize this wishlist component to allow users to enter what they want on their wishlist instead of selecting from a product in inventory. For Example, I would like a user to select "Create a wish List" instead of "add to wishlist". I would then like them to get a form type page that allows them to select a drop-down showing my categories and subcategories, then fill out a general description field.

I would like the back-end to remain the same where I can search the wishlists, email the user, etc.

How much would this cost?

Thank you
Title: Wishlist Modification quote
Post by: dfadayomi1 on July 30, 2010, 16:47:55 pm
I need someone who can modify this component to do the following:

Since the items in my inventory will be unique, adding them to the wishlist is not my best solution. I would like users to create their own wishlist based on categories & subcategories that I create.

I would like to customize this component to:

1. Show 2 dropdown boxes - categories and subcategories (to pull from the database).

2. There should be a 3rd box for comments

3. When the user hits the save / submit button, the category and subcategories selected are saved in the database and associated with the user so I can search.

4. All other functions of the wishlist component should be left in tact. e.g. It should still be searchable by an Admin, etc.

Thanks

Dan


Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: chas on August 07, 2010, 01:05:38 am
will this work on virtuemart 1.1.5
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: airbuspilot on August 24, 2010, 16:40:04 pm
Hello Forrest,

Thank you for the module!  I've installed everything according to the instructions, but am receiving the following when I attempt to access the front-end and the Virtuemart Component on the backend.  Any thoughts?

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /hermes/web08/b241/moo.brandywinebracelets/joomlasite/administrator/components/com_virtuemart/languages/common/english.php on line 1334


Here is the code right around line 1334:

Code: [Select]
'PHPSHOP_DOWNLOADS_REMAINING' => '{count} downloads remaining',
'PHPSHOP_DOWNLOAD_VALID_UNTIL' => ' until {date}',
'USER_REGISTRATION_DISABLED' => 'User registration is disabled, it must be enabled in order to proceed.'

/* WISHLIST MOD */
'PHPSHOP_WISHLIST_MOD' => 'Wishlist',
'PHPSHOP_WISHLIST_ADMIN' => 'Wishlists',
'PHPSHOP_WISHLIST_REPORTS' => 'Wishlist Reports',
'PHPSHOP_WISHLIST_LIST' => 'List Wishlists',
'PHPSHOP_WISHLIST_LIST_LBL' => 'Wishlist List',

Using Joomala 1.5.15 and VM 1.1.4

Thank you!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: airbuspilot on August 25, 2010, 15:22:51 pm
Solved the issue above.  I originally attempted to copy/paste the wishlist code into my previously hacked code, but received the error.  To fix, I just re-hacked the wishlist version.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: airbuspilot on August 25, 2010, 15:26:33 pm
For Forrest or Webgobe:

Was there a resolution to the issue of custom attributes not being passed from the product flypage to the wishlist?  I'm having the same issue.  Attributes are passed from cart, but not flypage.

I didn't use the CAE hack, but copied the code from

http://dev.virtuemart.net/redmine/projects/virtuemart/repository/revisions/2287/entry/branches/virtuemart-1.1/virtuemart/classes/ps_product_attribute.php (http://dev.virtuemart.net/redmine/projects/virtuemart/repository/revisions/2287/entry/branches/virtuemart-1.1/virtuemart/classes/ps_product_attribute.php)

Thanks!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Carsten01 on August 26, 2010, 00:21:17 am
Hi'

I have just downloaded and installed the wishlist. Backend wise it seems to work fine, but at the front end i have a few problems.

When i add products in my shopping cart and then want to see the shopping cart i have a link saying "save this cart as a whislsit". i can click it and save the wishlist. This works fine, excepts it comes with a message saying "your Shopping cart has been saves".

I then have a link in my menu saying "My Wishlist (1)" but when i click this link i just get a blank page, i cannot see the wishlist i just created nor can i create a new one.

In the backend in the "Wishlist" function of the VirtueMart i can see that the wishlist has been created.

I also don't have the "add to wishlist" on my product pages.
Can anyone perhaps help me on this issue....???
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Carsten01 on August 28, 2010, 00:12:20 am
Hi'

I figured out my problem myself. I was using another theme than the default one, so i just moved all dependent files into the theme i am using and, voila, it worked.

I do have one other question though.

Instead of in the menu on the frontend where it says as default "Create or view your wishlists! • My Wishlists(Nbr.)" I would like to have all my wishlists displayed like for example


I think i have figured out, that this function lays in the file 'mod_vm_wishlist.php' where it says:

Code: [Select]
<div>Create or view your wishlists!<br />
<a class="wishlist_mod_button" href="<?php $sess->purl($GLOBALS['mosConfig_live_site'] . 
"/index.php?option=com_virtuemart&amp;page=wishlist.index")?>
" title="Create or view your wishlists!">&bull;
<strong><?php echo $VM_LANG->_('PHPSHOP_WISHLIST_SHOW'); ?> <?php echo $wishlist_count?></strong></a>
</div>

Could anyone perhaps tell me how to change this, so i can getwhat i have described above...???

Thanks in advance...

On more question.

The wishlist has the "share your Wishlist function". If i share a wishlist, isn't it so that all other registered users can see this wishlist...??? I also found this a piece of code in the mod_vm_wishlist.php:

Code: [Select]
if ($wishlist_code) {
$session->set('wishlist_code', $wishlist_code);
?>
<div><br />See your friends wishlists<br />
<a class="wishlist_mod_button" href="<?php $sess->purl($GLOBALS['mosConfig_live_site'] .
 "/index.php?option=com_virtuemart&amp;page=wishlist.index&amp;wishlist_code=" .
 $wishlist_code?>
" title="Create or view your wishlists!">&bull; <strong>
<?php echo $VM_LANG->_('PHPSHOP_WISHLIST_FRIEND_SHOW'); ?></strong></a>
</div>
<?php
} elseif ($has_wishlist_session) { ?>

<div><br />See your friends wishlists<br />
<a class="wishlist_mod_button" href="<?php $sess->purl($GLOBALS['mosConfig_live_site'] . 
"/index.php?option=com_virtuemart&amp;page=wishlist.index&amp;wishlist_code=" 
$has_wishlist_session?>
" title="Create or view your wishlists!">&bull; <strong>
<?php echo $VM_LANG->_('PHPSHOP_WISHLIST_FRIEND_SHOW'); ?></strong></a>
</div>
<?php }
/* END WISHLIST */
?>

But i can't see this section anywhere on my page, and i have shared some wishlists, and also other users have.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: erhdesign on September 01, 2010, 03:19:16 am
I have a functioning Wish listmodule with all the visual okays that I loade correct. I have a button in the VM backed, but i cannot add to my wishlist or shere or anything. I just have a module that does not allows me to see or edit. I can log in with no PHP errors or issues as I was having before i added all the replacement files.
this is what it says in the mod:
My Wishlist
Create or view your wishlists!
• My WishLists

The only thing I can think is I tried another wish list from sleek apps that I uninstalled because it needed the IonCube server extension.
I am not sure what it looks like functioning.
Do yo have any sites I could check out.
Cheers
e
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: porcopops on September 11, 2010, 07:41:43 am
Hi Forrest,
I've installed your really-awesome wishlist on my site and managed to get it running correctly. I LOVE it by the way - thank you for sharing such a great component for free!  ;)

The only problem I had was with the tooltip. I am not sure if this is my problem or a Virtuemart problem, because the tooltip text keeps changing ( ???)and it never correctly resembles the icon. Could you please advise where do I change the tooltip text?

I've attached a screen shot showing the tooltip text when I mouse over the trash can icon. It's no biggie... but I just thought it might be confusing for my customers.

http://img340.imageshack.us/img340/4505/tooltip.jpg

Hope you could help me. Thank you so much in advance for all your great work! :)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on September 11, 2010, 20:46:07 pm
Hello,

First, Thanks for this amazing free hack,
I second all those who consider this hack as a must and a great boost for the store
Now, I have implented this on my site,
but I get a problem:
when one clicks on "Add all items to the Cart "
and there's at least one item out of stock
(i mean when some products can not be added to cart),
it gives the following error:
Quote
Fatal error: Call to a member function _() on a non-object in [.........]/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1015

this line 1015 is around these lines:
Code: [Select]
if ($d['quantity'] > $product_in_stock)
{
$msg = $VM_LANG->_('PHPSHOP_CART_QUANTITY_EXCEEDED');
$vmLogger->tip( $msg );
$GLOBALS['page'] = 'shop.waiting_list';
return true;
}

if there's a way to catch the exception,
and show a message in the end of the process:
" the following products are out of stock and couldn't be added to the cart,
would you like to add/move them to a new wishlist?"
or something like this, but any thing would be better than having this awful fatal error message :(

Pardon me, this problem might have been proposed in the previous posts
but I can't follow it through the 250 replies in the 17 pages :-[

Thanks in advance for any help

Regards :)


Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: floren on September 23, 2010, 13:40:29 pm
Wonderfull!
Got it working just "out off the hack"

Only the "print" function for the list gives an error (noting hapens)

Can any one point me in direction?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: IntraX on September 23, 2010, 17:34:42 pm
Pretty much, in order to HAVE a wishlist, you need an account. This is how we know WHO'S wishlist is WHO'S! We need a user ID to relate the wishlists to.


I do not know if this was changed already, as this thread is already 17 pages long, but why shouldnt the wishlist function be added also for non-registered users, working the same way as the add to cart function. The add to cart stores the products for non-registered / not-logged in users in the database or cookies, the same way this could be managed. And when a user is already signed up, the same "add products of - new wishlist - to existing wishlist" could be used same as the carts one. This way the user could also be prompted to either add those items to an existing wishlist or to create a new one!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: IntraX on September 23, 2010, 18:54:12 pm
I am getting this error when adding the sql:


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 'quantity in a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module' at line 4 SQL=INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistUpdateItem', 'ps_wishlist', 'updateItem', 'Updates an item' quantity in a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistDeleteItem', 'ps_wishlist', 'deleteItem', 'Deletes an item from a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistAddItemtocart', 'ps_wishlist', 'addItemToCart', 'Adds an item, from a wishlist, to the Cart.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistAddtocart', 'ps_wishlist', 'addToCart', 'Adds all items, from a wishlist, to the Cart.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistSaveCart', 'ps_wishlist', 'addCartToWishList', 'Adds all items, from the shopping cart, to a WishList.', 'none' );

Anyone a clue or solution for this? Using 1.5.20 with 1.1.5 on a brand new linux apache server.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on September 25, 2010, 15:49:44 pm
Update:
when one clicks on "Add all items to the Cart "
and there's at least one item out of stock
(i mean when some products can not be added to cart),
it gives the following error:
Quote
Fatal error: Call to a member function _() on a non-object in [.........]/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1015

this line 1015 is around these lines:
Code: [Select]
if ($d['quantity'] > $product_in_stock)
{
$msg = $VM_LANG->_('PHPSHOP_CART_QUANTITY_EXCEEDED');
$vmLogger->tip( $msg );
$GLOBALS['page'] = 'shop.waiting_list';
return true;
}



I had it solved by replacing:
Code: [Select]
$msg = $VM_LANG->_('PHPSHOP_CART_QUANTITY_EXCEEDED');with this:
Code: [Select]
$msg = 'The selected quantity exceeds quantity available in stock.';(i copied it from /administrator/components/com_virtuemart/languages/common/english.php
line 53:
Code: [Select]
'PHPSHOP_CART_QUANTITY_EXCEEDED' => 'The selected quantity exceeds quantity available in stock.',
and that's really weird!  ???
i tracked VM_LANG, but it seems globally declared already in the function  addToCart( &$d ) (line 871) which is calling  function cart_add( &$d ) (line 988) and addItemToCart( &$d ) (line 925)

unless cart_add is called from somewhere else that I don't know  ???

Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: IntraX on September 26, 2010, 19:48:22 pm
I am getting this error when adding the sql:


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 'quantity in a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module' at line 4 SQL=INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistUpdateItem', 'ps_wishlist', 'updateItem', 'Updates an item' quantity in a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistDeleteItem', 'ps_wishlist', 'deleteItem', 'Deletes an item from a Wishlist.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistAddItemtocart', 'ps_wishlist', 'addItemToCart', 'Adds an item, from a wishlist, to the Cart.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistAddtocart', 'ps_wishlist', 'addToCart', 'Adds all items, from a wishlist, to the Cart.', 'none' ); INSERT INTO `jos_vm_function` ( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` ) VALUES ( 800, 'wishlistSaveCart', 'ps_wishlist', 'addCartToWishList', 'Adds all items, from the shopping cart, to a WishList.', 'none' );

Anyone a clue or solution for this? Using 1.5.20 with 1.1.5 on a brand new linux apache server.

Actually MySQL does not like this part:

INSERT INTO `jos_vm_function`
( `module_id`, `function_name`, `function_class`, `function_method`, `function_description`, `function_perms` )
VALUES
( 800, 'wishlistUpdateItem', 'ps_wishlist', 'updateItem', 'Updates an item\' quantity in a Wishlist.', 'none' );
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: mailon on October 02, 2010, 08:10:59 am
hi
awesome hack! thanks
but why does it not return product details?
I only get the price correct but no thumb, product description, product name etc.
The price is fetched from table jos_vm_product_price white the details are fetched from jos_vm_product so my guess is there is something wrong with the get_product_info() function....

anyone else had this problem ?



[attachment cleanup by admin]
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on October 07, 2010, 04:42:34 am
Hi everyone. Back from an extended break. Looks like a few updates are in order. Who still has issues to address currently? I'll take a few days to look through this all myself as well.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Roderick1 on October 15, 2010, 10:18:53 am
Dutch translation share version 1.9 / Tested on Joomla 1.5.21 and virtuemart 1.1.5

Download de zip install.zip http://forum.virtuemart.net/index.php?action=dlattach;topic=66530.0;attach=18120 (http://forum.virtuemart.net/index.php?action=dlattach;topic=66530.0;attach=18120), al die bestanden zijn vertaald naar Nederlands.
Open het bestand: administrator/components/com_virtuemart/languages/common/dutch.php en voer onderstaande onderaan eraan toe. Succes! Nederlandse vragen zijn welkom. Draait met succes op www.kleinveeservice.nl (http://www.kleinveeservice.nl)

Code: [Select]
/* WISHLIST MOD */
'PHPSHOP_WISHLIST_MOD' => 'Wenslijst',
'PHPSHOP_WISHLIST_ADMIN' => 'Wenslijsten',
'PHPSHOP_WISHLIST_REPORTS' => 'Wenslijst Rapportages',
'PHPSHOP_WISHLIST_LIST' => 'Lijst Wenslijsten',
'PHPSHOP_WISHLIST_LIST_LBL' => 'Wenslijst Lijst',
'PHPSHOP_WISHLIST_REPORT_LBL' => 'Meest voorkomende items in Wenslijsten',
'PHPSHOP_WISHLIST_USER_LBL' => 'Gebruiker',
'PHPSHOP_WISHLIST_LIST_TITLE' => 'Wenslijst voor ',
'PHPSHOP_WISHLIST_TITLE' => 'Wenslijst',
'PHPSHOP_WISHLIST_SHOW' => 'Mijn Wenslijst',
'PHPSHOP_WISHLIST_FRIEND_SHOW' => 'Mijn Vriend\en Wenslijst\en',
'PHPSHOP_WISHLIST_CREATED_BY' => 'Gemaakt door',
'PHPSHOP_WISHLIST_CREATED_LBL' => 'Gemaakt',
'PHPSHOP_WISHLIST_MODIFIED_LBL' => 'Bewerkt',
'PHPSHOP_WISHLIST_PUBLIC_LBL' => 'Gedeeld',
'PHPSHOP_WISHLIST_ITEM_COUNT' => 'Aantal Items',
'PHPSHOP_WISHLIST_ERROR_NO_NAME' => 'Geef aub een naam op voor deze wenslijst.',
'PHPSHOP_WISHLIST_ERROR_DUPLICATE_NAME' => 'Sorry, er bestaat al een wenslijst met deze naam.',
'PHPSHOP_WISHLIST_ERROR_NO_COMMENT' => 'Geef aub een commentaar op bij deze wenslijst.',
'PHPSHOP_WISHLIST_ERROR_NO_WISHLIST' => 'Selecteer aub een wenslijst of geef een nieuwe wenslijst naam op.',
'PHPSHOP_WISHLIST_ERROR_NO_PERM' => 'Sorry, u heeft goed toestemming om deze actie uit te voeren.',
'PHPSHOP_WISHLIST_ERROR_NO_EMAIL' => 'Geef aub een geldig emailadres op.',
'PHPSHOP_WISHLIST_ERROR_EMAIL_1' => 'Het emailadres ',
'PHPSHOP_WISHLIST_ERROR_EMAIL_2' => ' is niet geldig.  Voer aub alleen geldige emailadressen in het formulier. Voorbeeld: \'naam@voorbeeld.com\'.',
'PHPSHOP_WISHLIST_ERROR_EMAIL_NO_FILE' => 'Er bestaat geen email template bestand!',
'PHPSHOP_WISHLIST_SUCCESS_EMAILED' => 'Uw email is met succes verzonden.',
'PHPSHOP_WISHLIST_SUCCESS_SAVED' => 'Wenslijst Succesvol Opgeslagen.',
'PHPSHOP_WISHLIST_SUCCESS_CART_SAVED' => 'Uw Winkelwagen Is Opgeslagen.',
'PHPSHOP_WISHLIST_REMOVE_SUCCESS' => 'De Wenslijst is verwijderd.',
'PHPSHOP_WISHLIST_ADD_NEW' => 'Nieuwe Wenslijst Toevoegen',
'PHPSHOP_WISHLIST_ADD' => 'Voeg Wenslijst Toe',
'PHPSHOP_WISHLIST_ADD_TO' => 'Aan Wenslijst Toevoegen',
'PHPSHOP_WISHLIST_REMOVE' => 'Verwijder Wenslijst',
'PHPSHOP_WISHLIST_REMOVE_FROM' => 'Verwijder',
'PHPSHOP_WISHLIST_REMOVE_CONFIRM' => 'Bent u er zeker van dat u deze wenslijst wilt verwijderen met alle items erin?',
'PHPSHOP_WISHLIST_SHARE' => 'Deel deze Wenslijst',
'PHPSHOP_WISHLIST_STOP_SHARE' => 'Stop het delen van deze Wenslijst',
'PHPSHOP_WISHLIST_STOP_SHARE_CONFIRM' => 'Dit zal voorkomen dat anderen uw wenslijst kunnen inzien, inclusief de mensen welke u gemaild heeft. Bent u er zeker van?',
'PHPSHOP_WISHLIST_SAVE_CART' => 'Deze winkelwagen als Wenslijst opslaan',
'PHPSHOP_WISHLIST_CART_ADD_TO' => 'Voeg alle items toe aan mijn winkelwagen',
'PHPSHOP_WISHLIST_SAVE' => 'Opslaan',
'PHPSHOP_WISHLIST_NO_WISHLISTS' => 'U heeft geen Wenslijsten.',
'PHPSHOP_WISHLIST_NO_WISHLISTS_ITEMS' => 'Er bevinden zich geen items in deze wenslijst.',
'PHPSHOP_WISHLIST_NAME_SELECT' => 'Selecteer aub een wenslijst:',
'PHPSHOP_WISHLIST_OR' => 'OF',
'PHPSHOP_WISHLIST_NAME_NEW' => 'Geef aub een naam op voor een nieuwe wenslijst:',
'PHPSHOP_WISHLIST_CODE_LABEL' => 'Wenslijst Code:',
'PHPSHOP_WISHLIST_LINK_LABEL' => 'Link:',
'PHPSHOP_WISHLIST_EMAIL_HEADER' => 'Deel deze Wenslijst',
'PHPSHOP_WISHLIST_EMAIL_DESCRIPTION' => 'Deze Wenslijst is nu publiek gemaakt. Wilt u deze graag doormailen?  De ontvangers krijgen een link naar uw wenslijst plus het eventuele commentaar dat u hieronder invult.',
'PHPSHOP_WISHLIST_EMAIL_TRY_LINK' => 'Probeer het',
'PHPSHOP_WISHLIST_EMAIL_ADDRESSES_LABEL' => 'Email adres(sen) (gescheiden door commas):',
'PHPSHOP_WISHLIST_EMAIL_COMMENTS_LABEL' => 'Bericht om te versturen (optioneel):',
'PHPSHOP_WISHLIST_EMAIL_SEND' => 'Verstuur deze Wenslijst',
'PHPSHOP_WISHLIST_EMAIL_SUBJECT' => 'wilt graag dat u naar zijn/haar wenslijst gaat kijken.',
'PHPSHOP_WISHLIST_LOGIN' => 'AUB Inloggen.',
'PHPSHOP_WISHLIST_CONTINUE' => '<- Ga door met winkelen'
/* END WISHLIST MOD */


[attachment cleanup by admin]
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Wes on October 19, 2010, 20:05:35 pm
Hi Forrest,

I am revisiting the need to turn my Virtuemart into a Quote only system.  Allow visitor - without signing in - to add catalog products to cart (using cookies to remember product from last visit).  Then a SEND for quote button, that will send a listing of all the items to site admin(or other E-mail address) and also store in database (without a user association via log in, required).

I appreciate your time on this and when I tried to download your existing file (above), they have error 404.

Thank you again,

Wes
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on October 19, 2010, 20:13:57 pm
What file "above" Wes? My files are on the first page of this thread.
Title: Italian Translation
Post by: sdv18sdv on October 22, 2010, 12:08:52 pm
Di seguito la traduzione italiana (Italian Translation)
Ho tradotto con "lista dei desideri" il termine wishlist, anche se è un po' bruttino.

ITALIAN TRANSLATION
Code: [Select]
/* WISHLIST MOD */
'PHPSHOP_WISHLIST_MOD' => 'Lista dei desideri',
'PHPSHOP_WISHLIST_ADMIN' => 'Liste dei desideri',
'PHPSHOP_WISHLIST_REPORTS' => 'Reports Lista dei desideri',
'PHPSHOP_WISHLIST_LIST' => 'Lista Liste dei desideri',
'PHPSHOP_WISHLIST_LIST_LBL' => 'Lista Liste dei desideri',
'PHPSHOP_WISHLIST_REPORT_LBL' => 'Elemento pi&ugrave; comune',
'PHPSHOP_WISHLIST_USER_LBL' => 'Utente',
'PHPSHOP_WISHLIST_LIST_TITLE' => 'Lista dei desideri per ',
'PHPSHOP_WISHLIST_TITLE' => 'Lista dei desideri',
'PHPSHOP_WISHLIST_SHOW' => 'Mia Lista dei desideri',
'PHPSHOP_WISHLIST_FRIEND_SHOW' => 'Lista dei desideri',
'PHPSHOP_WISHLIST_CREATED_BY' => 'Creata da',
'PHPSHOP_WISHLIST_CREATED_LBL' => 'Creata',
'PHPSHOP_WISHLIST_MODIFIED_LBL' => 'Modificata',
'PHPSHOP_WISHLIST_PUBLIC_LBL' => 'Condivisa',
'PHPSHOP_WISHLIST_ITEM_COUNT' => 'Oggetti #',
'PHPSHOP_WISHLIST_ERROR_NO_NAME' => 'Inserisci un nome per questa lista dei desideri.',
'PHPSHOP_WISHLIST_ERROR_DUPLICATE_NAME' => 'Una Lista dei desideri esiste già con questo nome.',
'PHPSHOP_WISHLIST_ERROR_NO_COMMENT' => 'Commenta questa Lista dei desideri.',
'PHPSHOP_WISHLIST_ERROR_NO_WISHLIST' => 'Seleziona una Lista dei desideri o inserisci il nome di una nuova lista dei desideri.',
'PHPSHOP_WISHLIST_ERROR_NO_PERM' => 'Non hai i permessi per effettuare questa operazione.',
'PHPSHOP_WISHLIST_ERROR_NO_EMAIL' => 'Inserisci una email valida.',
'PHPSHOP_WISHLIST_ERROR_EMAIL_1' => 'L\'indirizzo email ',
'PHPSHOP_WISHLIST_ERROR_EMAIL_2' => ' non è valido. Inserisci solo email valide, es. \'name@example.com\'.',
'PHPSHOP_WISHLIST_ERROR_EMAIL_NO_FILE' => 'Non esiste un template email valido!',
'PHPSHOP_WISHLIST_SUCCESS_EMAILED' => 'Email inviata con successo.',
'PHPSHOP_WISHLIST_SUCCESS_SAVED' => 'Lista dei desideri salvata con successo.',
'PHPSHOP_WISHLIST_SUCCESS_CART_SAVED' => 'Il tuo carrello è stato salvato con successo.',
'PHPSHOP_WISHLIST_REMOVE_SUCCESS' => 'La lista dei desideri è stata eliminata con successo.',
'PHPSHOP_WISHLIST_ADD_NEW' => 'Aggiungi una nuova lista dei desideri',
'PHPSHOP_WISHLIST_ADD' => 'Aggiungi Lista dei desideri',
'PHPSHOP_WISHLIST_ADD_TO' => 'Aggiungi alla Lista dei desideri',
'PHPSHOP_WISHLIST_REMOVE' => 'Elimina Lista dei desideri',
'PHPSHOP_WISHLIST_REMOVE_FROM' => 'Elimina',
'PHPSHOP_WISHLIST_REMOVE_CONFIRM' => 'Vuoi davvero rimuovere la Lista dei desideri e tutti gli articoli associati?',
'PHPSHOP_WISHLIST_SHARE' => 'Condividi questa Lista dei desideri',
'PHPSHOP_WISHLIST_STOP_SHARE' => 'Rimuovi condivisione Lista dei desideri',
'PHPSHOP_WISHLIST_STOP_SHARE_CONFIRM' => 'Questo bloccher&agrave; la condivisione della lista dei desideri, anche se ha ricevuto l\'email di condivisione. Sei sicuro?',
'PHPSHOP_WISHLIST_SAVE_CART' => 'Salva il carrello come Lista dei desideri',
'PHPSHOP_WISHLIST_CART_ADD_TO' => 'Aggiungi tutti gli articoli al carrello',
'PHPSHOP_WISHLIST_SAVE' => 'Salva',
'PHPSHOP_WISHLIST_NO_WISHLISTS' => 'Non hai creato nessuna lista dei desideri',
'PHPSHOP_WISHLIST_NO_WISHLISTS_ITEMS' => 'Non ci sono articoli in questa lista dei desideri.',
'PHPSHOP_WISHLIST_NAME_SELECT' => 'Seleziona una lista dei desideri',
'PHPSHOP_WISHLIST_OR' => 'o',
'PHPSHOP_WISHLIST_NAME_NEW' => 'Inserisci un nome per la nuova Lista dei desideri:',
'PHPSHOP_WISHLIST_CODE_LABEL' => 'Codice Lista dei desideri:',
'PHPSHOP_WISHLIST_LINK_LABEL' => 'Link:',
'PHPSHOP_WISHLIST_EMAIL_HEADER' => 'Condividi questa lista dei desideri',
'PHPSHOP_WISHLIST_EMAIL_DESCRIPTION' => 'Questa lista dei desideri è stata resa pubblica.  Vuoi inviare tramite email questa Lista dei desideri?  I destinatari riceveranno un link alla tua Lista dei desideri con il testo inserito di seguito.',
'PHPSHOP_WISHLIST_EMAIL_TRY_LINK' => 'Provalo',
'PHPSHOP_WISHLIST_EMAIL_ADDRESSES_LABEL' => 'Indirizzi Email (separati dalla virgola):',
'PHPSHOP_WISHLIST_EMAIL_COMMENTS_LABEL' => 'Messaggio da inviare (opzionale):',
'PHPSHOP_WISHLIST_EMAIL_SEND' => 'Invia la lista dei desideri',
'PHPSHOP_WISHLIST_EMAIL_SUBJECT' => 'ti hanno inviato la lista dei desideri.',
'PHPSHOP_WISHLIST_LOGIN' => 'Effettua il login.',
'PHPSHOP_WISHLIST_CONTINUE' => '<- Continua lo shopping'
/* END WISHLIST MOD */
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: sdv18sdv on October 22, 2010, 12:14:36 pm
ok, after the italian translation, I absolutely need a feature:

after I shared a wishlist, if a user buy some items from the wishlist, them will not be subtracted from the wishlist.

I was sure it was a feature already existing, but it's not.  ???

Is there a way to implement it?

thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: illPhever on October 26, 2010, 02:38:13 am
Hello All,

Forrest, thanks for this Wishlist hack! I've been testing it out on Joomla 1.5.20 with VM 1.1.5 and need some assistance with a message I'm getting.

When I click "Add to Wishlist!" from the product details page, I get the message "Info: To add this product into your cart you have to select a product variant on the details page."  This only happens for products with custom attributes (ie: Color: Red, Blue, Yellow / Size: 0,2,4,6,8,etc...). If I delete the attributes, I don't get the message.

I've read over other posts in the forum about that message, but what I don't understand in this case is that I am not even adding a product to the cart, so why would I get this message?  It only appears when clicking Add to Wishlist. Never when I actual click Add to Cart. I don't have any child products and product variants are selected.  Has anyone run across this situation or have any suggestions?

Thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on October 26, 2010, 08:06:14 am
When I click "Add to Wishlist!" from the product details page, I get the message "Info: To add this product into your cart you have to select a product variant on the details page."  This only happens for products with custom attributes (ie: Color: Red, Blue, Yellow / Size: 0,2,4,6,8,etc...). If I delete the attributes, I don't get the message.

I've read over other posts in the forum about that message, but what I don't understand in this case is that I am not even adding a product to the cart, so why would I get this message?  It only appears when clicking Add to Wishlist. Never when I actual click Add to Cart. I don't have any child products and product variants are selected.  Has anyone run across this situation or have any suggestions?

Thanks
Hi,
yap, it happens when a product has an attribute list with properties.
Now, it sort of makes sense, because, if it's meant to be a gift registry, then the one who's actually buying should not be left to guess which variant he should buy.
But on the other hand, if it's just being used as a wishlist, then the user HAS to pick a variant when he might still be undecided about it.
I don't have this problem, since I use child products instead of attributes, so each child has its own add to cart and wishlist
and i'm not making it possible for them to add the parent as a wishlist.
so now, it depends on what YOU really want

PS: if it's the message that's really bothering you,
then change the according line in the language file from "into your cart" to "into your cart or wishlist"
though it doesn't always make sense. for a wishlist is a wishlist...

Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on October 26, 2010, 08:19:57 am
but now, i have a suggestion,
since it seems to occur a lot.

A wishlist is there to stand half-way between adding to cart, and not adding to cart.
it's an option to be taken when you're not able to add to cart, but still want to bookmark the product.
Now the feature "add all items to cart" is great,
but when the next screen comes to announce "you can't add that product to cart",
without knowing which or what link to follow...
hmmmm
i say you will lose your impatient customer due to this behavior,
so here's my suggestion:
output a table on the next screen showing the wishlist items in the first column with the links to the product details page for sure,
and in the second column, it shows the "status"
it should be either:
- successfully added
- Not added (product out of stock)
- Not added (quantity exceeds quantity in stock)
- Not added (needing product variant)
- [...]

(feel free to add the many "walls" against "adding a product to cart" here)
this step is essential for all products (successful/not successful), since the products that are successfully added are not automatically removed from the wishlist
and there should be a flag to know that they're added.

Plus, this result page, if exported (printed...), would tell us what's effectively left of the "wish" list
what is really still is a "wish", and which is accomplished :)

Thanks for reading
Kind Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: illPhever on October 26, 2010, 13:41:36 pm
Thanks for the responses Flora. I think I see what's going on now. What happens is if I select the variants on the product details page and then click Add to Wishlist, it doesn't carry over my selections. So when the Add to Wishlist page is displayed I get that message about product variants and I must RE-SELECT my variants again before submitting my Wishlist.

So I guess what I would expect it to do is remember the product variants I select on the product details page (in my case Color, Size, Quantity). For example, my default Size is always 0 and Quantity 1. If I change a product to Size 10, Quantity 10 and click Add to Wishlist, it still defaults back to Size 0, Quantity 1 and I get that product variant message. I have to then select Size 10 and Quantity 10 AGAIN, select a Wishlist and submit it. I might just change the language file as you suggested if there is no other way to address this.

Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: sdv18sdv on October 26, 2010, 15:54:29 pm
Hi folks!
thanks to all for this interesting hack!

I manage a site with very long wedding lists and it would be very important subtract buyed items, as many different buyers make purchases from the same wedding lists (wedding lists are precisely made to avoid duplications).

Is there a way to implement this feature?

thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on October 26, 2010, 17:23:43 pm
illPhever,
you're welcome, but i'm afraid i can't reconstruct your case, so i can't help you much, though

sdv18sdv,
concerning wedding lists,
1) not every person who adds an item to the cart is going to 100% buy it (good will is always good, but what if something happened along the way)
to me, it would be unfair for the list owner.

2) in SOME cases, a quantity more than the desired quantity is always welcome,
especially with Decoration items

I think the feature of removing an item from a wishlist automatically should be done from within the owner's account alone,
In my mind, an ideal solution for you would be:
to add 2 extra fields near each item
one would tell "quantity added to cart" (i.e. reserved by someone on the way to buy it), or "Locked item"
one would tell "quantity purchased", or "Closed Item"

I don't think it would be implemented for free, though :P
But I'm just dropping my 2-cent for you :)

Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on November 04, 2010, 19:43:32 pm
@flora01. Thanks or the input here! Within a few months my time will free up a bit more and I'll be able to allocate some time into your suggestions.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: ladytess on November 09, 2010, 15:23:24 pm
This would be so wonderful - if only I could get it to work, I have modified the files, created the new tables.. So far so good.. My only trouble is, nothing seems to be updating the database.
I try to make a new wishlist - nothing happends, the page just reloads, I have checked the database - nothing in it...
Everything seems to appear as it should only the database wont update..

Which file do I need to look in to rectify this please?

All the best & thank you for a wonderful hack x
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Jack Hughes on November 11, 2010, 16:39:03 pm
Greetings Forrest.

Thanks for this great code.

I am trying to use your code as a gift registry so that so that a consumer can buy a product off of a registry list and have it ship to the address of the person who created the gift registry list.

We are using this as a donation campaign so that consumers can buy certain products for a specific animal shelter. During the purchase the shipping address of the animal shelter is used. Is this possible? and if not can we pay you to make it happen?

Thanks
Jack Hughes
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: varungujjar on November 12, 2010, 10:14:36 am
Hey ,, Everything installed perfectly oky gr8 hack!!!.. except for one thing...  why is there a NEW button on the toolbar when it actually is not needed... does neone know how to get rid of it.. ?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: tstross on November 17, 2010, 12:11:50 pm
Hi,
I haven't been able to get this to work.  I don't know where the problem is - I've tried double-checking that all the files are in the folders from when I ftp'ed it and I reinstalled the module. 

There's no Add to Wishlist link and when you click on My Wishlists at the bottom, nothing shows up? 

I've been trying to figure this out for days with no success.  Can anyone help me? 

The site is www.babyinnovations.co.il.

Thanks so much!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: big_j_0000 on November 18, 2010, 03:20:03 am
Hi Forrest,

Thank you for the hack.. It looks like it should be great when I get it running.  I followed the instructions and have some issues.  When I login the add to wishlist link doesn't show up on the product page (or anywhere else for that matter).  When I click on the module link on the left side of the site it just takes me to a blank page.  Also, the module on the left has an error notice.

I installed this on another website and didn't have any problems (except for the notice error).  I have upgraded to VM 1.1.5, I have installed and uninstalled everything 5 times and have had no luck.  I have changed templates to see if it was a template issue.  I'm not certain what else to do.

Any help would be appreciated.  The site is www.healthyasahorse.net.

Thanks.

Big
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: rayalpha on November 21, 2010, 18:24:09 pm
Help Dev! i had downloaded the latest version of thi hack and i am getting a array of errors.

1. no text or description or image is showing up for wishlist.
2. found the following error.

- Warning: Invalid argument supplied for foreach() in /home/content/41/6713341/html/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1303

-Warning: Invalid argument supplied for foreach() in /home/content/41/6713341/html/administrator/components/com_virtuemart/html/wishlist.index.php on line 120

attachment as followed. i am pulling my hair out on this while trying to get things right and would glady appreciate if dev could assist me on checking up on my site what seems to be the problem.

attachment for errors as followed

[attachment cleanup by admin]
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: daweyo on December 04, 2010, 09:45:56 am
Forest, wonderful job.  This hack works wonderfully on a default installation of Joomla and Virtuemart.  Even on J1.5.21 and the newest V 1.16.  My website is too modified however, and your wishlist does not play well with Yagendo SEF router.php

I have spent too much time trying to get it to work, and I am finally giving up.  I see that other people were having problems with other SEF options, and at this point and the number of Google Indexed products I can not use the Virtuemart router.php.  However, Bravo for such hard and fine work.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: markocrni on December 12, 2010, 21:07:32 pm
Hi to all,
I use J1.5.20, VM1.1.6, sh404 2.8, joomfish!2.0.3. Wishlist work if I disable sh404, but when it's on this is what I receive:

No valid database connection 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 2 SQL=SELECT p.product_id, x.category_id FROM jos_vm_product AS p LEFT JOIN jos_vm_product_category_xref AS x ON (p.product_id = x.product_id OR (p.product_parent_id <> 0 AND p.product_parent_id=x.product_id)) WHERE p.product_id =

Also since I use multiple languages did anyone manage to adjust module for this purpose, since it is in Eng.?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: obrazoksro on December 13, 2010, 17:26:17 pm
hi
awesome hack! thanks
but why does it not return product details?
I only get the price correct but no thumb, product description, product name etc.
The price is fetched from table jos_vm_product_price white the details are fetched from jos_vm_product so my guess is there is something wrong with the get_product_info() function....

anyone else had this problem ?


I have the same problem, no thumb image, product name and description. only price and attributes ate shown. I realised that when I disable joomfish jfdatabase plugin it works but multilanguage feature is gone. Also when I remove from jfdatabase.php in last function $GLOBALS[ '_JOOMFISH_MANAGER']     =&  JoomFishManager::getInstance();  then it works but other content is not translated. I am desperate after 3 days of searching what cause the problem. I have PHP version 5.2.. Please can somebody help?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: hksan01 on January 05, 2011, 17:24:38 pm
Hello guys,

I'm trying to download the v1.9 file, but it's giving me a 404 attachment not found error.

Can anyone provide a working link or file?

Thank you,
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: BenjaminR on January 09, 2011, 19:04:56 pm
Nicely done. Implemented and working well!

I have an interesting question... I'd like to be able to create a wishlist for a customer. I get constant requests from customers to put a custom package of parts together for them.

Any suggestions on where to start?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DamaniuZ on January 17, 2011, 13:46:01 pm
This is a very good hack and does what it is supposed to!

There is only one problem I have a site that is requires special characters in the range of ISO-8859-1 so i just made extensions on some of the files to get their info from the language file. But it does not work in some cases. Or in other words i have the same problem as the user yannis1998 / tsili on pages 12-13 and i was wondering if i have to include some variables

I am using: Joomla 1.5.15 and VM 1.1.4

Ps: i tryed entering these varibles in the common/english.php file, that i added to the language file im using for the site, it did not fix the problem. The ones that i added in the mod_vm_wishlist.php work fine. but it does not work for the /wishlist/private/ or the /wishlist/public/ files.

Any ideas of how to get this working??
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DamaniuZ on January 18, 2011, 17:17:09 pm
Hi again, i could solve the problem temporary as in the wishlist does not support multilingual content but it is on the main language so its ok for now. But the thing is when i send the wishlist to a person everything looks fine and the link works but it does not support letters like: " á, é, ó, æ, þ, ö" and the message is all scrambled! is there a way to change the encoding for the email? For the life of me i cant find any solution for this. Hoping for a quick response..
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on January 19, 2011, 00:02:11 am
Hi Forrest!

It has been a long time since the last time I talk with you.

I celebrate that you have give two more updates to this valuable hack.

I have installed the new 1.9 version in one Joomla 1.5.21 site with Virtuemart 1.1.5 without problems.

Anyway, I'm finding silly things that I'd like to comment with you, and I'm sure you can add in your next version.

In other sites I have installed your hack and showed it in a lightbox. But now, I don't have the energy to look at into the lines of the new 1.9 version, probably the next month. So, I'm using the continue link. And the first little problem I found is the behaviour of this "continue_link".

This "continue_link" is lost when you for example remove some item of the list, or update the quantity, or you share or stop share your wishlist with someone.

REMOVE

In the case or remove action or quantity, the solution is simple, and it's solved adding to the link the category_id and product_id variables.

I write the lines for the rest of people:

Inside the whislist.index file, more or less at lines 229-230 search for these lines:

Code: [Select]
$remove_link = $base_url . '&page=wishlist.index&func=wishlistDeleteItem';
$action_url = $base_url . '&page=wishlist.index&func=wishlistUpdateItem';

and change by these ones:

Code: [Select]
$remove_link = $base_url . '&page=wishlist.index&func=wishlistDeleteItem&category_id='.$category_id.'&product_id='.$product_id;
$action_url = $base_url . '&page=wishlist.index&func=wishlistUpdateItem&category_id='.$category_id.'&product_id='.$product_id;

Now, you'll never lost the continue link although you delete one or more items.

You must also repeat the same action inside the same file whislist.index, in lines .... more or less.... 304-305

SHARE

In the case of Share and StopShare links you must add the same variables at the end of the links.

Inside the whislist.index file, more or less at line 317 search for:

Code: [Select]
$share_link = $base_url . '&page=wishlist.share&func=wishlistShare';

and change by:

Code: [Select]
$share_link = $base_url . '&page=wishlist.share&func=wishlistShare&category_id='.$category_id.'&product_id='.$product_id;

more or less at line 322 search for:

Code: [Select]
$share_link = $base_url . '&page=wishlist.index&func=wishlistStopShare';

and change by:

Code: [Select]
$share_link = $base_url . '&page=wishlist.index&func=wishlistStopShare&category_id='.$category_id.'&product_id='.$product_id;

This lines solve the lost of "continue_link" when you stpo share one list. However, you must do another change if you don't want to lose this link, when you try to send the email with your wishlist.

The problem is that this variables are not collected in the whislist.share.php file. So the first step is to add them to this file.

Below line 24 in the whislist.share.php that looks like this:

Code: [Select]
$wishlist_id = JRequest::getInt('wishlist_id');

add this two lines:

Code: [Select]
$category_id = intval( JRequest::getInt('category_id'));
$product_id = intval( JRequest::getInt('product_id'));

And then below line 56 that looks like this:

Code: [Select]
$hidden_inputs .= '<input type="hidden" name="Itemid" value="'.$GLOBALS['sess']->getShopItemid().'" />';

Add two new hidden inputs that whislist.index.php will process:

Code: [Select]
$hidden_inputs .= '<input type="hidden" name="category_id" value="'.$category_id.'" />';
$hidden_inputs .= '<input type="hidden" name="product_id" value="'.$product_id.'" />';

And that's it!
Now, you won't never lose your continue link when sharing or stop sharing one wish list.

ADD ALL ITEMS TO THE CART

Exactly in the same way we solve the remove links, the solution is to add the category_id and product_id variables to the link.

Then, inside the whislist.index file, more or less at line 310 search for this line:

Code: [Select]
$addtocart_link = $base_url . '&page=shop.cart&func=wishlistAddtocart';

and change by this one:

Code: [Select]
$addtocart_link = $base_url . '&page=shop.cart&func=wishlistAddtocart&category_id='.$category_id.'&product_id='.$product_id;

Now, when your items arrives to the cart, as the category_id and product_id are present in the url, the Cart can process the variables and print the properly continue_link.

QUANTITY

In the case of quantity, sorry to don't share the solution, but until this moment I've never used the quantity in any web, because I always sell digital downloable products, and obviously, in such sites, the quantity doesn't make sense.

At the moment of writting these lines, I don't have any line in the files that remember to the quantity because I delete all of them. Anyway, I'm pretty sure that the solution won't be different that in the other cases.

Well, sorry for the extension of this comment, and sorry for my bad english. You can be pretty sure that my spanish is better.

Thanks again for the improvements in your nice hack, and Happy New Year from Spain!

Hermes

 
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Hermes on January 23, 2011, 21:09:35 pm
Another silly thing...

I've working in the validation of the pages off my site, and in order to get validated the pages, remember change in the wishlist.index.php all the "&" characters in the links to "&amp;" both without quotes, obviously.

Do this in all the links, including the links I provided in my previous post.

That's All!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: xcyte on January 31, 2011, 10:58:34 am
hi,
I'm having some problems with this hack.
I've done what instructions said, but I've got the following error:

Warning: Invalid argument supplied for foreach() in /home/public_html/xxxx/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1303

Warning: Invalid argument supplied for foreach() in /home/public_html/xxxx/administrator/components/com_virtuemart/html/wishlist.index.php on line 120

my joomla version is 1.5.22 and virtuemart 1.1.4

if anyone knows how to fix it i appreciate.

Thanks
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 09, 2011, 02:52:13 am
Hermes, thanks for the feedback. I've been away for some time. I'll look at these in depth when I get to it.

for those of you reporting errors... like sef issues. VM natively does not execute wishlist functions, so they need to be added in router.php or likewise in your sef component.

I have it working fine with latest rev with sef on using router.php./
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: DamaniuZ on February 10, 2011, 14:05:14 pm
Hello Forrest.

I was wondering if this hack works with VM 1.1.6?
Did browse the forum but did not find an answer to this question..

Also you have not responded to my post about having multiple languages or multilingual site for the wishlist.. any thoughts?

And also I just love this extension but i have to update the vm to 1.6 and it is also going multilingual on me..

Thanks.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on February 14, 2011, 06:46:58 am
Sorry no ML support, and not sure about 1.6 :(. Just have not had the time to work on this one lately. Please share any additions you may make yourself here, so we can pass the support onto others.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: mpulse on February 22, 2011, 22:38:52 pm
Got a problem,

Installed everything added the sql   seeing it in the db along with the  mod entry in the db
but i get this when I go to VM wishlist and ad a new one

Error: Module Not Registered."wishform" is not a valid VirtueMart core module.

and

ERROR
You do not have permission to access the requested module.


cant get this to work and im not sure whats wrong 

thanks

using VM 1.1.7
jm 1.5.22
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: itonic on February 23, 2011, 10:19:42 am
Hi, I would like to start off by saying what a fantastic bit of code and a must for any virtuemart shop.

I am experiencing the redirect problem after adding the item to the wishlist where it redirects to the home page. Its as if its not picking up the correct URL.

Please could you help as I'm due to go live the 1st of march (I apologise for the desperation) http://www.orangeghost.co.uk/index.php (http://www.orangeghost.co.uk/index.php)

joomla 1.5
virtuemart 1.7
gkmystore template
acesef pro
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: rsiple on February 26, 2011, 03:57:35 am
Forrest, This is what I've been looking for...specifically the ability to save multiple wishlists. I've installed per your very good instructions however all I am getting is a white empty screen in the body of my page when I click the "My Wishlist" link of the module. Any help is appreciated. ???
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on February 26, 2011, 10:57:45 am
Nicely done. Implemented and working well!

I have an interesting question... I'd like to be able to create a wishlist for a customer. I get constant requests from customers to put a custom package of parts together for them.

Any suggestions on where to start?
How about making a wishlist,you as a shop admin or whatever other user, then making it public, and sharing it with your customers on their email addresses(if applicable)?
now if you are concerned for privacy issues, maybe you would opt for emailing the whole cart for them ?
It's Just a thought :)
Kind Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: flora01 on February 26, 2011, 11:00:47 am
Hi, I would like to start off by saying what a fantastic bit of code and a must for any virtuemart shop.

I am experiencing the redirect problem after adding the item to the wishlist where it redirects to the home page. Its as if its not picking up the correct URL.

Please could you help as I'm due to go live the 1st of march (I apologise for the desperation) http://www.orangeghost.co.uk/index.php (http://www.orangeghost.co.uk/index.php)

joomla 1.5
virtuemart 1.7
gkmystore template
acesef pro
This might work for you : http://forum.virtuemart.net/index.php?topic=34989.msg170542#msg170542
I appended it to my signature the day it saved me from a similar problem as yours :)
Hoping it works
Kind Regards
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: itonic on March 01, 2011, 00:44:56 am
Hi, Thanks for your response, I didnt solve my issue though. However I think I may have done it myself (not sure if it will have any effect on the rest of the module but all seems well)

in administrator\componants\com_virtuemart\html\wishlist.add_item.php

around line 48  replace :

Code: [Select]
echo '<form action="'.URL.'index.php" method="post" name="addtowishlist" id="addtowishlist">';
with
Code: [Select]
echo '<form method="post" name="addtowishlist" id="addtowishlist">';
Hope this helps

cheers
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: omar.bobo on March 09, 2011, 14:41:53 pm
Does exist an italian language pack?

I translate and copy the code from english.php to italian.php, but it is not enough.

Thank's for the help
Title: Re: HACK: Wishlist + Mod. Admin panel help
Post by: jassbhangal on March 28, 2011, 04:26:26 am
Hi Friends

Yeh its a great tool
hey friend i need help for its admin panel..... in admin panel wish list you can delete the whole wish list but i don't want to delete the whole list .... i want to delete the products in the back end from the list ... do you have any code for that... if you have please reply

Thanks in Advance

Jass Bhangal
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on March 29, 2011, 05:11:05 am
No code, but you can always just access the sql database and manually process as needed.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: itonic on April 02, 2011, 01:05:34 am
Hi,

Bit of a strange one.
Im using ACESEF and it seems to be caching my wishlist (great bit of code by the way) links then getting indexed as URL's and now Im getting search engine visitors through :-

https://www.orangeghost.co.uk/wishlistadd_item/wishlistadditem-dp2?category_id=73&flypage=shop.flypage.tpl&manufacturer_id=83&product_id=659

what dya think guys & girls?

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on April 11, 2011, 19:09:57 pm
Not sure on the AECSEF, but you could use robots.txt to disallow Search Engine Indexing of wishlist, hence you will not find your wishlist links on the web.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: nyamdavaa on May 17, 2011, 16:15:21 pm
We need the system to send notification to our email should any customer updated their queue. is it Possible?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: MarkusJansson on May 22, 2011, 13:19:09 pm
Hi,

This seems to be the exact thing I am looking for. I have installed v1.9 and the installation seems to be right. But I can't see my wishlists in the front-end. When I click the module "My WishLists (2)" the page I come to is just blank. I can see in the database (and backend) that the wishlists are saved, but I can't see it from the frontend.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 22, 2011, 21:29:13 pm
@nyamdavaa: sure it is, but you'd have to custom code that in.

@MarkusJansson: Are you using SEF? If so, what is it?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: MarkusJansson on May 23, 2011, 09:01:43 am
Hi,

thanks for your reply. I'm using a theme that isn't default, so I just copied the files to my own vm-theme, and now it works fine! Thanks for a great hack!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on May 24, 2011, 22:50:43 pm
That would do it! :) Glad it's working for you now.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: ludo167 on June 19, 2011, 17:48:27 pm
Got a problem,

Installed everything added the sql   seeing it in the db along with the  mod entry in the db
but i get this when I go to VM wishlist and ad a new one

Error: Module Not Registered."wishform" is not a valid VirtueMart core module.

and

ERROR
You do not have permission to access the requested module.


cant get this to work and im not sure whats wrong 

thanks

using VM 1.1.7
jm 1.5.22

Same error but i don't how to solve

Thanks in advance,
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Sandesh on June 23, 2011, 16:57:23 pm
Hello mpulse and ludo167,

I had the same problem. On clicking New an error message was displayed "Module Not Registered."wishform" is not a valid VirtueMart core module". I solved it using the below step..

Step 1 : Open the file - Joomla_Root_Directory\administrator\components\com_virtuemart\toolbar.virtuemart.php.

step 2 : Search for the variable $noNewItem.

(The variable $noNewItem is an array of elements that do not have new button.
It look like : $noNewItem = array( 'order.order_list', )

step 3 : Add 'wishlist.reports','wishlist.list' at the end of the array.

                    'store.shipping_module_list',
                    'product.review_list',
                    'wishlist.reports',
                    'wishlist.list');
 
This could be occurring because virtuemart attaches a NEW button as default to a page variable which contains a string that has a word called "list" in it. In the url it gives you "&page=wishlist.reports" for  Wishlist Reports menu and "&page=wishlist.list" for List Wishlists.So in both case the variable "page" contains a string with "list" in it. It replaces the word "list" with "form" so the "wishlist" becomes "wishform" which is not a valid VirtueMart core module.
 
Hope that helps..
Title: Infinite list?!?
Post by: livioporrello on July 01, 2011, 01:21:16 am
Good morning to all the Team.

  Congratulations on a job well done.  ;)

Once a friend / acquaintance buys a book or list item, this is hit with a stick from the list or not to do it more graying order? That I would not run into n.100 pair of shoes if I'm in the list.  ;D  Especially if the product is cheaper in my list  ;D ;D


I was trying and I noticed that once the client / friend buy an item from your wish list, the list is not updated, ie the object is removed from view.  :(

This could lead to double purchases of two friends / customers who purchase the same product for you.  :-\

It would be nice to update the quantity to zero and take it after purchasing the product, or if it is more identical items to bring that every purchase the right amount of the counter counting.  ;D

 Once you send the wish list to friends / acquaintances, when they purchase an item from this list, an email is sent to the owner's wish list?

let's see if any of you have some great ideas for improving this form itself already fantastic.  ;D

Thanks very much and good luck to all

Livio
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on July 09, 2011, 19:17:08 pm
Txs for input. I'll consider the add on a newer rev when I get to it.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: illferris on August 03, 2011, 16:12:59 pm
First of all, just let me say that this is absolutely fantastic! Thanks for your work and contribution to the open source society! I am very very grateful!  :)

I will be (hopefully) using this for a gift registry aspect of VirtueMart for a wedding gifts store. Everything works really well except I cannot figure out how to make the lists searchable in Joomla. Is this possible? For instance, someone registers their wedding gifts, and then their friends, family, guests, etc go to the website and search for their name. Nothing comes up when I try this. It seems as though the wishlist is not a searchable item. Am I missing something? Is there a specific page that needs to be added to the menu first? I added the page index.php?option=com_virtuemart&page=wishlist.index to the menu system and called it gift registry.

But I feel I am still missing something that is not allowing me to be able to search and find the wishlist. Clicking on the gift registry link does in fact list all of the wishlists when not logged in and only the users wishlist when logged in. But people usually expect to just search for a persons name or wedding party on gift registry websites.

Can you please advise if there is a way to make them searchable? I would really appreciate it. And I am really blown away that you have managed to make this function with VirtueMart like you have. One would think that it should be added by default anyway.

Thanks so much!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: iojens on August 18, 2011, 10:28:21 am
Great work - thank you for your efforts. Works like a charm :)

I initially had a few problems that mainly had to do with using a multilanguage shop - the wishlist page and everything related to it was empty / wishlist buttons etc. seemed missing. Possibly some others reading this tread have run in a similar problem and the fix is obvious and simple: all you have to do is add the translations to the according language file in virtuemart (it's located in administrator/components/com_virtuemart/languages/common) - check lines 1333-1390 of the english.php file provided in this release, copy and paste those into your language file and give them an appropriate translation.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on August 18, 2011, 20:16:06 pm
Cool. If you want to provide the translations here, I will add them to the hack.

Also, as for searching, I will have to look into that. J plugin would need to be created.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: -Per- on September 03, 2011, 21:54:46 pm
Hi,

I need some help. I installed this module following every step, including renaming the prefix before running the SQL-file in myPHP. Then copied all the files via FTP choosing overwrite all and installed the zip-file in my adminpage, so far no problem. Now on my livesite I can se the modul, at least the texts. "My Wishlist" & "Create or view your wishlists!" but there are no graphics. The buttons are just a small "!" at the products and a dot at the module. When I click the "!" I recieve a blank infobox. Seems like it cant find the graphics nor generating the texts. Some linking might be wrong?

Anyone who might know whats wrong?

(I have Joomla 1.5.23 and Virtuemart 1.1.7a installed)
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: bruceluis on September 10, 2011, 00:55:10 am
Hi guys
I never saw the solution for this: "Fatal error: Call to a member function query() on a non-object in /home/content/25/4900925/html/mysite/administrator/components/com_virtuemart/classes/ps_wishlist.php on line 1779"
Please i need help with this?
Thanks in advance!!!!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: brickford5 on September 12, 2011, 18:57:31 pm
Great hack and much thanks!!! I do have one problem, when the wishlist is shared and the link in the email is clicked, it does not show any products to the user. The only time products are shown in the wishlist is if you are the user that created the wishlist and are logged in.

Any suggestions would be awesome!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: esalvino on September 13, 2011, 11:05:41 am
hi
awesome hack! thanks
but why does it not return product details?
I only get the price correct but no thumb, product description, product name etc.
The price is fetched from table jos_vm_product_price white the details are fetched from jos_vm_product so my guess is there is something wrong with the get_product_info() function....

anyone else had this problem ?


I have the same problem, no thumb image, product name and description. only price and attributes ate shown. I realised that when I disable joomfish jfdatabase plugin it works but multilanguage feature is gone. Also when I remove from jfdatabase.php in last function $GLOBALS[ '_JOOMFISH_MANAGER']     =&  JoomFishManager::getInstance();  then it works but other content is not translated. I am desperate after 3 days of searching what cause the problem. I have PHP version 5.2.. Please can somebody help?

Forrest, thank you so much for this great tool. I'd love to use it in my website but can't figure out a solution for my problem.

I'm having the exact same error with this guys, I'm getting dizzy on looking for solution, can anyone point me in the right direction please? I appreciate it so much.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: esalvino on September 20, 2011, 06:03:31 am
Anyone who could point me to the right direction please?

Thank you
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on September 24, 2011, 06:18:12 am
I am not familiar with with Joomfish, tho at some point I will take a look. In the mean time, others had problems with my metadata hack with Joomfish. Someone posted a fix. You might compare the v1.7 version with the 1.7_multi version... for download here:
http://forum.virtuemart.net/index.php?topic=65697.0

and view his specific post:
http://forum.virtuemart.net/index.php?topic=65697.msg297783#msg297783

He makes mention of changing just a few queries.... do a compare and see what he did. Try applying similar to the wishlist queries.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: fooman on September 27, 2011, 18:21:12 pm
Forest, wonderful job.  This hack works wonderfully on a default installation of Joomla and Virtuemart.  Even on J1.5.21 and the newest V 1.16.  My website is too modified however, and your wishlist does not play well with Yagendo SEF router.php

I have spent too much time trying to get it to work, and I am finally giving up.  I see that other people were having problems with other SEF options, and at this point and the number of Google Indexed products I can not use the Virtuemart router.php.  However, Bravo for such hard and fine work.

It actually works with Y-agendoo's SEF (currently on the 1.6 version) - you have to simply merge the router file (the wishlist options) with the Y's plugins/system/yagendoorouter.php and plugins/system/yagendoorouter/com_virtuemartrouter.php files.

If/when I get time I'll post it here.
Title: about adding wishlist without login
Post by: nyamdavaa on September 27, 2011, 22:31:04 pm
is it possible to add products to wishlist without login (wishlist will can be saved in session ??? ) and if user wants to share own wishlist , it needs to login etc ?...

Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on September 28, 2011, 08:26:17 am
Sorry, this is not a session based wishlist system, and hence needs a user account. If you want a sessions based system, look on the VM Extensions site, you might find one. There used to be one:
http://extensions.virtuemart.net/
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: CranialBlaze on October 03, 2011, 08:52:57 am
With VM2 finally closing in on the finish lines will their be an update being released as i assume the current hack will not work, i have seen many file and structure changes
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: Forrest on October 03, 2011, 08:55:52 am
lol, maybe.
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jdw on November 10, 2011, 22:40:23 pm
Trying to add social bookmarks to a shared list, using addthis i have put the icons onto a list which is shared BUT after getting the link onto FB, when clicked i am directed to the list of all wishlists as opposed just the one i linked to, from here i can then click on all shared list and view them and see the list of all unshared lists.

 is there any way to change this so that the url generated is for only the list that the bookmark is set from?

I guess the way to do this would be to have the shared list's URL be the url that is used when originally sending a share invit but, i've no real clue as to where to find that or where to put it if I did find it...

Can any one help with this?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: dksystem on November 17, 2011, 01:02:48 am
Did this hack is okey with 1.1.9 last version of virtuemart?
Thx!
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: jdw on November 21, 2011, 19:59:22 pm
Works for me on 1.1.9
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: chaesar on March 02, 2012, 21:06:50 pm
How do I change the logout redirect destination? Which file do I edit?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: gyurltrini on October 20, 2012, 03:45:17 am
does this work with joomla 2.5 & virtuemart 2.0.12d?
Title: Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
Post by: platzer on March 21, 2013, 12:11:28 pm
Is it possible that a product is removed from the wishlist, when someone buys it?
Did anyone try this already?