Author Topic: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.  (Read 204060 times)

Roderick1

  • Jr. Member
  • **
  • Posts: 111
    • Top Motion
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #105 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:


When i add a product it shows me no products name or picture, look screenshot:


My wishlist overview shows no pictures and names, see screenshot:


How to solve this?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #106 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.
  • The first click (add to wishlist) obviously tells VM that the user want to add this product(s) to a wishlist.
  • The second click is required to allow the users to select the wishlist in which they want to add that product(s) too. This is one of the cool things about this hack; a user can have multiple wishlists and chose what list to add the item too.

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!

Roderick1

  • Jr. Member
  • **
  • Posts: 111
    • Top Motion
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #107 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 */

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #108 on: March 18, 2010, 00:24:48 am »
Sure, just shoot me a PM for discussion.

Hermes

  • Jr. Member
  • **
  • Posts: 73
    • Antimatter-Studios
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #109 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!!



Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #110 on: March 18, 2010, 02:41:40 am »
UPDATE 03-17-10: Download v1.6
  • Fix: templates for wishlist items was not getting correct image folder for add/delete/update buttons
  • Addition: Added updated router.php for those of you using router.php for SEF. router.php needs added functions to create proper SEF links. Please read README in file.
  • Files changed are:
    • components/com_virtuemart/themes/defalut/templates/wishlist/private/wishlist_item_row.php
    • components/com_virtuemart/themes/defalut/templates/wishlist/public/wishlist_item_row.php
    • README.txt

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.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #111 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!

AndyNZL

  • Beginner
  • *
  • Posts: 32
    • IPO Digital Design
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #112 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.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #113 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.

CranialBlaze

  • Jr. Member
  • **
  • Posts: 119
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #114 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.
I don't believe, therefore it does not exist

Joomla 2.5 VM 2.0.2

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #115 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=

AndyNZL

  • Beginner
  • *
  • Posts: 32
    • IPO Digital Design
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #116 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

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #117 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.

CranialBlaze

  • Jr. Member
  • **
  • Posts: 119
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #118 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.
I don't believe, therefore it does not exist

Joomla 2.5 VM 2.0.2

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: HACK: Wishlist + Mod. Multiple wishlists per user. Share with non-users.
« Reply #119 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!