ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Add to cart from external site
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add to cart from external site

 Post Reply Post Reply
Author
Message
virtualimage View Drop Down
Newbie
Newbie


Joined: 06-February-2007
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote virtualimage Quote  Post ReplyReply Direct Link To This Post Topic: Add to cart from external site
    Posted: 06-February-2007 at 11:12am
Hi,

I'd like the ability to create a link/button on an external site that will add a product to the cart. I receive an error message from PC when I try this.

Here's the link I tried http://66.232.122.250/sgi/pc/instPrd.asp?idproduct=14&ad d=1

If you click this you'll receive an error saying that the item doesn't exist. If you then click it again, the product will be added to your cart. This leads me to believe that it's a session issue. Anyone know a way around this?

Thanks!

-Quinn
Back to Top
derekw View Drop Down
Newbie
Newbie


Joined: 26-March-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote derekw Quote  Post ReplyReply Direct Link To This Post Posted: 26-March-2007 at 2:43pm

I am having the same problem adding an item from a page on the same server as the cart.The form I use to add the item is the same as provided in the PC documentation.  First you get a "product id not found" error, then when you try the second time it works, and the item is added to the cart. Anybody have a solution?

Back to Top
virtualimage View Drop Down
Newbie
Newbie


Joined: 06-February-2007
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote virtualimage Quote  Post ReplyReply Direct Link To This Post Posted: 27-March-2007 at 1:16pm
Hey,

I solved this by building a "capture" page. The problem is that a session isn't started when trying to add the product. I only have this working with a link, not a form. Here's my code. Some items may not be required.

<%@language="VBScript"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>


<!--#INCLUDE FILE="../includes/settings.asp"-->
<!--#INCLUDE FILE="../includes/storeconstants.asp"-->
<!--#INCLUDE FILE="../includes/opendb.asp"-->
<!--#INCLUDE FILE="../includes/languages.asp"-->
<!--#INCLUDE FILE="../includes/currencyformatinc.asp"-->
<!--#INCLUDE FILE="../includes/shipFromSettings.asp"-->
<!--#INCLUDE FILE="../includes/taxsettings.asp"-->
<!--#INCLUDE FILE="../includes/languages_ship.asp"-->
<!--#INCLUDE FILE="../includes/adovbs.inc"-->
<!--#INCLUDE FILE="../includes/stringfunctions.asp"-->
<!--#include FILE="../includes/ErrorHandler.asp"-->
<!--#include FILE="../includes/pcProductOptionsCode.asp"-->
<%
Response.Buffer = True
'-------------------------------
' declare local variables
'-------------------------------

Dim conntemp, tIndex, tUpdPrd, pIdCategory, strBreadCrumb, pIdProduct, query, rs, dblpcCC_Price
Dim pcv_strViewPrdStyle, pcv_strFormAction, pcv_intValidationFile, pcv_blnBTOisConfig, iRewardPoints, pDescription, pMainProductName
Dim pSku, pconfigOnly, pserviceSpec, pPrice, pBtoBPrice, pDetails, pListPrice, plistHidden, pimageUrl, pLgimageURL
Dim pArequired, pBrequired, pStock, pWeight, pEmailText, pFormQuantity, pnoshipping, pcustom1, pcontent1
Dim pcustom2, pcontent2, pcustom3, pcontent3, pxfield1, px1req, pxfield2, px2req, pxfield3, px3req, pnoprices
Dim pIDBrand, psDesc, pNoStock, pnoshippingtext, intIdProduct, intWeight, optionA, optionB
Dim pcv_intHideBTOPrice, pcv_intQtyValidate, pcv_lngMinimumQty, intpHideDefConfig, pnotax, BrandName
Dim FirstCnt, strDescription, intReward, pcv_BTORP, strConfigProductCategory, dblPrice, dblWPrice, intIdCategory
Dim VardiscGo, dblQuantityFrom, dblQuantityUntil, dblPercentage, dblDiscountPerWUnit, dblDiscountPerUnit
Dim intIdOptOptGrp, intIdOption, strOptionDescrip, OptInActive, optPrice, tempIdOptA, tempIdOptB
Dim xrequired, xfieldCnt, reqstring, TextArea, widthoffield, rowlength
Dim scCS, cs_showprod, cs_showcart, cs_showimage, crossSellText
Dim pcv_strOptionGroupDesc, pcv_intOptionGroupCount, pcv_strOptionGroupCount, pcv_strOptionGroupID, pcv_strOptionRequired
Dim xOptionsCnt, pcv_strNumberValidations, pcv_strFuntionCall, pcv_strReqOptString, xOtionrequired, pcv_strCSDiscounts , pcv_strPrdDiscounts
Dim pcv_strProdImage_Url, pcv_strProdImage_LargeUrl, pcv_intProdImage_Columns, pcv_strShowImage_LargeUrl, pcv_strShowImage_Url, pcv_strCurrentUrl
Dim pcv_strAdditionalImages, cCounter, pcv_strWishListLink, BTOCharges, pcv_strCSString, pcv_strReqCSString, cs_RequiredIds, xCSCnt
Dim iAddDefaultWPrice, iAddDefaultPrice, pcv_intActive
'--> open database connection
call opendb()
%>
<!--#include file="pcStartSession.asp"-->

   
<%
     Response.Write Request.QueryString("idproduct")
     Response.Redirect("http://66.232.122.250/sgi/pc/instPr d.asp?idproduct="& Request.QueryString("idproduct"))
%>

</body>
</html>
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.062 seconds.