Cargando

Listar productos con plugin Shopp en Wordpress




Pulsa corazón para recibir avisos de nuevas Respuestas

  AUTOR PREGUNTA

Publicado 10 julio 2014 - 04:14
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.
  • ¿Tienes la misma pregunta? Yo también
  • Volver arriba

 

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 } } ?>


   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;



X