Esempio n. 1
0
     $first = 'firstcol';
 }
 $result .= '<div class="dp-col dp-col_1_of_1 ' . $first . '">';
 $result .= dp_get_sale_flash();
 $result .= '<div class="he-wrap tpl4">';
 $result .= '<div class="he-view">';
 $result .= '<div class="bg">';
 $result .= '<div class="a0" data-animate="' . $dpanimatehover . '"></div>';
 $result .= '</div>';
 //bg
 $result .= '<div class="content">';
 if (in_array('title', $enable)) {
     $result .= '<h2 class="product-name info-title a2" data-animate="' . $dpanimatehover_productname . '">' . $link_start . get_the_title() . $link_end . '</h2>';
 }
 if (in_array('excerpt', $enable)) {
     $result .= '<p class="dp-grid-excerpt excerpt a2" data-animate="' . $dpanimatehover_star . '">' . dp_excerpt_max_charlength($dp_excerpt['lenght']) . '</p>';
 }
 if (in_array('content', $enable)) {
     $result .= '<p class="dp-grid-excerpt excerpt a2" data-animate="' . $dpanimatehover_star . '">' . wp_trim_words(get_the_content(), $dp_excerpt['lenght']) . '</p>';
 }
 if (in_array('star', $enable)) {
     $result .= '<div class="dp-box-rating star a2" data-animate="' . $dpanimatehover_star . '">' . $product->get_rating_html() . '</div>';
 }
 if (in_array('quickview', $enable)) {
     $result .= '<span class="dpquickview dp_quickview_button" data-id="' . get_the_ID() . '"><img src="' . DP_DIR . '/assets/images/quickview.png"></span>';
 }
 if (in_array('price', $enable)) {
     $result .= '<div class="dp-box-price price a2" data-animate="' . $dpanimatehover_price . '">' . $product->get_price_html() . '</div>';
 }
 if (in_array('button', $enable)) {
     $result .= '<div class="dp-box-button more a2" data-animate="fadeInUp">';
Esempio n. 2
0
         }
     }
     if ($featured == 'show') {
         if ($product->is_featured()) {
             $result .= '<span class="onfeatured">Featured</span>';
         }
     }
     $result .= '</div>';
 }
 if (in_array('title', $enable)) {
     $result .= '<div class="dp-col dp-list-desctiption dp-col_3_of_5"><h2 class="product-name">' . $link_start . get_the_title() . $link_end . '</h2>';
     if (in_array('star', $enable)) {
         $result .= '<div class="dp-list-rating">' . $product->get_rating_html() . '</div>';
     }
     if (in_array('excerpt', $enable)) {
         $result .= '<p>' . dp_excerpt_max_charlength($dp_excerpt['lenght']) . '</p>';
     }
     if (in_array('content', $enable)) {
         $result .= '<p>' . wp_trim_words(get_the_content(), $dp_excerpt['lenght']) . '</p>';
     }
     if (in_array('metagroup', $enable)) {
         $result .= '<div class="product_meta">';
         do_action('woocommerce_product_meta_start');
         if ($sku == 'show') {
             if ($product->is_type(array('simple', 'variable')) && get_option('woocommerce_enable_sku') == 'yes' && $product->get_sku()) {
                 $result .= '<span itemprop="productID" class="sku_wrapper">' . __('SKU:', DP_TEXTDOMAN) . '<span class="sku dp-sku">' . $product->get_sku() . '</span></span>';
             }
         }
         if ($metacategory == 'show') {
             $size = sizeof(get_the_terms($post->ID, 'product_cat'));
             $result .= $product->get_categories(', ', '<span class="posted_in">' . _n('Category:', 'Categories:', $size, DP_TEXTDOMAN) . ' ', '.</span>');
Esempio n. 3
0
         $url = 'href="' . get_permalink() . '"';
     } elseif ($dp_title['type'] == 'custom-link') {
         $url = 'href="' . $dp_title['custom_url'] . '"';
     } else {
         $url = '';
     }
     $link_start = '<a ' . $url . ' title="' . $productName . '">';
     $link_end = '</a>';
     $result .= '<div class="dp-product-information clearfix">';
     $result .= '<h2 class="product-name">' . $link_start . $productName . $link_end . '</h2>';
     break;
 case 'star':
     $result .= '<div class="dp-grid-rating">' . $product->get_rating_html() . '</div>';
     break;
 case 'excerpt':
     $result .= '<p class="dp-grid-excerpt">' . dp_excerpt_max_charlength($dp_excerpt['lenght']) . '</p>';
     break;
 case 'content':
     $result .= '<p class="dp-grid-excerpt">' . wp_trim_words(get_the_content(), $dp_excerpt['lenght']) . '</p>';
     break;
 case 'sku':
     if ($product->is_type(array('simple', 'variable')) && $product->get_sku()) {
         $result .= $start_meta;
         $result .= '<span itemprop="productID" class="sku_wrapper">' . __('SKU: ', DP_TEXTDOMAN) . '<span class="sku dp-sku">' . $product->get_sku() . '</span></span>';
         $result .= $end_meta;
     }
     break;
 case 'category':
     $size = sizeof(get_the_terms($post->ID, 'product_cat'));
     $result .= $start_meta;
     $result .= $product->get_categories(', ', '<span class="posted_in">' . _n('Category: ', 'Categories:', $size, DP_TEXTDOMAN) . ' ', '.</span>');