Author |
Message |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
 Product Categories different links with top menu
I have done up a top menu for the product categories and I have linked them to a productPage. This is done successfully but it seems that the links on the left menu does not reflect the same link as the top menu links. Can anyone advise me on where to locate the files of the Product categories? Or how do I add the ppinc into the links for the product categories on the left menu?
|
Tue Jun 21, 05 7:21 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
URL to your store, please....
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue Jun 21, 05 10:16 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
|
Tue Jun 21, 05 7:55 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Well, to do this dynamically, you will need to set up one of the user fields to contain the ppinc file to use for each product in a category.
Then in the store_header.inc file, edit the following line:
Code:
print " <a href=\"agora.cgi?cart_id=%%cart_id%%&product=",
To something like this:
Code:
print " <a href=\"agora.cgi?cart_id=%%cart_id%%&ppinc=%%userFieldTwo%%&product=",
HTH!
Last edited by scottcrew on Thu Jun 23, 05 8:10 am; edited 2 times in total
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Jun 22, 05 5:18 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
Sorry. but can you explain further on what is user fields? and which folder is it located? is it html-templates?
|
Wed Jun 22, 05 6:48 am |
|
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
scottcrew, I have managed to find out on how to edit the user field but I am not really sure on how to set up the userfields to contain the ppinc file. Can you guide me on that please?
|
Wed Jun 22, 05 8:03 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Whoops, I just went to visit your store and something seems to be amiss. Did you edit or remove any index.html files in the store? If so, you will need to restore the original file, 'cause the store isn't working...
More on the issue at hand:
If is recall you're selling dog stuff, right?
In the database, manager -> product edit/product add, for example: each of the apparels, put "4a" (less the quotes) in the User 2 field.
Then when the dynamic information in the header file gets interpreted and each category gets listed the place where "user2" is in the link, will be translated to 4a. So the link for Apparels would look something like:
http://www.nadioki.per.sg/store/agora.cgi?cart_id=1111111.1111&ppinc=4a&product=apparels
Oh, BTW, I had miss coded how to change that bit of code. I've edited the post to be correct, but in the URL it needed to be %%user2%%, not just "user2". The '%%' around the 'user2' identifies the information being a "token" that would be replaced with set data.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Jun 22, 05 9:40 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
Oh yes, I was editing here and there and the whole store just went corrupted
The only files I have touched are store_header.inc and product_edit-ext_lib.pl
Anyway, I have overwritten them with the backup original files and I have tried your method above by adding in the 4a in the user2 field in productedit function and changing the store header.
It doesnt seem to have any effect.. the left menu is still showing the old results
Last edited by nikito on Thu Jun 23, 05 8:13 am; edited 1 time in total
|
Thu Jun 23, 05 7:04 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Oops... We have so many different ways of doing some of the tokens...sorry 'bout that...
use %%userFieldTwo%% instead of %%user2%%.
I have edited my post above to reflect this.
Oh, yeah, DO NOT replace the %%cart_id%% token with ANY numbers, it cause everyone to have the same cart id and nobody will be able to shop correctly 'cause they will have somebody else's items in the cart... Just copy the code in the post above and plug it into the store_header.inc, you should also edit the secure_store_header.inc file, too.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jun 23, 05 8:12 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
It still doesn't work!  Let me list out the stuff that I have edited, perhaps it will be easier to check what I have missed out.
- Change store_header with code "userFieldTwo"
- Duplicate the whole store_header script to secure_store_header.
- Add in 4a to all user 2 field in products edit function
That's about all. Did I miss out any steps? How about product_edit-ext_lib.pl file? Do I need to edit that as well?
|
Thu Jun 23, 05 8:28 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Okay, forget everything I said...
Totally wrong thinking.. those only work on the actual product page.
Anyway, You will just need to delete the "agorascript-pre" stuff for the categories and hard code those links.
Sorry about all of the frustration... There is probably a way to do it, I just can't figure it out...
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jun 23, 05 8:50 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
Hi scottcrew,
no apologies! I have learnt quite abit from you on the agoracart. In fact, I am quite familiar with some of the location of the files with your detailed explanation. The only thing is that I am unable to locate the file to edit the left menu.
Let me try again... hope I can get lucky!
Many thanks for your help.
|
Thu Jun 23, 05 8:09 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
The file is the store_header.inc & secure_store_header.inc . The section that dynamically creates those category links is the entire section of code that contains the line that I had mentioned to edit, in my above post. The section of code begins:
<!-- agorascript-pre
and ends with
-->
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Jun 24, 05 4:57 am |
 |
 |
nikito
User - Two Blades
Joined: 18 Jun 2005
Posts: 144
|
Don't really mind the hard code as long as it works fine! I have done it and it seems ok now...
Thankie!
|
Fri Jun 24, 05 9:40 pm |
|
 |
|