Products by category with Visual Composer

ThemeBurn SupportForumsWordPress ThemesShoppica WordPress ThemeProducts by category with Visual Composer

This topic has been marked as resolved.

I’m trying to replicate a category view on the main home page.

If we look at

http://www.fleuriste-a-montreal.ca/cat-fleuriste-montreal/saint-valentin/

We can see that its sorted by product title.

If we look at

http://www.fleuriste-a-montreal.ca/

Its not sorted the same way, it is sorted by product ID from last to first.

This is the short code I see in Classic Editor

[category_products category="Saint-Valentin" title="Saint-Valentin" pnumber="12" product_size="size_1" price_design="label" price_size="3" width="1/1" el_position="first last"]

Is there some options I can use in the short code to sort by title instead by product ID ?

I see el_position first last which would make sense why this is sorted from last to first.

Please help me as this makes the shopping experience for user inconsistent.

Thank you very much.

February 1, 2014 at 2:43 am #30230

Ok I’ve found by myself.

in shoppica\library\js_composer\composer\lib\shortcodes\bycategory-woo.php

$query_args = array(‘posts_per_page’ => $pnumber, ‘no_found_rows’ => 1, ‘post_status’ => ‘publish’, ‘post_type’ => ‘product’, ‘product_cat’ => $category, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’ );

Notice that I’ve added :

‘order’ => ‘ASC’ and ‘orderby’ => ‘title’ at the end of the query as parameters.

This has solved my issue.

You should consider making this default, as default sort IS ascendent and by title.

Thanks

February 1, 2014 at 3:26 am #30231

Hello,

We will make this default.

Best,
ThemeBurn team

February 3, 2014 at 1:53 pm #30246
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.