Using the product's raw HTML form is a flexible way to capture many custom product option values from your web page when you add the item to the cart.
If you go into the Add Ecommerce to Website/Social page and choose Sell Single Product in Step 2 you'll see a Buy Now HTML form code ecommerce plugin type available. By default this adds the item to the cart.
It is possible to include upto 200 product options using this approach allowing you to have more than 2 product options lists on an item which you'd otherwise you'd be restricted to when using the online Product Manager.
The shopping cart pass through product variables are presented to the customer with the item in the shopping cart checkout. The product stock code you specify must exist as a product you've already created in your Product Manager.
Each product label and value pair appears with the customer order data in the store admin Order Manager.
| Variable | Field Size | Description |
|---|---|---|
| custom_label_x | 50 |
The descriptive label you want to appear in the customer checkout and order for this field.
x is to be replaced with a field number from 1 to 200. Numbering must start at 1 and must be sequential as you add additional fields. The label value for this field will be paired with the value set for the matching custom_value_x field of the same sequence number. e.g. custom_label_1 |
| custom_value_x | 3 |
The value you want to appear in the customer checkout and order for the matching custom_label_x field number. This would typically be the value collected from the shopper using any of the HTML form input types, e.g. select, text, radio button values etc.
x is to be replaced with a field number from 1 to 200. Numbering must start at 1 and must be sequential as you add additional fields. The value for this field will be paired with the value set for the matching custom_label_x field of the same sequence number. e.g. custom_value_1 |
| currency | 3 |
The ISO 3 character currency code.
Pre-set a different currency of the item added to the cart so the shoppers cart is changed into that currency when they add the item. If you do not specify a currency the store's default display currency will be used when a product is added to the cart. You must have the currency enabled in your store admin Currency Manager. If the currency you entered is not enabled on your account, your store's default display currency will be used instead. e.g. USD See: ISO 4217 is a standard published by the International Organization for Standardization, which lists the 3 character currency codes. |
| amount | numeric |
Donation/Buyer Chooses Value Product Type Only
The numeric value, without any currency code or currency symbol, which sets the value of the 'Donation/Buyer Chooses Value' product added to the cart. This allows you to dynamically set the price of the item added to the cart based on your own custom logic in your webpage. The value must be equal to or greater than the minimum amount set on the product in the Product Manager. e.g. 50.25 |
An example Buy Now HTML Code with custom variables:
The example above was created with the HTML code below and demonstrates using several product options lists manually entered as HTML select lists:
<form action="https://ecommerce.shopintegrator.com/buy/YOUR_CLIENT_CODE/YOUR_STOCK_CODE" method="POST">
<input type="hidden" name="custom_label_1" value="Flavour">
Flavour: <br>
<select name="custom_value_1">
<option value="Cherry">Cherry</option>
<option value="Vanilla">Vanilla</option>
<option value="Strawberry">Strawberry</option>
</select>
<br>
<input type="hidden" name="custom_label_2" value="Mix">
Mix: <br>
<select name="custom_value_2">
<option value="100% Strength">100% Strength</option>
<option value="90% Strength">90% Strength</option>
<option value="80% Strength">80% Strength</option>
<option value="70% Strength">70% Strength</option>
<option value="60% Strength">60% Strength</option>
</select>
<br>
<input type="hidden" name="custom_label_3" value="Weight">
Weight: <br>
<select name="custom_value_3">
<option value="0 MG">0 MG</option>
<option value="12 MG">12 MG</option>
<option value="18 MG">18 MG</option>
<option value="24 MG">24 MG</option>
</select>
<br><br>
<input type="submit" name="Submit" value="Buy Now">
</form>