Print Page | Close Window

Settin up small shopping cart summary

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=2268
Printed Date: 07-July-2025 at 4:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Settin up small shopping cart summary
Posted By: ericpollard
Subject: Settin up small shopping cart summary
Date Posted: 19-December-2008 at 2:18am
I am trying to setup a shopping cart summary following the guide on this page: 

http://wiki.earlyimpact.com/how_to/add_shopping_cart_summary

Where do I include the code
<!--#include file="SmallShoppingCart.asp"-->

Is this the only code I need to add to the page to have the summary show up?

Also, all my articles and product pages are actually not going to be written in
ProductCart, but in Joomla. Everything seems to be working fine this way. I have
included add to cart buttons on Joomla pages that have linked to the ProductCart
shopping cart with no problem. So I imagine this should be able to work...

I just don't know where/how to insert that code...

One more question too, can the SmallShoppingCart.asp path be rewritten to be direct,
as in, http://www.soonandsoon.com/productcart/pc/smallshoppingcart.asp ?

I will need to do this since the page that will be linking to the smallshoppingcart.asp
summary won't be in the same directory as it typically would be...

Anyways, thanks for the help...



Replies:
Posted By: Greg Dinger
Date Posted: 19-December-2008 at 1:45pm
You won't be able to include ASP code into non-ASP scripts.  They won't talk to each other.
 
I recall there being a javascript, or so I thought, that was in the support section somewhere.  Someone pointed it out to me one day and I noted that it was written to display cart totals from non-ASP pages. 
 
Essentially, I believe you will have to study the cart totals script and work out a method of calculating the cart totals (if possible) in a language compatible with Joomla.
 
Good luck. 


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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: ericpollard
Date Posted: 31-December-2008 at 2:06am
Anyone from Early Impact want to chime in on this? 

Mr. Dinger mentioned a javascript that displays cart totals on non-ASP pages... Any idea where this script can be found? 

Thanks.


Posted By: Matt
Date Posted: 31-December-2008 at 2:52am
As Greg mentioned, you cannot use an asp snippet in a php application.  The small cart snippet uses an array, which has a ton of logic behind it.  So you probably do not want to port all of that code to php.  You could, perhaps, convert the asp array to a JavaScript array so it can be consumed in your PHP page.  I am not aware of any such code already available.


Posted By: Greg Dinger
Date Posted: 31-December-2008 at 7:11am
My memory of that JS code came from a phone call I received from a prospective customer.  They had poked around the site and found a piece of code that according to my memory used JS to manage the cart contents array, just as PC currently does natively in ASP.
 
Perhaps Hamish recalls that code, but as Matt indicates, it does not appear to be present on the site, and so it would need to be built custom for your site.  ASP code will not run within PHP scripts, and such a routine would have to be written in JS - modeled after the equivalent ASP script.  You could contact us directly if that were your interest.


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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: GreggS
Date Posted: 24-October-2012 at 1:24pm
I also have a problem adding the small shopping cart to our site.  The issue is unrelated to this but I figured I'd add to this instead of making a new post.

On this page,
http://wiki.earlyimpact.com/how_to/add_shopping_cart_summary" rel="nofollow - http://wiki.earlyimpact.com/how_to/add_shopping_cart_summary

It says to add this code where you want it to be displayed.
<!--#include file="SmallShoppingCart.asp"-->

When I add it anywhere on header.asp or footer.asp I get a 500 - Internal server error.  If I try just to even view the page by itself I get the same error.
store/pc/SmallShoppingCart.asp

Is there something I'm missing? Does it have to be in a certain place? Or do I have a bigger issue?


Posted By: Greg Dinger
Date Posted: 24-October-2012 at 1:50pm
You need to set code and server settings to reveal raw error messages.  That will likely identify an included file reference that needs to be added, or some other issue.  Just knowing that you got a 500 error isn't going to be sufficient to resolve the problem.

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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Guests
Date Posted: 24-October-2012 at 2:05pm
Regarding including the small shopping cart in non-ASP apps, I've done this by using an iframe on WordPress blogs. Here's an example:
http://www.thethriftyneedle.com/blog/" rel="nofollow - http://www.thethriftyneedle.com/blog/

RE: Gregg's issue -- there's probable a name redefined or db connection missing ... something simple. Gregg, shoot an email to our support and I'll get you our 500.100 error trapping with instructions on how to set it up.



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