Posts by hus_hmd

    For things that do not currently have API classes, you can use the normal runtime functions (and the skip-template option) to fetch the data.


    Sets take arrays from any source. The docs includes a hardcoded array example to demonstrate this:

    PHP
    1. $Set->add_items([
    2. [
    3. 'id' => 1,
    4. 'title' => 'Hello',
    5. ],
    6. [
    7. 'id' => 2,
    8. 'title' => 'World',
    9. ],
    10. ]);



    Knowing this, you'd fetch categories like so:

    PHP
    1. $Set->add_items(perch_categories([
    2. 'skip-template' => true,
    3. ]));



    The API endpoints are not pages. So for page functions you need to tell Perch what page to use:


    PHP
    1. PerchSystem::set_page('/contact');
    2. $navigation_pages = perch_pages_navigation(['skip-template' => true]);
    3. $page_attrs = perch_page_attributes(['skip-template' => true]);
    4. $Nav_Set->add_items($navigation_pages);
    5. $PageAttrs_Set->add_items($page_attrs);

    Ok it sounds you're getting closer to the issue. I'm not sure what would cause this. If you can share the full debug message and your diagnostics report (Settings > Diagnostics), perhaps drewm can help you further with this.

    If you are on standard Perch, you will also need to add the following at the bottom of the page:


    PHP
    1. PerchUtil::output_debug();



    You may also need to hold the redirects to see the debug message like so:


    You need to call perch_shop_checkout() before outputting any HTML or whitespace to the page. In fact, you don't need to output anything. You either redirect to PayPal or perhaps back to the cart or payment confirmation page. This is, more or less, all you need on the page:



    The above only relies on the user being a logged in member before redirecting them to PayPal. You can perform further checks like checking whether the cart has items and/or requiring a form (single button) to be submitted from the previous page.

    This is how related items data is fetched. If you need the related item's data, you'll need to fetch that separately.


    perch_collection() behaves the same way. However, inside a template the perch:related tags fetches the related items (and renders the content) for you. When you add fields inside a perch:related these are only used for output. It makes no difference to how Perch saves the data.


    So you'd use something like this:


    Hi,


    I don't think Perch ships with the language packs. You need to download it. This is the German translation.


    Place the file in /perch/addons/plugins/editors/redactor/langs/.


    In /perch/addons/plugins/editors/config.js, specify the language and load the translation file:


    Hi Tony,


    A possible option could be to skip the templating when you fetch the items, reverse the array and then render the template with perch_template():


    I'm not aware of any CMS solution that charges a fee so if a project ends, why wouldn't a license owner want to re-purpose or re-sell their license?


    There is nothing stopping you from reassigning older licenses to new projects. I'm not sure whether the license agreement even prohibits you from doing so.


    As for reselling a license, the license terms do not allow that. You purchase a license to use the product. You are granted permission to use the product. The third-party to which you would resell the license would not have permission to use the product, which is fair.



    The proposed license model sounds like it would continue to allow customers to reassign licenses to different projects. That's what many customers do anyway. Perch didn't suggest they'd stop this. However, this time they're not going to give free updates forever. You get 1 year's worth of updates. If you need more (perhaps it's an ongoing project or you're reusing a license after an old project dies and now need the latest version), you pay for another year's worth of updates. It's a fair model to both parties.

    How do you actually reuse a license anyway?


    I was under the impression that when you specify a domain in your account, that unless the license matched your domain wouldn't work.

    You can reassign the license to a different domain. This normally happens when one an old project dies or stops using Perch, so the owner of the license reassigns the license to a new domain for a new project instead of purchasing a new license. It is perhaps worth noting that v2 licenses get a free upgrade to v3, which means people have been reusing old v2 licenses for new projects on v3.


    This reminds me of Chris Ferdinandi's post: Running a trust-based business. Now that Perch has communicated how the reuse of old licenses hurts them I wonder whether people will continue reusing old licenses for new projects.