Custom Query Looping For North Commerce

I have many requests for Bricks users to access North Commerce product data to create custom collection views.

Ideally we could have the same user experience as Woocommerce when the plugin is active you are able to select North Commerce from the query dropdown menu and then when you select any child element, e.g heading block, button block etc, you could select dynamic data from a list of North Commerce data.

I would love to learn as much as I can about adding North Commerce data to the Query area with args for rendering a specific amount of products and then registering a category of data for each key from the objects in the array.


The goal is to give people the freedom to create collection views like this:

I just started reviewing documentation and looking at resources on Bricks Labs.

This is an example of how we access North product data for our collection shortcode:

 $agent = North_Commerce_Db_Agent::instance();
 $ea = $agent->entityAccess();
  $filter = [ '' =>  $atts['category'] ];
 $desktop_columns = isset($atts['desktop_columns']) ? $atts['desktop_columns'] : '3';
 $mobile_columns = isset($atts['mobile_columns']) ? $atts['mobile_columns'] : '2';
 $products = $ea->list('products', $atts['category'] ? $filter : true, ['expand' => 'product_tags,product_images,product_options']);
 $product_count =  $ea->count('products', $atts['category'] ? $filter : true, ['expand' => 'product_tags,product_images,product_options']);

Thanks in advance for the help.

1 Like

@thomas - North Commerce integration would be so cool.