Author |
Topic |
|
bmw000
VP-CART New User
137 Posts |
Posted - May 06 2004 : 19:45:33
|
How can I have the cart allow me to have both the next and prevous buttons and also have a link to each specific page. This way the customer has a choice of going forward or backward one page at a time or go directly to a specific page?
Also, how can I have the cart add a feature to allow the customer to sort the product lising by price (ascending to descending)?
Any help would be greatly appreciated.
Thanks, Brian Weber
|
|
greatphoto
VP-CART Super User
USA
304 Posts |
Posted - May 06 2004 : 21:32:15
|
I second your feature request in your first paragraph. This would be nice to offer to customers and is seen on many other sites. I'm pretty sure there is no config for this, so it would require a mod of the ASP/VBScript code itself. Its probably a fairly simple mod once you find the right spot in the code. You can search for "xproductpagingnextprevious" in all the asp files to find the right spot.
Meanwhile, it might be a nice request for the "Feature suggestions for future releases" topic found at this link: http://www.vpasp.com/virtprog/vpaspforum/forum.asp?FORUM_ID=12
|
|
|
greatphoto
VP-CART Super User
USA
304 Posts |
Posted - May 06 2004 : 21:39:28
|
Okay, I searched this one out for you and its not as simple as I hoped. The two different display types are provided by the PageNavBarNext and PageNavBar subroutines in shop$db.asp. They are selected around line 185 in shopdisplayproducts.asp. Perhaps you can study these two routines and figure out how to merge them. It still may not be a huge job, but is more that I have time for right now.
|
|
|
jonmadrid
VP-CART New User
USA
192 Posts |
Posted - May 06 2004 : 22:54:49
|
bmw000, in answer to the first part of your first question -- how to display both the next/prev as well as links to each page -- there's an easy way to do it. Its kind of a hack but it's easy and will do exactly what you need. Here's the rub:
Edit shopdisplayproducts.asp, around line 185 as greatphoto mentioned, and look for this:
******* if getconfig("xproductpagingnextprevious")="Yes" then PageNavBarNext SQL else PageNavBar SQL end if *******
Just comment out the If/Else logic to show one or the other so that it always shows both:
******* 'if getconfig("xproductpagingnextprevious")="Yes" then PageNavBarNext SQL 'else PageNavBar SQL 'end if *******
That's it. Now they will both show up. All that does is circumvents the config setting that specifies whether to show the Next/Prev or numbered links and makes it show both regardless. Also, I suggested just commenting those lines out in case you ever wanted to go back and revert to the original way. If you did, you would just un-comment those lines and you'd be all set.
Thats the answer to your first question. Next, we did something along those lines of what you asked for you in your second question for a site we did recently and it works pretty well -- not to mention its a cool tool to have when browsing. It was not nearly as easy as the solution to your first question but we got it working. Its basically a toolbar that gives the user the following options:
-Next/Previous Pages -Enter specific page to jump to -Specify # of products to show on page -Specify how to sort product
You can see it in action at: http://www.kitchenexpress.com/shop/shopdisplayproducts.asp?id=35&cat=Axor+Citterio
We're still actually working the bugs out of it (and the site in general since it just launched) but it sounds like this might be what you're after.
If anyone is interested in purchasing the code and instructions for how to install it, e-mail me at [email protected]. We will have to write up some documentation for it but could do that if there is an interest.
P.S. If you happen to play with that toolbar on the kitchen site and run across any bugs (which is likely as of now) we'd like to know what they are so we can be sure to squash them all. Just e-mail the error details to [email protected] if you get a chance.
All the best,
Jon Madrid -------------------- Madrid Communications Web Design, Development, and Hosting www.madridcom.com
|
|
|
bmw000
VP-CART New User
137 Posts |
Posted - May 07 2004 : 18:15:50
|
I got it working. Commenting out those lines was a great solution.
Thanks.
Now I would like to be able add the sort feature.
I have the product filtering turned on. I do not want the filter selection that is currently displayed.
I would like to see it say "Sort By Price: Ascending or Descending"
I would like to click on the words ascending and descending as hyperlinks so if I wanted to sort by price in ascending order, I just click on the ascending link.
I would like it to be displayed at the top of the page.
Does anyone know how this can be done?
Any help will be greatly appreciated.
Thanks, Brian Weber
|
|
|
Cam
VP-CART Super User
Australia
361 Posts |
Posted - May 11 2004 : 10:12:25
|
Hi Brian,
Chris got you on the YourVirtualStore forum but thought to answer here as well in case you missed it.
Open shopdisplayproducts.asp and locate the ShowCategoryImage sub routine.
At the bottom of this sub just before the end sub reference insert the follwing:
%> Sort by Price: <a href="shopfiltering.asp?sortfield=cprice&sortupdown =ASC">Ascending</a> | <a href="shopfiltering.asp?sortfield=cprice&sortupdown =DESC">Decending</a> <br> <%
Save and test.
Hope this helps.
Thanks, Cam
************************************* Cam Flanigan YourVirtualStore Sales e-mail: http://www.vpasp.com/sales/shopcustcontact.asp web: http://www.yourvirtualstore.net Build you own YourVirtualStore!!! www.yourvirtualstore.net ************************************* |
|
|
bmw000
VP-CART New User
137 Posts |
Posted - May 11 2004 : 16:48:28
|
Thanks for the help!!
There is a reply on the YourVirtualStore forum about it. I got it working but there is a small issue.
We can continue this on the YourVirtualStore forum since I posted a response to your response there.
Thanks for the help.
Brian Weber
|
|
|
bmw000
VP-CART New User
137 Posts |
Posted - May 12 2004 : 20:36:01
|
For anyone wanting to accomplish sorting highest to lowest and lowest to highest with just a link on the page, here is the final code I used. I have it at line 138 in shopdisplayproducts.asp. I am using version 5 of vpasp.
response.write "<a>Display products By: </a>" & "<a href='shopfiltering.asp?sortfield=cprice&sortupdown=ASC' >Lowest To Highest</a>" & "<a> Or </a>" response.write "<a href='shopfiltering.asp?sortfield=cprice&sortupdown=DESC '>Highest To Lowest</a>" & "<br>" & "<br>"
Thanks sooo much from the folks at yourvirtualstore for all of thier help!!!
Brian Weber
|
|
|
|
Topic |
|