Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-15-2002 20:41:13

dcorwin
Member
Registered: 09-08-2002
Posts: 23

Quickest way to a sale

What's the shortest path as far as an external link for a customer ready to buy one particular item? For instance, let's say I have another site just devoted to product X. It's available on my CCP5 site but buried 3 catagories deep. They're ready to buy from siteX. They click a link and I want them to go right to the checkout screen. How would I link that? I can get them to product description pretty easily, but can I go one deeper?

The "add to cart" is a submit-style button so maybe this isn't possible?

Thanks,
Dave

Offline

 

#2 11-16-2002 11:49:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

Yes, but not to the product screen.  You can get them to the shopping cart screen with the product already added by either doing a GET with a URL:

http://www.yourdomain.com/ccp5/cgi-bin/ … quantity=1

Or you could do a form POST (which will keep this info out of the URL:

<FORM METHOD="POST" ACTION="http://www.yourdomain.com/ccp5/cgi-bin/cp-app.cgi">

<INPUT TYPE="HIDDEN" NAME="pg" VALUE="ste_cart_add_proc">
<INPUT TYPE="HIDDEN" NAME="ref" VALUE="XXX">
<INPUT TYPE="HIDDEN" NAME="price" VALUE="10.00">
<INPUT TYPE="HIDDEN" NAME="quantity" VALUE="1">

<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Add To Cart">

</FORM>

Using either of these (GET or POST) would post a quantity of 1 of product XXX for $10.00 into the cart and direct the user to the cart page.

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#3 11-16-2002 11:50:05

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

This $%#@ forum - in the <FORM> tag, ignore the ; after the " before the >.
___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#4 11-19-2002 13:43:27

dcorwin
Member
Registered: 09-08-2002
Posts: 23

Re: Quickest way to a sale

Got it. Thanks!

Offline

 

#5 11-21-2002 22:55:51

Guest
Guest

Re: Quickest way to a sale

This seems very interesting... but when I try it I get:

The was an error adding the item you selected to your shopping cart. The quantity submitted is invalid. Please try again.

 

#6 11-21-2002 23:54:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

Two things could cause this:

(1) You did not pass the field 'quantity' as a valid number.

(2) You have a maximum quantity allowed set and your quantity exceeded the maximum allowed.

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#7 02-08-2003 16:50:38

48hourprint
Member
Registered: 02-03-2003
Posts: 22

Re: Quickest way to a sale

OK Nick... now lets take this one step further.

We need customers to complete one entire purchase from start to finish for each item they wish to buy. Being able to update or add additional quantities is what we are trying to work around, and we're looking to bypass the "view shopping cart" step entirely and go straight from the product detail page (with all of the associated product options) to the 1st checkout page (ste_chkout_proc).

SELECT PRODUCT-->PRODUCT DETAIL (and add options)-->CHEKOUT (ste_chkout_proc)


We use direct links from our HTML product page to the product detail page for each corresponding item.

http://www.48hourprint.com/cgi-bin/ccp5 … ef=bc_5000

So I changed this to:

http://www.48hourprint.com/cgi-bin/ccp5 … quantity=1

Then, I tried to update the product detail display page by commenting out:

############################

(CGIGET TYPE="SUB" VALUE="ste_prod_show_addtocart_detail")

############################


and adding:

############################

<INPUT TYPE="IMAGE" SRC="(CGIVAR)images_path(/CGIVAR)/button/submit_update.gif" WIDTH="(CGIVAR)site_button_image_width(/CGIVAR)" HEIGHT="(CGIVAR)site_button_image_height(/CGIVAR)" BORDER="0" VALUE="submit"> <A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_chkout_proc"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/button/submit_checkout.gif" WIDTH="(CGIVAR)site_button_image_width(/CGIVAR)" HEIGHT="(CGIVAR)site_button_image_height(/CGIVAR)" BORDER="0"></A>
</CENTER></FORM>

############################



But of course still the shopping cart is still empty...


The idea is there, but the excecution isn't! Thanks in advance for any ideas....

Offline

 

#8 02-10-2003 13:42:12

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

Back out that change and in the file ./cgi-bin/library/modules/ste_cart.pl in the routine 'ste_cart_add_proc' change the line:

$fd_pg = "cart";

Which appears at the top of the routine to:

$fd_pg = "ste_chkout_proc";

That should do what you need it to do.

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#9 04-07-2003 01:29:51

darkgear
Member
Registered: 03-26-2003
Posts: 7

Re: Quickest way to a sale

Whoa! Isn't this subject to abuse?  I just tried this on my site and I can add any item at whatever cost I specify in the URL? Anyway to stop this from being abused?

Best regards,
Randy Domingo
Darkgear.com

Offline

 

#10 04-08-2003 08:39:29

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

The program works like this so that it can accept items from many different sources - remote HTML pages, discounted category pages, product detail pages, etc.  It is very common for carts to pass prices in URLs (especially on those that have you build your own HTML).  There is some checking in the code, though, to make sure the post is coming from a trusted source (based on the HTTP_REFERER variable).

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#11 10-08-2003 10:01:53

mjinxed
Member
Registered: 02-03-2003
Posts: 344

Re: Quickest way to a sale

Is there no way to have an external "add to cart" button anywhere that will simply add the product to the cart with whatever price is in the system rather than specifying it with:

Code:

<INPUT TYPE="HIDDEN" NAME="price" VALUE="10.00">

This would mean that prices have to be maintained in two places and with roughly 2,000 products to deal with, this could cause a problem.....and a migrane.

MJL

Offline

 

#12 10-09-2003 06:59:15

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19872
Website

Re: Quickest way to a sale

In the file ./cgi-bin/library/modules/ste_cart.pl in the routine 'ste_cart_add_cgi_api_proc' what you'll want to do is to modify the SQL statement and resulting array to include your price variables, then instead of using:

Code:


$cart_amtprod = $q->param('price');

In there, use a variable or formula to figure out the price based on values in the product table.



Nick Hendler

Offline

 

Board footer