Posts by Byron Fitzgerald

    The find_all_tags_and_repeaters function is a method of PerchTemplate Class, so it looks like the template might not be set on the Importer for some reason. It should be set to 'shop/products/product' by default, but you can try set it manually with the following

    1. $Template = $API->get('Template');
    2. $Template->set('path/to/template', 'shop');
    3. $ProductImporter->set_template($Template);
    4. // Run importer

    After the item is imported you need to call the index function on the product.

    1.     // Import product
    2. $result = $ProductImporter->add_item($productData);
    3. $Products = new PerchShop_Products();
    4. if ($result) {
    5. $newProduct = $Products->find($result['id']);
    6. $newProduct->index();
    7. }

    I've recently added the updated Stripe Omnipay to a perch app, which works similarly to perch shop. I believe the update only works for v3 (which I believe shop is using v2?), as well v3.1 only released on 5/6th September, so if you are still pulling in the v3.03 package it won't have the new gateway

    As the stripe team said the first successful payment was made using guzzle (which is what the Omnipay drive uses), and that the failed payments came form stripe, I would imaging that the payment is failing to issue the stripeToken, or the stripeToken you are sending to the perch_shop_checkout () function is bad.

    I would suggest checking your front end code is working correctly, and that that there are no console errors when calling the stripe checkout.

    It could potentially be because your post.html is missing the postDateTime field. If you don't want to show the postDateTime, you can add the suppress attribute to it so it won't be displayed

    1. <perch:blog id="postDateTime" type="date" label="Date" time="true" suppress />

    You might be able to use notcontains as notin is not supported, it does use NOT REGEXP in the query, so you might need to check the format of the value. Have you checked the SQL query thats being generated, you should be able to find this if you have PERCH_DEBUG turned on.

    Whilst I still agree that being able to have a settings area separated from the app it self is a good idea, it sounds like most of what you want to do is already possible using the current permission and app registration methods;

    1. $hidden = !$CurrentUser->has_priv('perch_app_example')
    2. $this->register_app($app_id, $label, $priority=10, $desc, $version, $hidden)

    Or alternatively if you are using runway you can add permissions with the menu manager.

    I like the idea of having tabs in the settings menu, as it would make thing simpler when you have multiple apps installed. However in the mean time you should be able to set permission on subnav items so you can hide the custom settings page from certain user groups.

    It will be the template you are using for the content region, for example the following template for the region below would be found in perch/templates/content/general/article.php (Assuming your perch base directory is called perch)

    1. perch_content_create('Article',[
    2.     'template' => 'general/article.html'
    3. ])

    I'm assuming you're talking about formatting text in a textarea field? If that is the case you'll need to set the editor attribute on the field, to enable a JavaScript editor for formatting.

    1. <perch:content id="content" type="textarea" html="true" editor="redactor" label="Content" />

    See the documentation for further information.

    Its most likely that the filter you're using is returning no results, or there are errors in your template file. You can use the <perch:noresults> and <perch:showall> to debug the template. You should also be able to see the SQL query if you have PERCH_DEBUG set to true, which you can then check to see if the query is correct.

    Yes, the template is not part of the filter options and needs to be set in the first array, as follows.

    You'll need to use both importers. First you'll need to import the images to assets, then assign then product fields with the appropriate assets. This is a short snippet of how we approached the issue for blog posts. We had all the images stored in a local directory, so you will need to configure as appropriate.

    As you have multiple images are you looking to import the images into a repeater field? If so, as far as I'm aware, the importer doesn't support this.