Print Page | Close Window

Add to Cart link to page

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=2288
Printed Date: 27-September-2024 at 2:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add to Cart link to page
Posted By: fire
Subject: Add to Cart link to page
Date Posted: 30-December-2008 at 3:15pm
I am trying to see how I can make PC stay at the same page (viewCategories.asp?idCategory=?) that the add to cart button (submit button) is at instead of opening up the viewCart.asp. I don't want to have our customers click 'Continue Shopping' button...



Replies:
Posted By: Greg Dinger
Date Posted: 30-December-2008 at 3:18pm
http://www.greybearddesign.com/productcart/add-to-cart-confirm/ - http://www.greybearddesign.com/productcart/add-to-cart-confirm/

-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: fire
Date Posted: 30-December-2008 at 4:28pm
Looks like a nice add on Greg...But is this not a easy change? Should just be a matter of changing the action in the form? In this case the form refers to instPrd.asp. If you open up this page in editor it should be a matter of changing the redirecting page which is set to viewCart.asp. so the page link should look something like this: 'viewCategories.asp?idCategory=53'
My problem is figuring out how to include dynamically the last part of the link for each category page ?idCategory=53'

I assume that I would need to find the right snippet of code that generates the idcategory page #?
Or would this be done better with Javascript? Ideas?


Posted By: Greg Dinger
Date Posted: 30-December-2008 at 7:07pm
I guess it depends upon how you value your time.  You may find it instructive, with regard to  your understanding of PC's internals, to work through this.  But my code supports not only the product detail page, but the category, home, specials, new arrivals and featured products pages.   My guess is that you will be saving money by purchasing a well-tested script with install instructions, but hey - maybe you have a lot of time on your hands and like coding.  Have fun!

BTW, might want to have a peek at instprd.asp to see what it does before you decide how easy this is going to be. 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: fire
Date Posted: 31-December-2008 at 1:19pm
I understand where you are coming from Greg...If someone is looking for a great add on then check out Greg's it does look good. And I may just do this but for now...I do have some time to spare and would like to familiarize myself with this cart. I am new to asp... As stated before I have changed the page that the button redirects to --from viewcart.asp to viewcategories.asp but wanted to figure out how individual pages could be called up.

I think the end link should look something like this
viewCategories.asp?<%=intIdCategory%>=intIDCategory%>
but I think that because the variables are not in the instprd.asp file this link will not work
 Is there anyone else who could point me in the right direction?
Are there any good tutorials out that could help me understand the framework of asp and productcart?
file:///I:%5CDOCUME%7E1%5Cm%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml - file:///I:%5CDOCUME%7E1%5Cm%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml -


Posted By: Greg Dinger
Date Posted: 31-December-2008 at 1:43pm
I'm just going to add that while you might get this working, by doing so you will have crippled the shopping functionality of all other "add to cart" buttons in the site. 
 
The path you are heading down assumes that shoppers may only purchase product from the category page.  If you have any other page in the site, such as home.asp or viewprd.asp where items may be purchased, and instprd.asp has been altered to point to the category page, it's going to be a disaster.
 
Imagine the surprise and confusion when a shopper clicks "buy" from one of those other pages, and assuming you work out which category that product is associated with and redirect them to that category's page, they will wonder why they landed there.   I challenge you to show me another store that features such functionality.  Your visitors will look at this odd functionality, lose faith in the store, and shop elsewhere.
 
Even if you only show products via category pages, you are locking down your options for future changes and excluding the usability of the bulk of PC's shopping pages.
 
I rest my peace, and wish you good luck.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: fire
Date Posted: 07-January-2009 at 11:40pm
BTW I did figure out how to do this.


Posted By: nurvserver
Date Posted: 13-January-2009 at 12:04am
Please post how you figured it out fire! This forum is always like this, a person ask for help greg or another senior comes in and says nothing helpful or tries to sell you some BS and then nobody posts the fix they found.


Posted By: Hamish
Date Posted: 13-January-2009 at 6:19am
Hi Nurvserver,
      I couldn't disagree more and I think you will find the vast majority find this forum a useful place to ask questions and get answers, especially if you play nice.
Sometimes the best answer IS to direct someone to an add-on that costs some $.  I have seen the code Greg wrote and I can state for certain that it's not a simple patch but a complete solution which would have taken a good knowledge of ProductCart. 
IMHO the time you save re-inventing the wheel and the quality of the solution makes this add-on worthwhile if it meets your/ your clients business needs.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: fire
Date Posted: 13-January-2009 at 1:12pm
To an extent I agree with you nurvserver. But Hamish is right as well sometimes the best way is to direct people to a good add on. Greg is a good guy and he knows a lot more then most people about PC. If you look he is active in the forum, which is good for all of us. His solution probably is the best. I would like to have more "experts" around answering questions and in general helping out. You have to understand though that PC developers are doing this full time this is how the make their bread and butter. However after saying that I do think that there should be more focus on the customers needs by PC in the forums. It is my opinion the forums do need to be more helpful. PC has ability to be the best cart around. Take a look at a crapy cart like osecommers forums and you will see that they are more helpful - almost to much. Don't get me wrong Hamish does a great job. I just wish there was more of a can do attitude and here is how to do it. Or here is what you may want to try. Or that there was more knowledgeable ASP programmers around. I totally understand PC wanting to help developers get clients (it creates a healthy environment) but PC as has to understand (and they do generally) that we are their clients. I for one do not want to pay for every little thing but willing to if I need to.

