Online

Mxkert Student

  • Male
  • 25
  • from Naaldwijk
  • Member since Feb 28th 2019
  • Last Activity:
  • Unread Posts
Posts
128
Likes Received
9
Points
809
Profile Hits
337
  • Mxkert

    Post
    You can use the filter option to show every post except the post with the current post slug, like this:

    (Code, 6 lines)

  • Mxkert

    Post
    Could you enable debug and post your debug script from that page here?
  • Mxkert

    Like (Post)
    It looks like either $_SERVER['SERVER_NAME'] is not set or it is not set to the value you expect. The extended diagnostics report should include the SERVER_NAME too.


    (Quote from granttransition)

    Yes, it was a little late. I had a cup of coffee in the…
  • Mxkert

    Thread
    Hello,

    Is there a function or another way to check if discount code is set?

    Mike
  • Mxkert

    Posted the thread Sorting PHP objects.
    Thread
    Hello,

    Is there a way to implement a sorting-system in a Perch App.

    I am using the following code to put all the events in an object:
    (Code, 5 lines)


    Now I would like to sort $events by, for example the eventTitle field before outputting the events.
  • Mxkert

    Replied to the thread Updating price with Perch API.
    Post
    I got it! First I had to obviously put all the dynamicFields into an array, then edit the price field and then putting it back into the array:

    (Code, 34 lines)

    (I also indexed the product)

    My only problem now is that the price in the dynamicFields is…
  • Mxkert

    Thread
    Hello,


    As mentioned by Clive in this forum post, "textareas are wiped when the member profile is edited by an admin". Does anyone know a solution to prevent this from happening?
    I created a textarea field in the profile.html template. When updating
  • Mxkert

    Thread
    Hello,

    I would like to update the price of products using the update function. Prices are stored in the productDynamicFields, using the following JSON structure:
    (Code, 1 line)


    I tried the follow code, but this wipes the rest of the
  • Mxkert

    Replied to the thread Ckeditor.
    Post
    Creating the template:
    1. Create a HTML-file in the folder /perch/templates/content/. For example text_region.html;
    2. Put a textarea in that file, for example: <perch:content id="text" type="textarea" label="Text" editor="ckeditor" html>;

      Using the template
  • Mxkert

    Replied to the thread Change Blog Folder Name.
    Post
    Check your Perch settings for the Blog post page path. What is the path here?
  • Mxkert

    Like (Post)
    When V4 was announced we were given a rough timeframe, which was missed due to issues which have been discussed elsewhere on the forum. Can we expect some news soon about a revised timeframe for it?

    At the moment we don't know if it'll be weeks months…
  • Mxkert

    Liked JordinB’s post in the thread Electricians site.
    Like (Post)
    Just published a new site for a local Electrician:

    https://electricitesmp.com/
  • Mxkert

    Like (Post)
    Ah, that's what I've missed.

    Luckily I'm in a position where the parent page hasn't too much content, so I can delete it and start again.

    Thanks Mxkert
  • Mxkert

    Post
    When creating the parent page you have to check the box saying This page will have more pages below it. I found that if I checked the box after I already created the parent page without checking the box, it is still creating the pages in root.
  • Mxkert

    Post
    What exactly is your problem?
  • Mxkert

    Replied to the thread Variable as a collectionKey?.
    Post
    Glad you figured it out :)
  • Mxkert

    Like (Post)
    Hi Mxkert,

    I've figured it out. The array I created had spaces at the start!

    Only noticed when I used print_r and looked in the HTML in dev tools.
  • Mxkert

    Replied to the thread Variable as a collectionKey?.
    Post
    Can you try:
    (Code, 3 lines)

  • Mxkert

    Like (Post)
    While this is perhaps not a huge number, you'd be calling perch_shop_product_variants() for each product (so 13 times). This is probably going to make the page slower than it should be.
  • Mxkert

    Post
    Thanks for thinking along. What would you consider a large number of products?

    It is a shop with mobile devices, so for example 13 iPhones, with some iPhones having 18 variants. That is quite a lot, right?

    EDIT: The largest page has 98 products.

    EDIT…