Author |
Topic |
|
wws
Starting Member
24 Posts |
Posted - March 01 2005 : 11:00:07
|
Not sure if this can be considered a bug or not, but - I turned on Category Templates (using tmp_categorytemplate) and found that clicking on any Category link that has SUB-categories generates a "No products match your search" response on the resulting shopdisplayproducts page. Since the links in the template are hard coded as <a href="shopdisplayproducts.asp?id=[categoryid]&cat=[urlencode catdescription]"> this makes sense. Anyone have a way around this since you can't use asp logic in the templates themselves, or did I overlook something completely obvious somewhere?
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - March 01 2005 : 11:41:58
|
that should be ok; urlencode is one of vpasp's special-template fields (ie it's not just doing normal vbscript, it's a proper template field that vpasp have defined which takes the description argument value across to a corresponding vbscript function)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
wws
Starting Member
24 Posts |
Posted - March 01 2005 : 14:30:56
|
Thanks, but sorry, I don't follow you. Maybe I should clarify what I was trying to say.
The hard coded link in the template points to "shopdisplayproducts.asp", which is fine if the Category just has Products under it, BUT if the Category has SUB-Categories under it, you do NOT end up on the page that should have the sub-categories, you end up on a page that says "No products match your search", which is wrong. I'm not trying to get to Products, I'm tyrying to get to SUB-categories.
I think - though I may be wrong - that in this case (sub-cats) the link should be to "shopdisplaycategories.asp" instead, but in the template there is no way to do an "if - then".
I hope that makes more sense.
|
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - March 01 2005 : 17:25:06
|
aha; I see what you mean.
In that case I think you'd need to add another template field via shopfileio.asp.
There's no way of adding "if" logic inside the template itself; you'd need to add that logic inside the vbscript of a template-field's function instead.
There are 2 main ways of doing that....
1) Change shopfileio.asp to create new case-statements and new functions related to the new template field/function that you're creating.
2) We've got a generic "create-new-vpasp-template-fields" addon with loads of examples that can be used to create new template fields (ie with "if" logic or any other logic you want to add) The link for that is....
http://bigyellowzone.com/shopexd.asp?id=42
(another possible alternative is to turn the category templates off and hack-about the shopdisplaycategories.asp file to show things in the format that you're after)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons
Edited by - devshb on March 01 2005 17:46:24 |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - March 01 2005 : 18:08:24
|
Your page should work fine If you told the product to be in the main category and the sub category... you are getting no products found becasue you have no products coded to that sub category. Maybe Barnaby can write us a little program that will start on the furthest sub-category a product is in and back fill it to all the categories above it.... What do you think Barnaby?
Edited by - apswater on March 01 2005 18:10:33 |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - March 01 2005 : 18:17:15
|
aha; yes; that'd do the job too.
I guess it'll depend on whether you're using simple categories or not.
We do have such a category-fixing util:
http://bigyellowzone.com/shopexd.asp?id=74
point 4 does the backfill that you mention; we use this util all over the place when we do client work as it clears up the data nice and easily and generally gets things to work much smoother.
(well spotted fix by the way; that simplifies things a lot)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons
Edited by - devshb on March 01 2005 18:31:08 |
|
|
wws
Starting Member
24 Posts |
Posted - March 01 2005 : 18:55:51
|
Thanks devshb and apswater.
I just checked in and it's getting to be nighty-night time for me here, but wanted to acknowledge your suggestions. I'll take a look at them in the morning, with a (hopefully) refreshed mind.
Thanks again, I'll report back.
|
|
|
apswater
VP-CART Super User
444 Posts |
Posted - March 01 2005 : 20:16:03
|
Ahhh.. but that is just it, when you are setting up a new VP-ASP site for the first time you dont get to sleep! The program is so good and you can modify about anything, that you should spend endless sleepless night playing with it.
The major thing I did was to add editing to all the category and product pages to allow me to much more easily edit the site. Barnaby, you are welcome to steal any of my mods and put them into your stuff... The edit buttons are key. I now just need to only print the links when logged on as an administrator.
One last thing for Barnaby.... do you guys have something that will pass a cookie to a person after a sucessfull admin log in that will then let them keep doing admin functions without having to login again do you? Kind of like a save password thing but I use the double login password so I would rather not store the passwords in a cookie..
My site if you want to look about.. http://66.121.213.146/products and it is interfaced with http://www.apswater.com
I added upper category descriptions to the display products page
I added a link there also so if the list products too soon they can click and put the product into the sub categories.
Coded all the pages for individual meta tag titles and such
added edit on the fly
added breadcrumbs
Modifies the ShopUPSRealtime
(I still have to make it prettier but the function is all working well. )
I could use a change price by category and sub-category if you have it, I got one from shopforus but it doesnt work. Got anything like that?
Edited by - apswater on March 01 2005 20:46:18 |
|
|
greatphoto
VP-CART Super User
USA
304 Posts |
Posted - March 09 2005 : 15:38:13
|
quote:
The hard coded link in the template points to "shopdisplayproducts.asp", which is fine if the Category just has Products under it, BUT if the Category has SUB-Categories under it, you do NOT end up on the page that should have the sub-categories, you end up on a page that says "No products match your search", which is wrong. I'm not trying to get to Products, I'm tyrying to get to SUB-categories.
I think - though I may be wrong - that in this case (sub-cats) the link should be to "shopdisplaycategories.asp" instead, but in the template there is no way to do an "if - then".
Hi wws-
Did the above discussion help? If not, there is something to check that directly relates to what you are experiencing. In your categories table, make sure the higher category has hassubcategory, aka "Subcategories" field, set to "Yes". This will cause shopdisplaycategories.asp to be used instead of shopdisplayproducts.asp.
By the way, when you make this change, if you already have the higher category page open in your browser, make sure you reload it. Otherwise, you won't see the affect of your change. This might seem obvious, but its actually tricky in this case since the change affects the links in a page that is not immediately intuitive.
|
|
|
support
Administrator
4679 Posts |
Posted - May 10 2005 : 23:08:00
|
If you use [FORMATHYPERLINKS SUB] in place of the anchor tag in your category template then the category record will be checked to see if it has categories or not, and link to the correct page.
VP-ASP Support
|
|
|
|
Topic |
|