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?
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?
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...
The controller wish_list.php and view wish_list.tpl are attached.
What makes the problem....
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!
What makes the problem....
Attachments
two files attached, one for the controller and one for the view...
I would suggest you have to understand first the folder structure of opencart.Melanie wrote:Hi, can anyone help with this, where to put the files, how to install?
Thanks,
Melanie
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.
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
Ok, here it goes.
VIEW
product.tpl
CONTROLLER
product.php
LANGUAGE
product.php
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:
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.
Sorry guys, I am not good in explaining.
Hope this would help.
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>
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';
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');
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'];

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.
Lastly, the adding, removing, show all wish list functionalities are already in the wishlist.zip file.
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'];
Nevermind I got it working inserted it about the other HTTP_SERVER entry at line number 120
THANK YOU FOR ALL YOUR HARD WORK
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'];
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
The category.tpl link when viewed in a browser:
The product.tpl link when viewed in a browser:
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=
Code: Select all
http://mydomain.com/index.php?route=account/wish_list&product_id=620
Hello Mel,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
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.
Who is online
Users browsing this forum: No registered users and 4 guests