Hide URL onsubmit="AddToCart(this);" parameters (SOLVED)

Problems installing or using the NOP Design Free Shopping Cart that do not fit into one of the above categories.

Moderators: Koibito, Stefko, Randy

Hide URL onsubmit="AddToCart(this);" parameters (SOLVED)

Postby Histographik » Sun Jan 16, 2011 4:36 am

(SEE BELOW FOR SOLUTION)

Does anyone know how I can hide or mask the hidden input variables (x= y= etc) in the URL for a checkout html page?

Here is the URL address shown to customers on my site when they get directed to a checkout html page:

Code: Select all
http://www.somewhere.com/order.html?x=104&y=82&QUANTITY=1&PRICE=100&NAME=Product-01=PROD-01


I would prefer to show a cleaner URL if possible, something like this perhaps;

Code: Select all
http://www.somewhere.com/order.htm

Code: Select all
http://www.somewhere.com/order

Code: Select all
http://www.somewhere.com/order-Product-01


I have tried using htaccess RewriteRules but nothing seems to work. I'm not necessarily looking to obscure information from the user just present a cleaner URL that cannot be manually manipulated. Perhaps using a session cookie would would allow this?

The above checkout.html URL was generated by the following generic nopcart form:

Code: Select all
<form  id="order1" action="order.html" onsubmit="AddToCart(this);" >
<input type="image" src="images/product1.png" value="Add to Cart" />
<input type="hidden" name="QUANTITY" value="1" />
<input type="hidden" name="PRICE" value="100" />
<input type="hidden" name="NAME" value="Product-01" />
<input type="hidden" name="ID_NUM" value="PROD-01" />
</form>


========== SOLVED :oops: ==========

Very simple (embarrassing) omission causes this verbose output: change submission from GET to POST (line 1 below : method="POST")

Code: Select all
<form  id="order1" action="order.html" onsubmit="AddToCart(this); method="POST" >
<input type="image" src="images/product1.png" value="Add to Cart" />
<input type="hidden" name="QUANTITY" value="1" />
<input type="hidden" name="PRICE" value="100" />
<input type="hidden" name="NAME" value="Product-01" />
<input type="hidden" name="ID_NUM" value="PROD-01" />
</form>
Last edited by Histographik on Thu Feb 17, 2011 4:04 am, edited 3 times in total.
Histographik
WebMaster
 
Posts: 18
Joined: Sun Mar 14, 2010 2:40 am
Location: Hong Kong

Re: Hide URL onsubmit="AddToCart(this);" parameters

Postby opa » Fri Jan 21, 2011 1:08 am

Very good question,
hope also there be a solution for it.
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands

Re: Hide URL onsubmit="AddToCart(this);" parameters

Postby opa » Tue Feb 01, 2011 12:33 am

The question is easy.
Look like the answher is not :roll:
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands

Re: Hide URL onsubmit="AddToCart(this);" parameters (SOLVED)

Postby Histographik » Thu Feb 17, 2011 4:18 am

SOLVED! See edit to original post
Histographik
WebMaster
 
Posts: 18
Joined: Sun Mar 14, 2010 2:40 am
Location: Hong Kong

Re: Hide URL onsubmit="AddToCart(this);" parameters (SOLVED)

Postby opa » Fri Feb 18, 2011 12:31 pm

This is working for shop go to manage cart.
When using the SSL mod from Stefco, this is not working in the SSL checkout page ( method post ) :?
URL stil show the total order line.
( due the cookie is past to SSL page )
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands


Return to Help: Cart / General

Who is online

Users browsing this forum: Exabot [Bot], wuhuilin11 and 5 guests