Posts by ndwl

    I know on the forum there is a debate as to whether or not radio buttons should or should not have a default set. I recall (elsewhere) Drew comes down on the side of W3C and says that they should which is OK. However I have some products where the user can make choices from different sets of options (say colour and size). The first set of radio buttons (colour) has the first item selected however the second set of radio buttons for size doesn't have a default otion set. What I'd like to be able to do is allow the admin to choose which item in each set of radio buttons should be the default option (not necessarily the just the first alphabetically).

    Any pointers as to why stripe may be failing? Cart > Confirmation page > stripe form all appear OK, card details entered button goes green with a tick, reloads checkout page then hangs, order doesn't appear in the admin or stripe and no email is sent.


    I've got this before anything else on the checkout page


    and then this later on

    I'd really like to see an update on this matter too. I have great concerns over the future of Perch and the viability of using for clients sites, as a result of the almost total lack of communication from Perch HQ on such matters.

    If a user is logged in and has a certain tag I'm automatically applying a discount, however if that user logs out the discount is still displaying is it possible to remove or unset the discount on logout?

    Anyone out there got a work around to enable multiple trade prices?


    I can display different 'trade' prices on the product page base on whether the user is logged in and has a specific tag e.g. trade25, traed30 &c. But can't pass that price on with the product to the cart.
    If I just go with the standard trade_price (i.e. the single trade price functionality that ships with perch) all works OK.


    Could I achieve the same thing bay applying a discount code? can this be done automatically?

    Drew: Is this (multiple trade prices) something that could be included in release 4?

    with the help of Hussein I've kind of got this working with


    However for every match its generating two sets of <li> tags the first set is identical to the second bar the image having no src.

    I've created a page to list all products that are red

    PHP
    1. <?php
    2.     perch_shop_products([
    3.         'category' => 'colours/reds',
    4.         'sort' => 'year',
    5.         'sort-order' => 'DESC',
    6.         'sort-type' => 'numeric',
    7.         'template' => 'products/fabric_list_rd.html',
    8.         'variants' => true,
    9.     ]);
    10. ?>

    In variants.html I've added an image and a category

    Code
    1. <perch:group label="Variant">
    2.     <perch:shop id="sku" type="text" label="SKU" required="true" order="1" />
    3.     <perch:shop id="imageVariant" type="image" label="Variant image" order="5" width="800" />
    4.     <perch:shop id="imageVariant" type="image" width="84" height="84" density="1.6" crop="true" />
    5. </perch:group>
    6. <perch:group label="Categories">
    7.     <perch:categories id="colours" label="Colours" set="colours" display-as="checkboxes"/>
    8.     <perch:categories id="neutrals" label="Neutrals" set="neutrals" display-as="checkboxes"/>
    9. </perch:group>


    In 'fabric_list_rd.html' I'm using

    Code
    1. <perch:variants>
    2. <perch:variant id="imageVariant" type="text">
    3. </perch:variants>

    to get the path of the image (will be wrappered with an image tag). However this returns all the image paths for all the Variant images. I would like it to only return the image path of those Variants that are in the category "Reds" I've tried various perch:if statements to no effect, I've also tried

    Code
    1. <perch:variants>
    2.     <perch:categories id="colours" set="colours">
    3.         <perch:if id="catPath" value="fabric/reds/">
    4.             <perch:variant id="imageVariant" type="text">
    5.         </perch:if>
    6.     </perch:categories>
    7. </perch:variants>


    Any help would be much appreciated.

    Hi.
    When listing product variants is it possible to filter based on product options using <perch:if option="[Value]"> or <perch:if exists="[Option]"> ?


    I'm outputting various details using <perch:variants> but only want to output variants that meet a certain condition

    Good point about field groups.

    Just added field groups on product.html (will also add to other template) definitiely makes things more manageable (helps make the code more readable and the edit forms more compact for the admin/editors) On long forms using collapse also makes the "content" more visible. I had to make a few tweaks to styles.css to stop the <dt><dd> overlapping (in Firefox).