Forum
Variant Price
Hi
I'm using the following to display my variants in a dropdown;
<perch:input id="product" type="select" options="<perch:shop id="_variant_opts" type="hidden" />" />
How do I add the price to the dropdown/data select too?
Summary information
Perch Runway: 3.0.6, PHP: 5.4.45, MySQL: 5.5.54, with MySQLi
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.6), assets (3.0.6), categories (3.0.6), perch_blog (5.5.1), perch_shop_orders (1.2.1), perch_shop_products (1.2.1), perch_shop (1.2.1), perch_members (1.6.2)
App runtimes: <?php $apps_list = array( 'perch_members', 'perch_shop', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/fullfatwebsite/public_html/stotto/perch
PERCH_CORE: /home/fullfatwebsite/public_html/stotto/perch/core
PERCH_RESFILEPATH: /home/fullfatwebsite/public_html/stotto/perch/resources
Image manipulation: GD
PHP limits: Max upload 25M, Max POST 128M, Memory: 256M, Total max file upload: 25M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/fullfatwebsite/public_html/stotto
HTTP_HOST: stotto.fullfatwebsitedesign.co.uk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
I think you have to create your own dropdown options if you want more -
_variant_opts
is essentially a freebie string that is generated by the shop core. So it's not editable.I might be wrong, but that's my understanding of it.
Thanks Duncan
I will look into this...
Wayne
Hi
I've been looking at this on and off for the last couple of weeks, but as php isn't my string point I'm having difficulty. I can ask someone next week, but wondered if anyone had any pointers first.
I've done a search for
_variant_opts
in the core and looked at whats being done for that option, then looked at adding my own (out of the core), but my php knowledge is letting me down.Any help/pointers would be greatly received.
That's really beyond the scope of free support, I'm afraid.
Hi Drew. I understand, I'll either ask our php guy or post something on jobs channel on slack.