PDA

View Full Version : Set Ship Desti. B4 Checkout so Postage on View Cart


Manic
01-Jun-2007, 10:01 AM
Hello,

I noticed that when you start checkout /os000001.pl?ACTION=Start and submit the 'Shipping Destination' i.e country. If you exit the checkout and 'view cart' the cart displays the shipping costs.

So what I want to do is create a form that posts the country feild 'id="LocationDeliveryCountry" name="LocationDeliveryCountry2' to /os000001.pl and have it bounce back to a defined page - storing the country and from there on in showing shipping on the 'view cart' page.

I tried this

<FORM METHOD=POST ACTION="/cgi-bin/os000001.pl" >
<input type="hidden" name="RANDOM" value="0.123453090270446" />
<INPUT TYPE=HIDDEN NAME=REFPAGE VALUE="../shop/">
<SELECT ID="LocationDeliveryCountry" NAME="LocationDeliveryCountry2">
<OPTION VALUE="">Select country
<OPTION SELECTED VALUE="UK">United Kingdom
</SELECT>
<input type=SUBMIT name=ACTION_UPDATE value="ACTION_UPDATE">
</FORM>


But no luck.. any ideas as to how I can make it work. I need postage prices on the 'view cart' , later stages of checkout is too late imo.

There must be a way to get the country registered with the session, I looked at cookie data but I dont think it stores it there - so posting it seems viable.

M.

wjcampbe
01-Jun-2007, 12:21 PM
Look up "Request Location Early" in the v7 Advanced User Guide. This will prompt the user for a destination on the first Add to Cart.

Manic
01-Jun-2007, 01:32 PM
Thanks,

I tried it out - once I add something to cart I define the location and I then have shipping price in view cart.

HOWEVER .. If I add another product again there is the prompt to input location, ok so its set to what you put in last but its annoying!

The only way I can figure out how to set the location using an external form is shown below... Is there a way to do it without adding a product to cart? I want to be able to set the location from an external program by posting the lstDeliveryCountry to Actinic in the backgound (ajax).

<FORM METHOD=POST ACTION="cgi-bin/ca000001.pl" >
<INPUT TYPE=HIDDEN NAME=RANDOM VALUE="0.0551622634279592">
<INPUT TYPE=HIDDEN NAME="PAGE" VALUE="ORDERDETAIL">
<INPUT TYPE=HIDDEN NAME=REFPAGE VALUE="../shop">
<INPUT TYPE=HIDDEN NAME=PRODREF VALUE="SNOC">
<INPUT TYPE=HIDDEN NAME=SID VALUE="5">
<INPUT TYPE=HIDDEN NAME=CHECKOUTURL VALUE="cgi-bin/ca000001.pl?ACTION=SSLBOUNCE&URL=https%etc">

<INPUT TYPE=HIDDEN NAME="Q_SNOC" VALUE="1" SIZE=6 MAXLENGTH=10>

<SELECT ID="lstDeliveryCountry" NAME="LocationDeliveryCountry">
<OPTION VALUE="">Select country
<OPTION VALUE="UK">United Kingdom
</SELECT>
<SELECT ID="lstDeliveryRegion" NAME="LocationDeliveryRegion">
<OPTION SELECTED VALUE="UndefinedRegion">Select state/province if applicable
</SELECT>
<INPUT TYPE="CHECKBOX" NAME="SEPARATESHIP2" VALUE="YES">
<INPUT TYPE=IMAGE VALUE="Confirm" NAME=ACTION_CONFIRM SRC="confirm.gif" ALT="Confirm" TITLE="Confirm">
</FORM>

Toby B
06-Jun-2007, 08:44 AM
Just checking this.

Toby B
08-Jun-2007, 02:52 PM
I've checked with development and it will require quite a bit of script changes so I'll add this to the wish list.