WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: gearup on November 18, 2012, 10:48:05 PM

Title: WYSIWYG Editor: Link URL with Item Price as parameter
Post by: gearup on November 18, 2012, 10:48:05 PM
Hi,

How to format a URL string so that the parameter (last value) can be added as a data item name.

For example, I want to use a web currency converter to show GBP (£) price of an item without needing to manage multiple prices/currencies within the shop module.

such as in the link editor the URL entry would be,

www.x-rates.com/calculator/?from=EUR&to=GBP&amount=57.95

what I want is the 57.95 to be replaced by some code to dynamically get the item price.

I would rather not include explicit item price values in the URL as a change in item price would no longer be a simple task although it does work ok like that (right now) for the test products.

This links are located in the "Add New Product, Brief description" editor section and display on the web page like,

(http://i49.tinypic.com/168ikgj.jpg)

Regards,

ps. I was looking to implement an easy and simple solution so I don't mind if someone suggests an alternative approach :)
Title: Re: WYSIWYG Editor: Link URL with Item Price as parameter
Post by: Ruud on November 18, 2012, 11:07:52 PM
In your Bakery page settings you can use:

Code: [Select]
<a href="http://www.x-rates.com/calculator/?from=EUR&to=GBP&amount=[PRICE]" target="_blank">PND</a>