Post by Web Designer » Thu Jul 29, 2010 4:08 am

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?

Newbie

Posts

Joined
Thu Jul 29, 2010 4:05 am

Post by imburnal » Thu Jul 29, 2010 11:07 am

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

Attachments

two files attached, one for the controller and one for the view...


Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by imburnal » Thu Jul 29, 2010 2:35 pm

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.

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by imburnal » Thu Jul 29, 2010 5:43 pm

Here are the files....

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by Melanie » Wed Aug 04, 2010 8:47 am

Hello,

Can some explain how to install and use this.

And how to get it to display.


Thanks,
Melanie

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Melanie » Mon Aug 09, 2010 8:48 pm

Hi, can anyone help with this, where to put the files, how to install?

Thanks,
Melanie

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by imburnal » Wed Aug 11, 2010 5:34 am

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.

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by Rockstar » Wed Aug 11, 2010 6:08 am

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

Newbie

Posts

Joined
Tue Aug 10, 2010 6:56 am

Post by Melanie » Wed Aug 11, 2010 6:24 am

I also understand the folder structure.

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

Thanks,
Melanie

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by imburnal » Wed Aug 11, 2010 7:22 am

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.

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by imburnal » Wed Aug 11, 2010 7:42 am

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.

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by Melanie » Wed Aug 11, 2010 8:55 am

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

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Rockstar » Wed Aug 11, 2010 9:55 am

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'];

Newbie

Posts

Joined
Tue Aug 10, 2010 6:56 am

Post by Rockstar » Wed Aug 11, 2010 9:59 am

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'];

Newbie

Posts

Joined
Tue Aug 10, 2010 6:56 am

Post by Melanie » Wed Aug 11, 2010 10:19 am

Hi Rockstar!!

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

Thanks,
Mel

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Rockstar » Wed Aug 11, 2010 11:52 am

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

Newbie

Posts

Joined
Tue Aug 10, 2010 6:56 am

Post by imburnal » Thu Aug 12, 2010 5:51 am

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.

Newbie

Posts

Joined
Sun Jul 25, 2010 11:43 pm

Post by Melanie » Thu Aug 12, 2010 6:37 am

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

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by scanreg » Fri Aug 13, 2010 10:13 pm

wishlist would be great :)

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by Rockstar » Mon Aug 16, 2010 8:32 am

How about an add to cart button once it's on the wishlist?

Newbie

Posts

Joined
Tue Aug 10, 2010 6:56 am
Who is online

Users browsing this forum: No registered users and 4 guests