Posts by tonyastley

    Hello, apologies for the late response.

    Template is as follows, couple of questions:

    I added a showall to a test and couldn't see the Invoice number.

    Also, is it possible to pass information into this template from another page within the site? It would be useful to have the company contact details available from the contact page.

    Thanks MxKert,

    The original template (still in the addons) showed:

    <p><b>Order:</b> <perch:shop id="orderInvoiceNumber" type="hidden" /></p>

    But nothing was being shown. I dropped a showall on the template and could see anything whatsoever to do with invoice number?

    It seems to correlate with order ID, so Im not sure why it's separate, but hopefully the client will be able to manage.

    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:

    '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.

    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.