I use code to get an array of prices for my products from the database in a snippet called "Prices". In the page are old code like this:
where nnn is a product id ([11], [13], etc. - see example below).
How do I create a snippet so I can pass the 'nnn' to a single reusable snippet with a parameter for 'nnn'.
So I have an array of prices indexed by product id:
EG:
Please see https://mountainsangha.org/products-on-sale. Note that there are no prices.
Thanks for your help.
Code:
[insert_php]echo $prices[nnn];[/insert_php]
How do I create a snippet so I can pass the 'nnn' to a single reusable snippet with a parameter for 'nnn'.
So I have an array of prices indexed by product id:
EG:
Code:
Array
(
[11] => 9
[13] => 7
[16] => 12
)
Thanks for your help.