Forum

Thread tagged as: Shop

option image does not save

I added a line in templates/shop/products/options.html

<perch:shop id="image" type="image" label="Image" bucket="images" />

I am shown image selection option in admin area, but it does not save image selection and does not show in front end too?

am I doing anything wrong?

I need to have an image with each option, sort of color swatch.

sawan ruparel

sawan ruparel 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please show us your full template and Diagnostics Report.

full template file

<perch:shop id="title" type="text" label="Title" required="true" help="e.g. Size, Colour" />
<perch:shop id="precendence" type="number" label="Precendence" required="true" default="1" step="1" size="s" min="1" />

<!--* Don't change this repeater - it's needed for editing options. *-->
<perch:repeater id="options" label="Values" divider-before="Option values">
    <perch:shop id="title" type="text" label="Option" data-sku="title,skucode,id" />
    <perch:shop id="image" type="image" label="Image" bucket="images" />
    <perch:shop id="skucode" type="text" label="SKU code" data-code="1" />
    <perch:shop id="id" type="editcontrol" edit-control="true" />
</perch:repeater>
<!--* / don't change *-->

Diagnostics Report

Perch Runway: 2.8.29, PHP: 5.5.18, MySQL: 5.5.38, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), jw_activity_log (1.0.1), perch_blog (5.0), collection_2 (2.8.29), collection_8 (2.8.29), ketterus_dashboard (1), collection_3 (2.8.29), collection_6 (2.8.29), perch_forms (1.8.3), instagram (2.1), perch_mailchimp (2.0.1), perch_shop_orders (1.0), perch_shop_products (1.0), my_sample (2.1), perch_shop (1.0), storelocator (2.1), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', 'perch_shop', 'perch_mailchimp', 'perch_forms', 'perch_blog', 'instagram', 'jw_activity_log', 'storelocator', 'sherrihill', );
PERCH_LOGINPATH: /content
PERCH_PATH: /Users/Sites/localsite.com/content
PERCH_CORE: /Users/Sites/localsite.com/content/core
PERCH_RESFILEPATH: /Users/Sites/localsite.com/content/resources
Image manipulation: GD
PHP limits: Max upload 1024M, Max POST 1024M, Memory: 128M, Total max file upload: 128M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: sherrihill.local
DOCUMENT_ROOT: /Users/Sites/localsite.com
REQUEST_URI: /content/core/settings/diagnostics/
SCRIPT_NAME: /content/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

At the moment you can add field to options but not to the option values.

understood. i will try to hardcode it for now.