Hello.
Hope you can help. I created a repeater to populate and dropdown with in the admin so the client can add/edit product categories for their shop.
It's all working as expected in Chrome but noticed when testing i'm echoing out
$m->selectfromrepeater->repeaterProdCatName
Safari is not outputting the category names like Chrome is. My brain is fried with this so I thought I would reach out. I'm guessing I may need to loop the selectfromrepeater and push the name? just odd that chromes is out putting them fine
This is how i'm creating JSON feed:
foreach ($activeProducts as $m) {
$data[] = array(
"id" => $m->id,
"product_title" => $m->product_title,
"product_description" => $m->product_description,
"product_price" => $m->product_price,
"product_orig_price" => $m->product_orig_price,
"product_images" => array(
"url" => $m->product_images->first()->url,
),
"product_category_new" => $m->selectfromrepeater->repeaterProdCatName,
"product_quantity" => $m->product_quantity,
"product_active" => $m->product_active,
);
echo $m->selectfromrepeater->repeaterProdCatName; // Testing purposes
};
Then access it in the javascript like this:
function getProducts() {
showProducts(<?php echo wireEncodeJSON($data); ?>);
}
Any pointers would be greatly received :)