Here's how to add a link "Request a Sample" to every product.
In your store top (the bundle of money icon) create a new product called "Sample Request".
Set its price to £0, £0.50 or whatever you need.
In the Prompts tab, set Other Info Question to "Product".
In the General tab, write down the value in the Reference field (we need this later).
Tick Hide On Website.
That's your Sample Request product created.
We need to create a snippet of code added to every product that simulates an add to cart with the ID of the sample product and with the Other Info field set to the requested product name.
To do this, paste the following code into Notepad.
Change all four occurrences of 1234 to the Reference you noted down above.
Save the amended code and copy it to the clipboard.
Now, in your Product layout(s) paste the amended code and that will create a link "Request a sample" that will add the Sample Request product to the cart with the Other Info field set to the real product name.
In your store top (the bundle of money icon) create a new product called "Sample Request".
Set its price to £0, £0.50 or whatever you need.
In the Prompts tab, set Other Info Question to "Product".
In the General tab, write down the value in the Reference field (we need this later).
Tick Hide On Website.
That's your Sample Request product created.
We need to create a snippet of code added to every product that simulates an add to cart with the ID of the sample product and with the Other Info field set to the requested product name.
To do this, paste the following code into Notepad.
Code:
<a href="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />?SID=0&PAGE=PRODUCT&PAGEFILENAME=<actinic:block php="true">echo urlencode('<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />');</actinic:block>&Q_1234=1&O_1234=<actinic:block php="true">echo urlencode('<Actinic:Variable Name="ProductName" encoding="perl" selectable="false" />');</actinic:block>&_1234.x=1&_1234.y=1">Request a sample</a>
Save the amended code and copy it to the clipboard.
Now, in your Product layout(s) paste the amended code and that will create a link "Request a sample" that will add the Sample Request product to the cart with the Other Info field set to the real product name.
Comment