Add a shopping cart button to a post

Started by EL34, August 23, 2019, 12:02:36 PM

Previous topic - Next topic

EL34

On my forum, I have a buy-sell-trade board
I am the admin
I saw a post in a google search that said that admins are able to use this tag in post
[html][/html]

I would like to add a shopping cart button in post that leads back to my web store and adds an item to the shopping cart

I tested this code in a post and it does produce a button, but the button does nothing
It works fine in any web page on my web site

Is there a way for me to get a <form> button to work in a post?

Here's the code I tested





[html]
<form action="https://mywebsite.com/MyStore/shoppingcart.cgi" method="post"> 
<input type="hidden" name="ITEM_F1" value="CloseOutSale.gif" />
<input type="hidden" name="ITEM_SHIPTYPE" value="1" />
<input type="hidden" name="ITEM_OPTION1" value="Yard sale" />
<input type="hidden" name="ITEM_OPTION2" value="AA0"/>
<input type="hidden" name="ITEM_OPTION3" value="" />
<input type="hidden" name="QTY_MIN" value="0" />
<input type="hidden" name="QTY_MAX" value="1" />
<input type="hidden" name="ITEM_WEIGHT" value="1" />
<input type="hidden" name="ITEM_TAXTYPE" value="psdbi99.htm" />
<input type="hidden" name="ITEM_ID" value="misc item" />
<input type="hidden" name="ITEM_NAME" value="Test Item" />
<input type="hidden" name="ITEM_PRICE" value="1.00" />
<input type="hidden" name="qty" value="1" />
<input type="hidden" name="showcart" value="1" />
<input type="submit" name="dummy" value="Click here to add this item to your shopping cart" />
<input type="hidden" name="thispage" value="partsenter.htm" />
<input type="hidden" name="action" value="quickbuy" />
<input type="hidden" name="order_id" value="!ORDERID!" />
<input type="hidden" name="ITEM_CODE" value="!ITEMCODE!" />
</form>
[/html]


Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

vbgamer45

Form tags will not work inside an SMF post.

A workaround would be be to to put that code in an iframe that insert the iframe into the post.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

EL34

Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

EL34

Quote from: vbgamer45 on August 23, 2019, 12:36:01 PM
Form tags will not work inside an SMF post.

A workaround would be be to to put that code in an iframe that insert the iframe into the post.

Thanks, but I can't figure out how to add the form above into an iframe?

The frame needs a source and there is no src page
The form creates a new shopping cart session page on the fly

How would I construct the iframe code?
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

Advertisement: