hus_hmd Registered Developer

  • Male
  • from Dubai
  • Member since Jan 27th 2019
  • Last Activity:
Posts
556
Likes Received
159
Points
3,054
Profile Hits
1,143
  • hus_hmd

    Post
    Hi Juan,

    • Are you using the related field inside a content region or a collection item?
    • If you turn on debug mode, the debug message should indicate whether Perch is able to find the template content/document.html
    • Try avoiding hyphens in IDs. So
  • hus_hmd

    Post
    JayW I think the problem isn't with displaying the appropriate price (regular/sale/trade), but rather with what price Perch Shop uses for the cart and order. To check the current price of a product as Perch Shop sees it (and would use in cart and…
  • hus_hmd

    Replied to the thread Can't log on anymore.
    Post
    Hi Peter,

    What version of PHP and Perch are you currently using?
  • hus_hmd

    Post
    Hi Charlie,

    One option is to write a template filter to calculate the age. Another option is to calculate it with a callback function using the each option:

    (Code, 9 lines)

  • hus_hmd

    Post
    Your perch3_content_index table looks a little large so I suspect it is taking Perch longer to update the indexes and revisions when you save a region.

    My advice is to first test in a development environment to rule out a recently introduced server…
  • hus_hmd

    Replied to the thread Region permissions not saving.
    Post
    Ok it looks like the column has not been added when you updated from v2 to v3. You should be able to run the update again via Settings > Diagnostics > Update (on the right).
  • hus_hmd

    Replied to the thread Shared Region in Blocks.
    Post
    My bad. You need to also specify the template when using perch_content_create():

    (Code, 5 lines)

  • hus_hmd

    Replied to the thread Filter array within properties.
    Post
    I see. When I wrote that field type I didn't think about it being used this way, but it makes sense.

    For now you need to filter by field_id_{index} which is not ideal unless you already know how many products you linked (e.g. if you use the max
  • hus_hmd

    Replied to the thread Shared Region in Blocks.
    Post
    (Quote from Splenda)


    There are 3 content functions:

    1. perch_content_create() - creates a region if it doesn't exists
    2. perch_content() - creates a region if it doesn't exists and outputs cached HTML; Perch template is rendered when you save the region
  • hus_hmd

    Like (Post)
    We’ve updated Perch with some compatibility fixes discovered through our support forums. This is an update to Perch and Perch Runway.

    Do I need to install this?

    This update is recommended for those experiencing the below issues, and those wanting to…
  • hus_hmd

    Replied to the thread Region permissions not saving.
    Post
    If you inspect the table perch2_content_regions, can you see the column regionPublishRoles?
  • It is not possible to pass variables to the template when using perch_content(). Use perch_content_custom() instead:
    (Code, 2 lines)



    You can use the data option if you want the variable to only be available to this region:
    (Code, 10 lines)

  • hus_hmd

    Replied to the thread Filter array within properties.
    Post
    I thought you were using perch:related, but it sounds like you are using the productlist field type. Is this correct?
  • hus_hmd

    Replied to the thread Filter array within properties.
    Post
    Hi Tony,

    To filter by a related item's field you use accessories.field_id. And to filter against multiple values, you can use 'match' => 'in':

    Hard-coded:
    (Code, 5 lines)


    Dynamically:
    (Code, 11 lines)

  • hus_hmd

    Replied to the thread Watch out for <perch:showall>.
    Post
    For future reference, Perch template comments don't get output to the browser:

    (Code, 1 line)

  • hus_hmd

    Like (Post)
    :D This is an issue I resolved myself, but I'm posting it here to save somebody else the couple hours I spent today trying to figure it out.

    It's been several years since we handed off to our clients a complex Runway site. Client recently asked us to…
  • hus_hmd

    Post
    Hi Damian,

    Does this only happen in production? Or are you seeing the problem in your development environment too?

    Can you post the first part of your extended diagnostics report? I'm particularly interested in the DB tables section.
  • hus_hmd

    Replied to the thread Shared Region in Blocks.
    Post
    Hi,

    There is more than one way to achieve this, but you can continue using the same approach. Because you are passing the content from outside the Content - Main region, you need to use perch_content_custom():

    (Code, 1 line)



    By the way, you can…
  • hus_hmd

    Replied to the thread Any Version 4 News?.
    Post
    Thanks rachelandrew for taking the time to explain things. We've missed you around here.


    I think at the very least the community would like to see you:
    • Keep Perch compatible with the latest version of PHP, which you and Drew seem very willing to do
  • hus_hmd

    Like (Post)
    Finally got the user-filtering working for a new section of our site:

    https://www.adaptalift.com.au/used-equipment/search

    Some tidying up to do, but running well so far. Importing/adding/updating/unpublishing the collection items via script on a…