X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   trying to create a static ADDTOCART link (https://forum.x-cart.com/showthread.php?t=5644)

xcartman 12-17-2003 07:33 AM

trying to create a static ADDTOCART link
 
Hi,

I am trying to create a static link that adds item to shopping.
My link is almost identical to code below except i don't have a XCARTSESSID value. do i need this value and how would i generate it.



<form name="form90" method="post" action="cart.php?mode=add"><input type="hidden" name="XCARTSESSID" value="2ec62ba0cc0fde92a2e953fd964aec26" />
Quantity:
<input type=hidden name=mode value=add>
<input type="text" name="amount" value="1" size="2">

<font class=FormButton>Add to cart [img]../skin1/images/ADDTOCART.gif[/img]</font>
<input type=hidden name=productid value="90">
<input type=hidden name=cat value="">
<input type=hidden name=page value="">
</form>

Thanks

leon 12-17-2003 08:26 AM

You do need the xcartsession value, cause that is what controls the user and his cart.

Dont know how to do it static, but I would suggest you to think about it a bit, static content is just that, its ok to have an HTML catalog, but when the user is ready to buy better take him to php again.

Also, if you hack that, and later on you create the HTML catalog again you will have to hack it again manually, since all changes are lost.

shan 12-17-2003 09:14 AM

why create a static link ?

if you look at modify products, do a search and then look at the bottom of the page, you should see generate html links.

that should do it

xcartman 12-17-2003 11:04 AM

Thanks for your response

leon:
I wish it could be 1 step not more... just go straight to shopping cart.

shan:
The link that gets generated by search has sessid inserted . in a static page i don't have access to that value.

I Should ask question another way...

HOW DO I GET XCARTSESSID VALUE
eg.

<form>
...
<input type=hidden name=XCARTSESSID value=$xcartid> ---??????

Thanks,


All times are GMT -8. The time now is 01:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.