Skip to content

Instantly share code, notes, and snippets.

@clifgriffin

clifgriffin/gist:9915168

Last active Aug 29, 2015
Embed
What would you like to do?
Loading adhoc collections of products by ID(s)
<?php
$product_ids = array(12, 14);
ShoppCollection( new ProductCollection );
ShoppCollection()->slug = 'adhoc-collection';
ShoppCollection()->load( array(
'where' => array('p.id IN (' . implode(',', $product_ids) . ')')
));
shopp('storefront.collection');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment