Posts by Mxkert


    Exactly 10 weeks ago. Any news on trying out features for some of us?

    Looks like some debug code in your top (header) layout. Try removing some perch functions in your top layout and check which one is returning the boolean (true or false).


    EDIT: Is this issue already resolved? I can't see the 'true true...' on your website.

    What does your ex_vat.html look like?

    And what do you see on the page when you use the following:


    Wait, your each function is not formatted correctly I think.



    Again doing this from the top of my head, sorry.

    Did not try it, but can you try using:


    Code
    1. $item['incVAT'] = perch_shop_product($item['slug'], [
    2.     'template' => 'products/ex_vat.html',
    3.     $VAT = '1.20',
    4.     $incVAT = number_format($exVAT * $VAT, 2),
    5. ], true);

    So you would use the perch_shop_product function to get a single product (using the slug) in the each-loop, instead of getting ALL the products.

    My guess is that the fields you are importing are not matching the fields in your product.html template.


    So change this piece of code to suite your product template:


    Code
    1. $product = $ProductImporter->add_item([
    2. 'status' => true,
    3. 'stock_status' => '0',
    4. 'on_sale' => false,
    5. 'tax_group' => 1,
    6. 'sku' => $data[0],
    7. 'title' => $data[2],
    8. 'slug' => $data[1],
    9. 'price' => ['gbp' => $data[3]],
    10. ]);


    You can find more options here

    What do you see if you run the following code:


    Here is some sample code for you to try (and edit to suit your needs)



    Do you also need to import images?