Posts by hus_hmd

    Invalid query: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'countryID' at row 1


    Did you remove the country field from the sign up form? You should be able to find it in the default template:


    HTML
    1. <perch:label for="country">Country</perch:label>
    2. <perch:input type="select" options="<perch:shop id="country_list" />" value="236" id="country" label="Country" />

    At the moment I have no idea whether the problem is the customer address data not being saved or whether Perch Shop is not returning the saved addresses.


    I would check the database to see whether all the address fields were saved in the table perch3_shop_addresses. Turning on debug mode and checking the debug messages after submitting the form that handles the customer addresses may be useful too.

    Hello,


    It would be great if PerchAPI_ContentImporter can handle locating and updating existing items like PerchAPI_CollectionImporter does.


    I have a custom app that uses PerchAPI_ContentImporter that I use for multiple websites. Each website needs content imported from a different third-party source. So I'd normally write a client-specific app to integrate with the main app to import content. Being able to also locate and update items would be extremely useful.


    Third-party Perch apps can also make use of these features to offer more integration options for other developers.

    Hello,


    At the moment there seems to be 2 events the Members app fires: one when a member logs in and another when a member logs out.


    It would be great if there's also an event when a new member signs up.


    As far as I'm aware I cannot set up a moderator email notification when a new member signs up unless I enable the "New members require approval" option, which is not the behaviour I want. If the Members app fires an event for new members, I'd be able to listen to the event to send the email from outside of the Members app.

    Hi Stuart


    You are correct: Perch Runway is a different product.


    Perch Blog is also a different product. The app is what determines what it should be called in the menu, which is a fair behaviour.



    Also the Blog app is specifically designed for date-ordered content as specified in the documentation:


    Use of the Blog App for non-date ordered content

    We sometimes see people trying to use the Blog App for things that are not a blog or news listing. This is not usually what you want to do. All of the filtering, sorting and category functionality is available in regular Perch Content. Try using that before attempting to turn Blog into something it isn’t!


    So perhaps you're misusing the Blog app by using it to manage Projects? Regular Perch gives you the flexibility to create fully-customisable multiple-item regions and you have complete control over what the region called. As for the menu link in this case, the Perch API also allows you to create apps: you can create an app to just list a link to a multiple-item region in the main sidebar menu if you can't upgrade to Runway.



    The way I see it:

    • Perch: designed and often used for smaller sites, doe not have a Menu Manager (reasonable)
    • Perch Runway: designed and often used for larger sites, has a Menu Manager (reasonable)
    • Perch Blog: a free add-on. It does not have a feature to let you customise its name in the menu (reasonable)





    If it is too late into the project to start using a multiple-item region instead of the Blog app and you cannot upgrade to Runway, you can write some JS to change the link title as Perch allows you to add your own CSS and JS to the control panel. This way at least you won't breach your license agreement (and hence lose support) by modifying core files.

    I would love this too. Not just for the Collection Import API, but for the PerchAPI_ContentImporter in general. I have a custom app with its own import API and it would useful to be able to import into a repeater field.


    In your case, you may want to consider using relationships here. You can import authors into a separate Collection, grab their item IDs and add them into the research paper item.


    PHP
    1. $Importer->add_item([
    2. 'title' => 'Paper title',
    3. 'authors' => [12, 3],
    4. ]);


    This would also allow you to filter the research papers by authors with perch_collection().

    Hello jonmires

    The only problem is that when the content is imported into the collection, it is immediately published to the site, before the editor has had a chance to fill in / edit fields. Is there a way to set the item to be a draft, and then allow the editor to publish it when they are finished?


    You can add your own status field to the template:


    HTML
    1. <perch:content id="status" type="select" options="Active|active,Inactive|inactive" label="Status">


    When you initially import the items, you can set the status to something like inactive or pending.


    And only display the items with an active status on your pages:


    PHP
    1. perch_collection('Articles', [
    2. 'filter' => 'status',
    3. 'match' => 'eq',
    4. 'value' => 'active'
    5. ]);

    I can confirm that the number of levels of template includes <prech:template> inside a template is not consistent across all contexts.


    I remember testing this for regular (single-item?) content regions and the number of levels for template includes you can use for an edit form template is not the same for display templates for the same region when output with perch_content_custom(). I haven't tested this with a multiple-item region though.


    With Collections I've been able to use more levels for the edit form templates in comparison to a (single-item) region.


    So there may be some inconsistencies across Perch Content functions. Having said that, I don't believe there's anything wrong with the documentation of the function perch_template(). It can be used to render the data of a one-dimensional array as documented. It just happens to allow a limited number of template include levels.

    ryan, does this mean any EU online store must implement a 3D Secure enabled payment flow now?


    Quote


    Transactions that don’t follow the new authentication guidelines may be declined by your customers’ banks.


    ...


    Although not legally within scope of the regulation, we expect a small minority of European banks to require SCA for all payments with their cards regardless of where the business is based. If you’re based outside of Europe but a large portion of your sales are to European customers, we recommend preparing for SCA to minimize the risk of any payment being declined.


    It sounds like this could affect anyone that target EU customers.