Posts by tonyastley

    I have a set of products with options:


    10 Colours

    2 Style Options

    4 Handle Options


    When generating the variants it takes approximately 16 (sixteen) minutes on a local development server. During this time the server is inaccessible.


    Obviously we cannot run with this. Has anyone experienced this and has anyone a suggestion as to what we might be able to do to remedy this?

    I have the following mark up as part of a product page template:



    I'm currently unable to delete any of the images. The delete UI icon shows overlaid on the image, but the image is still there when the admin page reloads.

    Hello,


    I have a product with variants. The variants are made available to select via the following template:



    The 'count stock' option on the product page is set to 'on individual variants'


    The variant is set to 'out of stock' and the stock level '0' - however it still shows as an option in the select menu.


    Same issue applies when showing the variants as radio options.

    Thanks Byron, tbh i'm scared of doing anything to that field. It's all sorts of caused issues for me so far.


    Why the products are not tracked by their ID at the lowest level is a mystery to me.

    Is it possible to make a field un-editable?


    I would like a client to be able to see the field but not edit it?


    This is because changing SKU's cause all sorts of problems within Perch Shop. :rolleyes:

    Thanks Hussein,


    The syntax was what I needed. I'd already got the pipit inline assets plugin working.

    Code
    1. config.buttonsHide = ['link', 'bold'];

    Bizarrely everything apart from buttonsAfter appears to work? ButtonsAfter puts the buttons at the start regardless of where you specify.


    I resulted buttonsAdd instead. Thanks again.

    Hello,


    I need to add extra button to redactor (undo/redo, sup, sub etc). Redactors site offers the following code:


    Code
    1. <!-- call -->
    2. <script>
    3. $R('#content', {
    4. buttonsAddAfter: {
    5. after: 'deleted',
    6. buttons: ['sup', 'sub']
    7. }
    8. });
    9. </script>


    Whereabouts within Perch should I be adding this?


    Normally there is a way to supplement what is there without modifying the existing code.

    Is it possible to combine two sets of results into one?


    This code shows the blog post results, then everything else:


    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchBlog'], )); ?>
    2. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchBlog','PerchShop','PerchContent'], )); ?>

    It would be great if I could combine them into one paginated set of results.

    Here's another one to add into the mix:


    The following code returns blog posts in search:

    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchBlog')); ?>

    However the following code does not if multiple pages are matched to a term, shop items are include, content items are included but blog posts are omitted?:

    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchBlog','PerchShop','PerchContent'] )); ?>

    Hello,


    I have the following code in the search results template:


    Code
    1. <perch:if exists="image">
    2. <div class="image">
    3. <div class="imageHolder">
    4. <perch:template path="content/image_responsive.html" rescope="parent"></perch:template>
    5. <span></span>
    6. </div><!--/.imageHolder-->
    7. </div><!--/.image-->
    8. </perch:if>


    The blog post template contains the following code:


    Code
    1. <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />


    However the image is not being returned in the search results. This works fine for all other results with an image id, any reason why the blog image would not be returned?

    OK, with a little bit more work I've got this working as I expected it to work.


    By explicitly adding the 'apps' I want it to search content within it works as expected.


    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchShop','PerchContent'], )); ?>

    The search now successfully finds content within the shop pages and the standard pages.


    Note: There is hardly any content in my site at this stage (some pages found only have titles and no text content), but it works perfectly.


    Hope this helps others when getting blank search results.


    Special thanks to this post: https://grabapipit.com/blog/content-search

    I have the following code:


    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, )); ?>

    This returns no search results, even though the term used is matched across various pages and products.


    If I add the shop app to the list it returns shop products:

    PHP
    1. <?php $query = perch_get('q'); perch_content_search($query, array( 'count'=>12, 'apps' => ['PerchShop'], )); ?>


    Does Perch Search page titles for standard pages? There are pages within the site that are exact matches for the search term entered.

    Hello both,


    The problem occurs due to the system treating a blank price field as zero (0) when deciding what to value to pass to the basket.


    IMO it should default back to the standard price if the current field is blank in the admin - both for sale and/or trade pricing.


    I've worked around this using javascript on the back end for now when adding a new product, so in theory the field can never be blank if a price is entered for the product.


    Bizarrely making the price fields required, prevents the product form from submitting.

    I'm trying to pass the number of items into a variable, however it seems to behave differently.


    $cartCount = perch_shop_cart_item_count(true);


    However this echoes the cart count, and the variable $cartCount remains empty?


    Does this behave differently to other functions?