Page 2 of 3

Re: Add products to wishlist

Posted: Thu Jul 29, 2010 4:08 am
by Web Designer
Hello Norad,

I too am using version 1.4.7 too. Would you be willing to provide your wish_list.php and .tpl files for the forum users?

Re: Add products to wishlist

Posted: Thu Jul 29, 2010 11:07 am
by imburnal
guys,

here are the modified wish_list using version 1.4.7, but i got this error, on image helper. I will attached the files...

Code: Select all

Notice: Undefined index: product_id in C:\wamp\www\store\catalog\controller\account\wish_list.php on line 27Notice: Undefined index: success in C:\wamp\www\store\catalog\controller\account\wish_list.php on line 55Error: Could not load helper image!
The controller wish_list.php and view wish_list.tpl are attached.

What makes the problem....

Re: Add products to wishlist

Posted: Thu Jul 29, 2010 2:35 pm
by imburnal
At last I solved the problem...

@Web Designer
I will post my fixed here when it is final.

@Norrad
I just fixed it. Thanks for the table definition.

Re: Add products to wishlist

Posted: Thu Jul 29, 2010 5:43 pm
by imburnal
Here are the files....

Re: Add products to wishlist

Posted: Wed Aug 04, 2010 8:47 am
by Melanie
Hello,

Can some explain how to install and use this.

And how to get it to display.


Thanks,
Melanie

Re: Add products to wishlist

Posted: Mon Aug 09, 2010 8:48 pm
by Melanie
Hi, can anyone help with this, where to put the files, how to install?

Thanks,
Melanie

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 5:34 am
by imburnal
Melanie wrote:Hi, can anyone help with this, where to put the files, how to install?

Thanks,
Melanie
I would suggest you have to understand first the folder structure of opencart.

http://www.opencart.com/index.php?route ... ion&path=6

In my attachment, there is a prefix there that would tell it is a controller, a language, a model, and a view. Opencart uses an MVC style framework.

Good luck.

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 6:08 am
by Rockstar
I understand his question also. We all understand that model, view, controller go where they go in account/wishlist the thing I don't understand is how to make a call to it so theres a add to bag and add to wishlist button, so i guess we would need to see your product.tpl to see how you're actually adding an item to the wish list

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 6:24 am
by Melanie
I also understand the folder structure.

Would like to see the product.tpl file as well!

Thanks,
Melanie

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 7:22 am
by imburnal
Ok, here it goes.

VIEW
product.tpl

Code: Select all

<div><a style="text-decoration:underline;" href="<?php echo $add_wishlist; ?>" id="text_add_to_wishlist"><b><?php echo $text_add_to_wishlist; ?></b></a></div></td>
CONTROLLER
product.php

Code: Select all

$this->data['text_add_to_wishlist'] = $this->language->get('text_add_to_wishlist');

Code: Select all

$this->data['add_wishlist'] = HTTPS_SERVER . 'index.php?route=account/wish_list&product_id=' . $this->request->get['product_id'];

LANGUAGE
product.php

Code: Select all

$_['text_add_to_wishlist'] = 'Add to Wish List';
Explanation:
In VIEW, you can see two variables there, $add_wishlist and $text_add_to_wishlist, where $add_wishlist is used as an href while $text_add_to_wishlist is used for the text you can see in the screen in the product page.

To get this VIEW variables working, you have to declare these also in your CONTROLLER, where the first code above:

Code: Select all

$this->data['text_add_to_wishlist'] = $this->language->get('text_add_to_wishlist');
is used to get the language you declare in product.php LANGUAGE.

And where the second code below, is the action of an href in VIEW.

Code: Select all

$this->data['add_wishlist'] = HTTPS_SERVER . 'index.php?route=account/wish_list&product_id=' . $this->request->get['product_id'];
Sorry guys, I am not good in explaining. :) Hope this would help.

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 7:42 am
by imburnal
And in your view, if you want to used button for Add to Wishlist instead of text, you can used the class "button" in your stylesheet.css.

Lastly, the adding, removing, show all wish list functionalities are already in the wishlist.zip file.

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 8:55 am
by Melanie
Thanks for your help, your guidelines are really unclear.

I wish someone could explain this a little better, would be great to get this working........

Thanks,
Mel

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 9:55 am
by Rockstar
Where does this go in product.php? line number?

Code: Select all

$this->data['add_wishlist'] = HTTPS_SERVER . 'index.php?route=account/wish_list&product_id=' . $this->request->get['product_id'];

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 9:59 am
by Rockstar
Nevermind I got it working inserted it about the other HTTP_SERVER entry at line number 120

THANK YOU FOR ALL YOUR HARD WORK
Rockstar wrote:Where does this go in product.php? line number?

Code: Select all

$this->data['add_wishlist'] = HTTPS_SERVER . 'index.php?route=account/wish_list&product_id=' . $this->request->get['product_id'];

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 10:19 am
by Melanie
Hi Rockstar!!

Can you write a guide so we can get this working?

Thanks,
Mel

Re: Add products to wishlist

Posted: Wed Aug 11, 2010 11:52 am
by Rockstar
Mel, I followed just what they put there. If you can't follow what they put, you wouldn't really be able to follow what i could advise you on....That said, sure, i'll write up something for you..

EDIT: Correction to my question, it seams that when adding this bit of code to my categories.tpl the resulting link when viewing in a browser is missing the product id

Code: Select all

<a href="<?php echo $add_wishlist; ?>" id="text_add_to_wishlist"><?php echo $text_add_to_wishlist; ?></a>


The category.tpl link when viewed in a browser:

Code: Select all

http://mydomain.com/index.php?route=account/wish_list&product_id=
The product.tpl link when viewed in a browser:

Code: Select all

http://mydomain.com/index.php?route=account/wish_list&product_id=620

Re: Add products to wishlist

Posted: Thu Aug 12, 2010 5:51 am
by imburnal
Melanie wrote:Thanks for your help, your guidelines are really unclear.

I wish someone could explain this a little better, would be great to get this working........

Thanks,
Mel
Hello Mel,

Actually the first .zip file given by atulagarwal56 was really my basis. If you can't understand the code, then you can't get this working. There is a modification here, depending on what you want to do for your wish list, whether you want it to display in product page, category page, etc because we have different .tpl. It depends on you and my code there is just a tip telling how does it works.

Re: Add products to wishlist

Posted: Thu Aug 12, 2010 6:37 am
by Melanie
Thanks Imburnal,

I understand, I'll work hard and try and get it working.

We'll see.

Thanks for all the help so far.

Thanks.
Mel

Re: Add products to wishlist

Posted: Fri Aug 13, 2010 10:13 pm
by scanreg
wishlist would be great :)

Re: Add products to wishlist

Posted: Mon Aug 16, 2010 8:32 am
by Rockstar
How about an add to cart button once it's on the wishlist?