Posts by tonyastley

    When displaying a list of orders to the customer, I'm encountering a couple of issues:


    1. Deleted orders are still shown to the customer when using:


    perch_shop_orders([
    'sort' => 'orderID',
    'sort-order' => 'DESC',
    ]);


    If a deleted order is clicked it returns a fatal error (I've deleted some of the file path info).


    Fatal error: Uncaught Error: Call to a member function to_array() on boolean in /addons/apps/perch_shop/lib/PerchShop_Order.class.php:538 Stack trace: #0 /addons/apps/perch_shop/lib/PerchShop_Order.class.php(393): PerchShop_Order->format_invoice_for_template(Array) #1 /addons/apps/perch_shop/lib/PerchShop_Order.class.php(402): PerchShop_Order->get_for_template() #2 /addons/apps/perch_shop/lib/PerchShop_Runtime.class.php(765): PerchShop_Order->template(Array) #3 /addons/apps/perch_shop/runtime/orders.php(62): PerchShop_Runtime->get_order_items(Array) #4 /templates/pages/shop/account/orders.php(8): perch_shop_order('1', Array, true) #5 /User in /addons/apps/perch_shop/lib/PerchShop_Order.class.php on line 538


    2. If an order contains a product that has since been deleted the same happens (note orders containing deleted products still appear OK in the orders within the admin area).


    Can anyone help?

    I'm trying to create a unique slug for news articles.


    I've seen reference in other forum posts about being able to combine multiple ids, however I cannot get it to work.


    Code
    1. <perch:content id="_id" suppress="true" />
    2. <perch:content id="title" type="Text" label="Title" title suppress />
    3. <perch:content id="slug" type="slug" for="title _id" suppress="true" />

    This only ever generates the slug using the title, it does not append the _ID on the first save, only the second save once the id field has been populated.


    Is there an easier way to get a unique slug as some of the articles will most likely share a title.

    I have a tricky one...


    I would like to show the products from a certain category. However I would like the functionality to live inside a perch:block.


    The user creates the block, the block asks for the category, then shows the products in that category on the front end.


    Is this possible?

    Thanks Byron, I'l have a look later.


    I was trying to ask if I used the page_list field type could I limit the pages shown to a pages within a specific collection, the same way you can limit them to children of a specific parent page.

    Sorry for the late reply. Some of our products are multi-dimensional with various options, they are doors:


    10 Colours
    4 Handle Styles

    6 Glass Styles

    2 Knock options


    Just adding one or two products with these options is driving the rows in the shop_index into the 10's of thousands, even using the base product template.


    This is causing time-out issues when we are trying to republish products through a third party app.

    There are lines in the debug that show where the time is being spent:


    738.1921 14.9622 SELECT * FROM perch3_shop_products WHERE sku='FDCD-PCD-CW-TG23-KB' AND productDeleted IS NULL LIMIT 1 - 14 seconds?

    773.335 35.0981 SELECT * FROM perch3_shop_products WHERE sku='FDCD-PCD-CW-TG154-LV' AND productDeleted IS NULL LIMIT 1 - 35 seconds?

    919.8407 51.2922 SELECT * FROM perch3_shop_products WHERE sku='FDCD-PCD-A-TG23-KA' AND productDeleted IS NULL LIMIT 1 - 51 seconds?


    Any help here would be very very welcome.

    I have a set of products with options:


    10 Colours

    2 Style Options

    4 Handle Options


    When generating the variants it takes approximately 16 (sixteen) minutes on a local development server. During this time the server is inaccessible.


    Obviously we cannot run with this. Has anyone experienced this and has anyone a suggestion as to what we might be able to do to remedy this?

    I have the following mark up as part of a product page template:



    I'm currently unable to delete any of the images. The delete UI icon shows overlaid on the image, but the image is still there when the admin page reloads.