In regards to the solution it may not be best for you... I just wanted to redirect to the page the person was on. Out of respect for Greg I will PM you my solution which was not that hard BTW.


Posted By: nurvserver
Date Posted: 13-January-2009 at 3:44pm
I couldn't agree more that Product Cart is the best shopping cart ever made, and I have used them all. The logic of the cart was so well thought out that it amazes me to know it even exists. I also congratulate Early Impact for focusing on the product instead of individuals, this is probably why PC is so great. The wiki is also very helpful. But you are right that even on horrid product like os commerce the forums are a lot more active. I actually don't need the fix you mentioned. I just thought if you fixed it, it would be cool to see and maybe someone out there could learn from the fix. See the thing about any development of any code is it gives insight and opens the imagination. Maybe your posted code could give insight into another application that you never imagined it would be used for and then then more people could build cool ideas off that. Anyway, excuse me if I came off negative in my earlier post, I do like and appreciate Greg and all his help and hard work, I was mostly just making a statement that I wish there was more people on the forum meaning users that were interested in helping eachother.


Posted By: fire
Date Posted: 13-January-2009 at 4:18pm
My post before "BTW I did figure this out" was more because I did not think anyone would care. Or even notice the post.

"I was mostly just making a statement that I wish there was more people on the forum meaning users that were interested in helping eachother."

Okay, In the interest of helping others out.. This is what I did:
When a customer adds to cart they are posting that info to the page instPrd.asp (pc\instPrd.asp) this page validates/processes the page and then redirects (response.redirect) the page to viewCart.asp...
Using an editor (like dreamweaver) (save a copy)
open instPrd.asp- Find and Replace (Ctrl - F)
find viewcart.asp (response.redirect viewcart.asp)

replace with..wait for it....

Response.Redirect Request.ServerVariables("HTTP_REFERER")

This is it save and try it out. This works for me. Let me know What Y Think


Posted By: nurvserver
Date Posted: 13-January-2009 at 8:04pm
Tried it and worked like a charm. I will work on a response message for this like "the item has been added to you cart. Thanks for posting very cool.


Posted By: ProductCart
Date Posted: 14-January-2009 at 11:02am
A couple of comments on this thread (thanks for contributing!):

Technical Note
With regard to the solution provided above: thank you! You might want to http://wiki.earlyimpact.com/how_to - write a WIKI article on it so that others can further contribute to it.

For example, this method may not work correctly for ProductCart Build To Order users: it would redirect back to the "Additional Charges" step of the configuration process (last page before adding to the cart).

The redirect might also need to be different when adding to the cart from the customer service area (e.g. Repeat an order). I haven't checked.

Feature lacking
With regard to ProductCart not having a way for the store manager to choose the behavior after a product is added to the shopping cart: we agree that this is something that should be part of the application and will likely add it in version 4.

Partners and Add-on's
In the meantime, Greg at GreyBeard Design Group saw an opportunity and was certainly right to take advantage of it. We like it when resellers see a flaw in the system and fill the gap by creating a small or large add-on.

That's because there will always be areas of ProductCart that should be improved, we don't have time to improve, and others step in to improve. And if they can make a living doing so, they'll create even more useful add-on's!

It's ultimately up to ProductCart users to let them know whether they are charging too much (or too little) for what they created. But I want to stress that this kind of "marketplace" of add-on's is healthy and useful.

A more active community
We agree that the more active these forums become, the better for everyone using ProductCart. Porting the documentation from a static format (PDF) to a collaborative environment (WIKI) was based on the same idea that if everyone using ProductCart finds a way to share his/her experience, everyone else gains from it.

The http://www.earlyimpact.com/signup.asp - newsletter that we just started this week - called http://www.earlyimpact.com/newsletter/community_update_1_09.htm - ProductCart Community Updates - is another step in the same direction.

Thanks to all for helping us make ProductCart a better product!

Massimo


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: fire
Date Posted: 14-January-2009 at 5:54pm
Quick reply. I will seriously consider writing a WIKI on this. Thanks for posting!
In regards to the 'Repeat Order' this fix works. I do not have the PC BTO so I assume this does not work for that type of PC. I just realized that this post is from Massimo, again thanks for posting.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net