#194 – Show all categories in one table, add separator with category name

Posted in ‘Catproduct Content’
 Hi! I would like to set up just one table with all categories (using #CATEGORY[1,2,3,4,5,6] in order to separate groups by category) but I would like to introduce a separator between categories with cateegory name.
I tried to add a shortcode like this: catproduct #CATEGORY[1] #CATEGORY[2] #CATEGORY[3]
just to have all products with one sinlge ADD TO CART BUTTON (this is what I need)and almost did the trick, first category is ok but second category displays both (first and second) and third the first three (first, second, third...) and so on...
How could I set up all the products grouped by categories with a single total + add to cart button?

thank you for your prompt reply
k8malabares
Hi,

I see, it's bug.

Please open plugins/content/catproduct_content/catproduct_content/helpers/catproductcontentfunction.php

find

function getProductIdByCategoryID

and then move

$categories = array();

just after foreach ($category_ids_array[1] as $category_ids) {

so it would look like

foreach ($category_ids_array[1] as $category_ids) {
	$categories = array();
	$category_names = array();


Best Regards,
Maja
maja_mlinar
Great! it works!

Thank you for your support
k8malabares

This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

About the author

Who‘s behind this

Demo

Maja Mozina Mlinar

founder
Demo

Sandi Mlinar

procurator

info@sm-planet.net

Skype: maja.mozina1