Estoy usando el plugin de Shopp con wordpress y mi pregunta es si saben de alguna forma con el mismo de listar todos los productos con este. Gracias anticipadas.
Listar productos con plugin Shopp en Wordpress
Iniciado por
Pascual
, jul 10 2014 04:14
#1 AUTOR PREGUNTA
Preguntas Similares
Esto también te interesa!
#2
Publicado 10 julio 2014 - 18:27
Con esto lo puedes hacer:
<?php shopp('storefront','catalog-products','load=true&show=999'); if ( shopp('collection','has-products') ) { while ( shopp('collection','products') ) { ?> <a href="<?php shopp('product','url'); ?>"><?php shopp('product','name'); ?></a><?php } } ?>
#3 AUTOR PREGUNTA
Publicado 10 julio 2014 - 18:29
Lo resolvi de la siguiente manera, les dejo mi código por si alguien lo necesita en algun momento
$cats = shopp_product_categories(); $cat_ids = array(); $dropdown = array(); foreach ( $cats as $cat ) : $cat_ids[] = $cat->id; $dropdown[$cat->slug]['group_name'] = $cat->name; $dropdown[$cat->slug]['group_items'] = shopp_category_products( $cat->id ); endforeach; $products = new WP_Query( array( 'post_type' => 'shopp_product', 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'shopp_category', 'field' => 'id', 'terms' => $cat_ids, 'operator' => 'NOT IN' ) ) ) ); $dropdown['uncategorized']['group_name'] = 'Uncategorized'; while ( $products->have_posts() ) : $products->the_post(); $dropdown['uncategorized']['group_items'][] = array( 'id' => get_the_ID(), 'name' => get_the_title() ); endwhile;