Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,384 @@
|
||||
<?php
|
||||
function WooComposer_Loop_style01($atts,$element){
|
||||
global $woocommerce;
|
||||
$product_style = $display_elements = $quick_view_style = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = $advanced_opts = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $product_animation = '';
|
||||
$disp_type = $category = $output = $product_style = $border_style = $border_color = $border_size = $border_radius = $lazy_images = $pagination = '';
|
||||
$sale_price = $shortcode = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"disp_type" => "",
|
||||
"category" => "",
|
||||
"shortcode" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"quick_view_style" => "expandable",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"pagination" => "",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"product_animation" => "",
|
||||
"lazy_images" => "",
|
||||
"advanced_opts" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $on_sale = $class = $style = $border = $desc_style = $sale_price_size = $text_align_style = '';
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
$columns = 3;
|
||||
$display_type = $disp_type;
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
$elemets = explode(",",$display_elements);
|
||||
if($element == "grid"){
|
||||
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
||||
} else {
|
||||
$paged = 1;
|
||||
}
|
||||
$post_count = '12';
|
||||
/* $output .= do_shortcode($content); */
|
||||
if($shortcode !== ''){
|
||||
$new_shortcode = rawurldecode( base64_decode( strip_tags( $shortcode ) ) );
|
||||
}
|
||||
$pattern = get_shortcode_regex();
|
||||
$shortcode_str = $short_atts = '';
|
||||
preg_match_all("/".$pattern."/",$new_shortcode,$matches);
|
||||
$shortcode_str = str_replace('"','',str_replace(" ","&",trim($matches[3][0])));
|
||||
parse_str($shortcode_str, $short_atts);//explode("&",$shortcode_str);
|
||||
if(isset($matches[2][0])): $display_type = $matches[2][0]; else: $display_type = ''; endif;
|
||||
if(!isset($columns)): $columns = '4'; endif;
|
||||
if(isset($per_page)): $post_count = $per_page; endif;
|
||||
if(isset($number)): $post_count = $number; endif;
|
||||
if(!isset($order)): $order = 'asc'; endif;
|
||||
if(!isset($orderby)): $orderby = 'date'; endif;
|
||||
if(!isset($category)): $category = ''; endif;
|
||||
if(!isset($ids)): $ids = ''; endif;
|
||||
if($ids){
|
||||
$ids = explode( ',', $ids );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
}
|
||||
$col = $columns;
|
||||
if($columns == "2") $columns = 6;
|
||||
elseif($columns == "3") $columns = 4;
|
||||
elseif($columns == "4") $columns = 3;
|
||||
$meta_query = '';
|
||||
if($display_type == "recent_products"){
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
if($display_type == "featured_products"){
|
||||
$meta_query = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array('catalog', 'visible'),
|
||||
'compare' => 'IN'
|
||||
),
|
||||
array(
|
||||
'key' => '_featured',
|
||||
'value' => 'yes'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "top_rated_products"){
|
||||
add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
$args = array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'ignore_sticky_posts' => 1,
|
||||
'posts_per_page' => $post_count,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'paged' => $paged,
|
||||
'meta_query' => $meta_query
|
||||
);
|
||||
if($display_type == "sale_products"){
|
||||
$product_ids_on_sale = woocommerce_get_product_ids_on_sale();
|
||||
$meta_query = array();
|
||||
$meta_query[] = $woocommerce->query->visibility_meta_query();
|
||||
$meta_query[] = $woocommerce->query->stock_status_meta_query();
|
||||
$args['meta_query'] = $meta_query;
|
||||
$args['post__in'] = $product_ids_on_sale;
|
||||
}
|
||||
if($display_type == "best_selling_products"){
|
||||
$args['meta_key'] = 'total_sales';
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['meta_query'] = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array( 'catalog', 'visible' ),
|
||||
'compare' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_category"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => array( esc_attr( $category ) ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_categories"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => $ids,
|
||||
'field' => 'term_id',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
$test = '';
|
||||
if(vc_is_inline()){
|
||||
$test = "wcmp_vc_inline";
|
||||
}
|
||||
if($product_animation == ''){
|
||||
$product_animation = 'no-animation';
|
||||
} else {
|
||||
$style .= 'opacity:1;';
|
||||
}
|
||||
if($element == "grid"){
|
||||
$class = 'vc_span'.$columns.' ';
|
||||
}
|
||||
$output .= '<div class="woocomposer '.$test.'" data-columns="'.$col.'">';
|
||||
$query = new WP_Query( $args );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$product_id = get_the_ID();
|
||||
$uid = uniqid();
|
||||
$output .= '<div id="product-'.$uid.'" style="'.$style.'" class="'.$class.' wpb_column column_container wooproduct" data-animation="animated '.$product_animation.'">';
|
||||
if($element == 'carousel'){
|
||||
$output .= '<div class="wcmp-carousel-item">';
|
||||
}
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
if($quick_view_style == "expandable"){
|
||||
$quick_view_class = 'quick-view-loop';
|
||||
} else {
|
||||
$quick_view_class = 'quick-view-loop-popup';
|
||||
}
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel carousel-in-loop">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="add_to_cart_button product_type_simple"><i class="wooicon-cart4"></i></a></div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view '.$quick_view_class.'" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($text_align !== ''){
|
||||
$text_align_style = 'text-align:'.$text_align.';';
|
||||
}
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc" style="'.$text_align_style.'">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
$output .= "\n\t".'</div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper" data-columns="'.$col.'">';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce product">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
}
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="slider wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div class="wcmp-single-image wcmp-quickview-img images"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
} else {
|
||||
$output .= '<div class="wcmp-product-content">';
|
||||
}
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= "\n".'</div>';
|
||||
if($element == 'carousel'){
|
||||
$output .= "\n\t".'</div>';
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
if($pagination == "enable"){
|
||||
$output .= '<div class="wcmp-paginate">';
|
||||
$output .= woocomposer_pagination($query->max_num_pages);
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($display_type == "top_rated_products"){
|
||||
remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
}
|
||||
wp_reset_postdata();
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
<?php
|
||||
function WooComposer_Loop_style02($atts,$element){
|
||||
$product_style = $display_elements = $quick_view_style = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = $advanced_opts = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $product_animation = '';
|
||||
$disp_type = $category = $output = $product_style = $border_style = $border_color = $border_size = $border_radius = $lazy_images = $pagination = '';
|
||||
$sale_price = $shortcode = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"disp_type" => "",
|
||||
"category" => "",
|
||||
"shortcode" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"quick_view_style" => "expandable",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"pagination" => "",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"product_animation" => "",
|
||||
"lazy_images" => "",
|
||||
"advanced_opts" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $on_sale = $class = $style = $border = $desc_style = $sale_price_size = '';
|
||||
$infinite = $autoplay = $dots = 'false';
|
||||
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
|
||||
$advanced_opts = explode(",", $advanced_opts);
|
||||
if(in_array("infinite",$advanced_opts)){
|
||||
$infinite = 'true';
|
||||
}
|
||||
if(in_array("autoplay",$advanced_opts)){
|
||||
$autoplay = 'true';
|
||||
}
|
||||
if(in_array("dots",$advanced_opts)){
|
||||
$dots = 'true';
|
||||
}
|
||||
$display_type = $disp_type;
|
||||
$columns = 3;
|
||||
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
|
||||
$elemets = explode(",",$display_elements);
|
||||
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
||||
$post_count = '12';
|
||||
/* $output .= do_shortcode($content); */
|
||||
if($shortcode !== ''){
|
||||
$new_shortcode = rawurldecode( base64_decode( strip_tags( $shortcode ) ) );
|
||||
}
|
||||
$pattern = get_shortcode_regex();
|
||||
$shortcode_str = $short_atts = $text_align_style = '';
|
||||
preg_match_all("/".$pattern."/",$new_shortcode,$matches);
|
||||
$shortcode_str = str_replace('"','',str_replace(" ","&",trim($matches[3][0])));
|
||||
parse_str($shortcode_str, $short_atts);//explode("&",$shortcode_str);
|
||||
if(isset($matches[2][0])): $display_type = $matches[2][0]; else: $display_type = ''; endif;
|
||||
if(!isset($columns)): $columns = '4'; endif;
|
||||
if(isset($per_page)): $post_count = $per_page; endif;
|
||||
if(isset($number)): $post_count = $number; endif;
|
||||
if(!isset($order)): $order = 'asc'; endif;
|
||||
if(!isset($orderby)): $orderby = 'date'; endif;
|
||||
if(!isset($category)): $category = ''; endif;
|
||||
if(!isset($ids)): $ids = ''; endif;
|
||||
if($ids){
|
||||
$ids = explode( ',', $ids );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
}
|
||||
$col = $columns;
|
||||
if($columns == "2") $columns = 6;
|
||||
elseif($columns == "3") $columns = 4;
|
||||
elseif($columns == "4") $columns = 3;
|
||||
$meta_query = '';
|
||||
if($display_type == "recent_products"){
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
if($display_type == "featured_products"){
|
||||
$meta_query = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array('catalog', 'visible'),
|
||||
'compare' => 'IN'
|
||||
),
|
||||
array(
|
||||
'key' => '_featured',
|
||||
'value' => 'yes'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "top_rated_products"){
|
||||
add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
$args = array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'ignore_sticky_posts' => 1,
|
||||
'posts_per_page' => $post_count,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'paged' => $paged,
|
||||
'meta_query' => $meta_query
|
||||
);
|
||||
|
||||
if($display_type == "sale_products"){
|
||||
$product_ids_on_sale = woocommerce_get_product_ids_on_sale();
|
||||
$meta_query = array();
|
||||
$meta_query[] = $woocommerce->query->visibility_meta_query();
|
||||
$meta_query[] = $woocommerce->query->stock_status_meta_query();
|
||||
$args['meta_query'] = $meta_query;
|
||||
$args['post__in'] = $product_ids_on_sale;
|
||||
}
|
||||
|
||||
if($display_type == "best_selling_products"){
|
||||
$args['meta_key'] = 'total_sales';
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['meta_query'] = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array( 'catalog', 'visible' ),
|
||||
'compare' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if($display_type == "product_category"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => array( esc_attr( $category ) ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_categories"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => $ids,
|
||||
'field' => 'term_id',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($product_animation == ''){
|
||||
$product_animation = 'no-animation';
|
||||
}
|
||||
if($element == "grid"){
|
||||
$class = 'vc_span'.$columns.' ';
|
||||
}
|
||||
$output .= '<div class="woocomposer" data-columns="'.$col.'">';
|
||||
$query = new WP_Query( $args );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$product_id = get_the_ID();
|
||||
$uid = uniqid();
|
||||
$output .= '<div id="product-'.$uid.'" class="'.$class.' wpb_column column_container wooproduct" data-animation="animated '.$product_animation.'">';
|
||||
if($element == 'carousel'){
|
||||
$output .= '<div class="wcmp-carousel-item">';
|
||||
}
|
||||
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel carousel-in-loop">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($quick_view_style == "expandable"){
|
||||
$quick_view_class = 'quick-view-loop';
|
||||
} else {
|
||||
$quick_view_class = 'quick-view-loop-popup';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="add_to_cart_button product_type_simple"><i class="wooicon-cart4"></i></a></div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view '.$quick_view_class.'" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
if($text_align !== ''){
|
||||
$text_align_style = 'text-align:'.$text_align.';';
|
||||
}
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc" style="'.$text_align_style.'">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
$output .= "\n\t".'</div>';
|
||||
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper" data-columns="'.$col.'">';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce product">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
}
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="slider wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div class="wcmp-single-image wcmp-quickview-img images"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
} else {
|
||||
$output .= '<div class="wcmp-product-content">';
|
||||
}
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= "\n".'</div>';
|
||||
if($element == 'carousel'){
|
||||
$output .= "\n\t".'</div>';
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
if($pagination == "enable"){
|
||||
$output .= '<div class="woocomposer-paginate">';
|
||||
$output .= woocomposer_pagination($query->max_num_pages);
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($display_type == "top_rated_products"){
|
||||
remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
}
|
||||
wp_reset_postdata();
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
<?php
|
||||
function WooComposer_Loop_style03($atts,$element){
|
||||
$product_style = $display_elements = $quick_view_style = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = $advanced_opts = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $product_animation = '';
|
||||
$disp_type = $category = $output = $product_style = $border_style = $border_color = $border_size = $border_radius = $lazy_images = $pagination = '';
|
||||
$sale_price = $shortcode = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"disp_type" => "",
|
||||
"category" => "",
|
||||
"shortcode" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"quick_view_style" => "expandable",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"pagination" => "",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"product_animation" => "",
|
||||
"lazy_images" => "",
|
||||
"advanced_opts" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $on_sale = $class = $style = $border = $desc_style = $sale_price_size = $text_align_style = '';
|
||||
$infinite = $autoplay = $dots = 'false';
|
||||
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
|
||||
$advanced_opts = explode(",", $advanced_opts);
|
||||
if(in_array("infinite",$advanced_opts)){
|
||||
$infinite = 'true';
|
||||
}
|
||||
if(in_array("autoplay",$advanced_opts)){
|
||||
$autoplay = 'true';
|
||||
}
|
||||
if(in_array("dots",$advanced_opts)){
|
||||
$dots = 'true';
|
||||
}
|
||||
$display_type = $disp_type;
|
||||
$columns = 3;
|
||||
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
|
||||
$elemets = explode(",",$display_elements);
|
||||
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
||||
$post_count = '12';
|
||||
/* $output .= do_shortcode($content); */
|
||||
if($shortcode !== ''){
|
||||
$new_shortcode = rawurldecode( base64_decode( strip_tags( $shortcode ) ) );
|
||||
}
|
||||
$pattern = get_shortcode_regex();
|
||||
$shortcode_str = $short_atts = '';
|
||||
preg_match_all("/".$pattern."/",$new_shortcode,$matches);
|
||||
$shortcode_str = str_replace('"','',str_replace(" ","&",trim($matches[3][0])));
|
||||
parse_str($shortcode_str, $short_atts);//explode("&",$shortcode_str);
|
||||
if(isset($matches[2][0])): $display_type = $matches[2][0]; else: $display_type = ''; endif;
|
||||
if(!isset($columns)): $columns = '4'; endif;
|
||||
if(isset($per_page)): $post_count = $per_page; endif;
|
||||
if(isset($number)): $post_count = $number; endif;
|
||||
if(!isset($order)): $order = 'asc'; endif;
|
||||
if(!isset($orderby)): $orderby = 'date'; endif;
|
||||
if(!isset($category)): $category = ''; endif;
|
||||
if(!isset($ids)): $ids = ''; endif;
|
||||
if($ids){
|
||||
$ids = explode( ',', $ids );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
}
|
||||
$col = $columns;
|
||||
if($columns == "2") $columns = 6;
|
||||
elseif($columns == "3") $columns = 4;
|
||||
elseif($columns == "4") $columns = 3;
|
||||
$meta_query = '';
|
||||
if($display_type == "recent_products"){
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
if($display_type == "featured_products"){
|
||||
$meta_query = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array('catalog', 'visible'),
|
||||
'compare' => 'IN'
|
||||
),
|
||||
array(
|
||||
'key' => '_featured',
|
||||
'value' => 'yes'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "top_rated_products"){
|
||||
add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
$args = array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'ignore_sticky_posts' => 1,
|
||||
'posts_per_page' => $post_count,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'paged' => $paged,
|
||||
'meta_query' => $meta_query
|
||||
);
|
||||
|
||||
if($display_type == "sale_products"){
|
||||
$product_ids_on_sale = woocommerce_get_product_ids_on_sale();
|
||||
$meta_query = array();
|
||||
$meta_query[] = $woocommerce->query->visibility_meta_query();
|
||||
$meta_query[] = $woocommerce->query->stock_status_meta_query();
|
||||
$args['meta_query'] = $meta_query;
|
||||
$args['post__in'] = $product_ids_on_sale;
|
||||
}
|
||||
|
||||
if($display_type == "best_selling_products"){
|
||||
$args['meta_key'] = 'total_sales';
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['meta_query'] = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array( 'catalog', 'visible' ),
|
||||
'compare' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_category"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => array( esc_attr( $category ) ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_categories"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => $ids,
|
||||
'field' => 'term_id',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($product_animation == ''){
|
||||
$product_animation = 'no-animation';
|
||||
}
|
||||
if($element == "grid"){
|
||||
$class = 'vc_span'.$columns.' ';
|
||||
}
|
||||
$output .= '<div class="woocomposer" data-columns="'.$col.'">';
|
||||
$query = new WP_Query( $args );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$product_id = get_the_ID();
|
||||
$uid = uniqid();
|
||||
$output .= '<div id="product-'.$uid.'" class="'.$class.' wpb_column column_container wooproduct" data-animation="animated '.$product_animation.'">';
|
||||
if($element == 'carousel'){
|
||||
$output .= '<div class="wcmp-carousel-item">';
|
||||
}
|
||||
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
|
||||
$product = new WC_Product( $product_id );
|
||||
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
if($quick_view_style == "expandable"){
|
||||
$quick_view_class = 'quick-view-loop';
|
||||
} else {
|
||||
$quick_view_class = 'quick-view-loop-popup';
|
||||
}
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel carousel-in-loop">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($text_align !== ''){
|
||||
$text_align_style = 'text-align:'.$text_align.';';
|
||||
}
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc" style="'.$text_align_style.'">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
$output .= '<div class="wcmp-style3-cart-block">';/*Class Start wcmp-style3-cart-block*/
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="button add_to_cart_button product_type_simple">Add to Cart</a></div>';
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view '.$quick_view_class.'" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
$output .= '</div>';/*Class End wcmp-style3-cart-block*/
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
|
||||
$output .= "\n\t".'</div>';
|
||||
$output .= "\n\t".'</div>';
|
||||
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper" data-columns="'.$col.'">';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce product">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
}
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="slider wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div class="wcmp-single-image wcmp-quickview-img images"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
} else {
|
||||
$output .= '<div class="wcmp-product-content">';
|
||||
}
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= "\n".'</div>';
|
||||
if($element == 'carousel'){
|
||||
$output .= "\n\t".'</div>';
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
if($pagination == "enable"){
|
||||
$output .= '<div class="woocomposer-paginate">';
|
||||
$output .= woocomposer_pagination($query->max_num_pages);
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($display_type == "top_rated_products"){
|
||||
remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
}
|
||||
wp_reset_postdata();
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,365 @@
|
||||
<?php
|
||||
function WooComposer_Loop_style04($atts,$element){
|
||||
global $woocommerce;
|
||||
$product_style = $display_elements = $quick_view_style = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = $advanced_opts = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $product_animation = '';
|
||||
$disp_type = $category = $output = $product_style = $border_style = $border_color = $border_size = $border_radius = $lazy_images = $pagination = '';
|
||||
$sale_price = $shortcode = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"disp_type" => "",
|
||||
"category" => "",
|
||||
"shortcode" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"quick_view_style" => "expandable",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"pagination" => "",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"product_animation" => "",
|
||||
"lazy_images" => "",
|
||||
"advanced_opts" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $on_sale = $class = $style = $border = $desc_style = $sale_price_size = '';
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
$columns = 3;
|
||||
$display_type = $disp_type;
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
$elemets = explode(",",$display_elements);
|
||||
if($element == "grid"){
|
||||
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
||||
} else {
|
||||
$paged = 1;
|
||||
}
|
||||
$post_count = '12';
|
||||
/* $output .= do_shortcode($content); */
|
||||
if($shortcode !== ''){
|
||||
$new_shortcode = rawurldecode( base64_decode( strip_tags( $shortcode ) ) );
|
||||
}
|
||||
$pattern = get_shortcode_regex();
|
||||
$shortcode_str = $short_atts = '';
|
||||
preg_match_all("/".$pattern."/",$new_shortcode,$matches);
|
||||
$shortcode_str = str_replace('"','',str_replace(" ","&",trim($matches[3][0])));
|
||||
parse_str($shortcode_str, $short_atts);//explode("&",$shortcode_str);
|
||||
if(isset($matches[2][0])): $display_type = $matches[2][0]; else: $display_type = ''; endif;
|
||||
if(!isset($columns)): $columns = '4'; endif;
|
||||
if(isset($per_page)): $post_count = $per_page; endif;
|
||||
if(isset($number)): $post_count = $number; endif;
|
||||
if(!isset($order)): $order = 'asc'; endif;
|
||||
if(!isset($orderby)): $orderby = 'date'; endif;
|
||||
if(!isset($category)): $category = ''; endif;
|
||||
if(!isset($ids)): $ids = ''; endif;
|
||||
if($ids){
|
||||
$ids = explode( ',', $ids );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
}
|
||||
$col = $columns;
|
||||
if($columns == "2") $columns = 6;
|
||||
elseif($columns == "3") $columns = 4;
|
||||
elseif($columns == "4") $columns = 3;
|
||||
$meta_query = '';
|
||||
if($display_type == "recent_products"){
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
if($display_type == "featured_products"){
|
||||
$meta_query = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array('catalog', 'visible'),
|
||||
'compare' => 'IN'
|
||||
),
|
||||
array(
|
||||
'key' => '_featured',
|
||||
'value' => 'yes'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "top_rated_products"){
|
||||
add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
$args = array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'ignore_sticky_posts' => 1,
|
||||
'posts_per_page' => $post_count,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'paged' => $paged,
|
||||
'meta_query' => $meta_query
|
||||
);
|
||||
if($display_type == "sale_products"){
|
||||
$product_ids_on_sale = woocommerce_get_product_ids_on_sale();
|
||||
$meta_query = array();
|
||||
$meta_query[] = $woocommerce->query->visibility_meta_query();
|
||||
$meta_query[] = $woocommerce->query->stock_status_meta_query();
|
||||
$args['meta_query'] = $meta_query;
|
||||
$args['post__in'] = $product_ids_on_sale;
|
||||
}
|
||||
if($display_type == "best_selling_products"){
|
||||
$args['meta_key'] = 'total_sales';
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['meta_query'] = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array( 'catalog', 'visible' ),
|
||||
'compare' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_category"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => array( esc_attr( $category ) ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_categories"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => $ids,
|
||||
'field' => 'term_id',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
$test = '';
|
||||
if(vc_is_inline()){
|
||||
$test = "wcmp_vc_inline";
|
||||
}
|
||||
if($product_animation == ''){
|
||||
$product_animation = 'no-animation';
|
||||
} else {
|
||||
$style .= 'opacity:1;';
|
||||
}
|
||||
if($element == "grid"){
|
||||
$class = 'vc_span'.$columns.' ';
|
||||
}
|
||||
$output .= '<div class="woocomposer '.$test.'" data-columns="'.$col.'">';
|
||||
$query = new WP_Query( $args );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$product_id = get_the_ID();
|
||||
$uid = uniqid();
|
||||
$output .= '<div id="product-'.$uid.'" style="'.$style.'" class="'.$class.' wpb_column column_container wooproduct" data-animation="animated '.$product_animation.'">';
|
||||
if($element == 'carousel'){
|
||||
$output .= '<div class="wcmp-carousel-item">';
|
||||
}
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
if($quick_view_style == "expandable"){
|
||||
$quick_view_class = 'quick-view-loop';
|
||||
} else {
|
||||
$quick_view_class = 'quick-view-loop-popup';
|
||||
}
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel carousel-in-loop">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="add_to_cart_button product_type_simple"><i class="wooicon-cart4"></i></a></div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view '.$quick_view_class.'" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
$output .= "\n\t".'</div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce" data-columns="'.$col.'">';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce product">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
}
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div class="wcmp-single-image wcmp-quickview-img images"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div>';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
} else {
|
||||
$output .= '<div class="wcmp-product-content">';
|
||||
}
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
if($quick_view_style !== "expandable"){
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= "\n".'</div>';
|
||||
if($element == 'carousel'){
|
||||
$output .= "\n\t".'</div>';
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
if($pagination == "enable"){
|
||||
$output .= '<div class="wcmp-paginate">';
|
||||
$output .= woocomposer_pagination($query->max_num_pages);
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
if($display_type == "top_rated_products"){
|
||||
remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
}
|
||||
wp_reset_postdata();
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
function WooComposer_Single_style01($atts){
|
||||
$product_id = $product_style = $display_elements = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $border_style = '';
|
||||
$border_color = $border_size = $border_radius = $sale_price = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_id" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $border = $desc_style = $sale_price_size = '';
|
||||
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
|
||||
$elemets = explode(",",$display_elements);
|
||||
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
if($lazy_images == "enable"){
|
||||
$src = UAVC_URL.'assets/img/loader.gif';
|
||||
} else {
|
||||
$src = $product_img[0];
|
||||
}
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'">';
|
||||
$output .= '<a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="add_to_cart_button product_type_simple"><i class="wooicon-cart4"></i></a></div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view quick-view-single" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc" style="text-align:'.$text_align.';">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
|
||||
$output .= "\n\t".'</div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$query = new WP_Query( array( 'post_type' => 'product', 'post__in' => array( $product_id ) ) );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$output .= '<div class="wcmp-quick-view-wrapper">';
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$output .= '<div class="wcmp-single-image"><img src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
endwhile;
|
||||
endif;
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
function WooComposer_Single_style02($atts){
|
||||
$product_id = $product_style = $display_elements = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $border_style = '';
|
||||
$border_color = $border_size = $border_radius = $sale_price = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_id" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $border = $desc_style = $sale_price_size = '';
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
|
||||
$elemets = explode(",",$display_elements);
|
||||
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="add_to_cart_button product_type_simple"><i class="wooicon-cart4"></i></a></div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view quick-view-single" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc" style="text-align:'.$text_align.';">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
|
||||
$output .= "\n\t".'</div>';
|
||||
if(in_array("quick",$elemets)){
|
||||
$query = new WP_Query( array( 'post_type' => 'product', 'post__in' => array( $product_id ) ) );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$output .= '<div class="wcmp-quick-view-wrapper">';
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$output .= '<div class="wcmp-single-image"><img src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
endwhile;
|
||||
endif;
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
function WooComposer_Single_style03($atts){
|
||||
$product_id = $product_style = $display_elements = $img_animate = $text_align = $color_heading = $color_categories = $color_price = '';
|
||||
$color_rating = $color_rating_bg = $color_quick_bg = $color_quick = $color_cart_bg = $color_cart = $color_product_desc = '';
|
||||
$color_product_desc_bg = $size_title = $size_cat = $size_price = $color_on_sale = $color_on_sale_bg = $label_on_sale = $border_style = '';
|
||||
$border_color = $border_size = $border_radius = $sale_price = $on_sale_alignment = $on_sale_style = $product_img_disp = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_id" => "",
|
||||
"product_style" => "style01",
|
||||
"display_elements" => "",
|
||||
"label_on_sale" => "Sale!",
|
||||
"text_align" => "left",
|
||||
"img_animate" => "rotate-clock",
|
||||
"color_heading" => "",
|
||||
"color_categories" => "",
|
||||
"color_price" => "",
|
||||
"color_rating" => "",
|
||||
"color_rating_bg" => "",
|
||||
"color_quick_bg" => "",
|
||||
"color_quick" => "",
|
||||
"color_cart_bg" => "",
|
||||
"color_on_sale_bg" => "",
|
||||
"color_on_sale" => "",
|
||||
"color_cart" => "",
|
||||
"color_product_desc" => "",
|
||||
"color_product_desc_bg" => "",
|
||||
"size_title" => "",
|
||||
"size_cat" => "",
|
||||
"size_price" => "",
|
||||
"border_style" => "",
|
||||
"border_color" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"sale_price" => "",
|
||||
"on_sale_style" => "wcmp-sale-circle",
|
||||
"on_sale_alignment" => "wcmp-sale-right",
|
||||
"product_img_disp" => "single",
|
||||
),$atts));
|
||||
$output = $heading_style = $cat_style = $price_style = $cart_style = $cart_bg_style = $view_style = $view_bg_style = $rating_style = '';
|
||||
$desc_style = $label_style = $border = $desc_style = $sale_price_size = '';
|
||||
$image_size = apply_filters( 'single_product_large_thumbnail_size', 'shop_single' );
|
||||
if($sale_price !== ''){
|
||||
$sale_price_size = 'font-size:'.$sale_price.'px;';
|
||||
}
|
||||
$img_animate = 'wcmp-img-'.$img_animate;
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
if($color_product_desc_bg !== ''){
|
||||
$desc_style .= 'background:'.$color_product_desc_bg.';';
|
||||
}
|
||||
if($color_product_desc !== ''){
|
||||
$desc_style .= 'color:'.$color_product_desc.';';
|
||||
}
|
||||
if($color_heading !== ""){
|
||||
$heading_style = 'color:'.$color_heading.';';
|
||||
}
|
||||
if($size_title !== ""){
|
||||
$heading_style .= 'font-size:'.$size_title.'px;';
|
||||
}
|
||||
if($color_categories !== ""){
|
||||
$cat_style = 'color:'.$color_categories.';';
|
||||
}
|
||||
if($size_cat !== ""){
|
||||
$cat_style .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
if($color_price !== ""){
|
||||
$price_style = 'color:'.$color_price.';';
|
||||
}
|
||||
if($size_price !== ""){
|
||||
$price_style .= 'font-size:'.$size_price.'px;';
|
||||
}
|
||||
if($color_rating !== ""){
|
||||
$rating_style .= 'color:'.$color_rating.';';
|
||||
}
|
||||
if($color_rating_bg !== ""){
|
||||
$rating_style .= 'background:'.$color_rating_bg.';';
|
||||
}
|
||||
if($color_quick_bg !== ""){
|
||||
$view_bg_style = 'background:'.$color_quick_bg.';';
|
||||
}
|
||||
if($color_quick !== ""){
|
||||
$view_style = 'color:'.$color_quick.';';
|
||||
}
|
||||
if($color_cart_bg !== ""){
|
||||
$cart_bg_style = 'background:'.$color_cart_bg.';';
|
||||
}
|
||||
if($color_cart !== ""){
|
||||
$cart_style = 'color:'.$color_cart.';';
|
||||
}
|
||||
if($color_on_sale_bg !== ""){
|
||||
$label_style = 'background:'.$color_on_sale_bg.';';
|
||||
}
|
||||
if($color_on_sale !== ""){
|
||||
$label_style .= 'color:'.$color_on_sale.';';
|
||||
}
|
||||
|
||||
$elemets = explode(",",$display_elements);
|
||||
|
||||
$product_title = get_the_title($product_id);
|
||||
$post = get_post($product_id);
|
||||
$product_desc = get_post($product_id)->post_excerpt;
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$attributes = $product->get_attributes();
|
||||
$stock = $product->is_in_stock() ? 'InStock' : 'OutOfStock';
|
||||
if ( $product->is_on_sale() ) :
|
||||
$on_sale = apply_filters( 'woocommerce_sale_flash', $label_on_sale , $post, $product );
|
||||
else:
|
||||
$on_sale = '';
|
||||
endif;
|
||||
$cat_count = sizeof( get_the_terms( $product_id, 'product_cat' ) );
|
||||
$tag_count = sizeof( get_the_terms( $product_id, 'product_tag' ) );
|
||||
$categories = $product->get_categories(', ','<span class="posted_in">'._n('','',$cat_count,'woocommerce').' ','.</span>');
|
||||
$tags = $product->get_tags( ', ','<span class="tagged_as">'._n('', '',$tag_count, 'woocommerce').' ', '.</span>' );
|
||||
$output .= "\n".'<div class="wcmp-product woocommerce wcmp-'.$product_style.' '.$img_animate.'" style="'.$border.' '.$desc_style.'">';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-image">';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1 && $product_img_disp == "carousel"){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-single-image-carousel">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$src = $product_img[0];
|
||||
$output .= '<a href="'.get_permalink($product_id).'"><img class="wcmp-img" src="'.$src.'" data-src="'.$product_img[0].'"/></a>';
|
||||
}
|
||||
if($on_sale !== ''){
|
||||
$output .= "\n".'<div class="wcmp-onsale '.$on_sale_alignment.' '.$on_sale_style.'"><span class="onsale" style="'.$label_style.' '.$sale_price_size.'">'.$on_sale.'</span></div>';
|
||||
}
|
||||
if($stock == 'OutOfStock'){
|
||||
$output .= "\n".'<span class="wcmp-out-stock">'.__('Out Of Stock!','woocomposer').'</span>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= "\n\t".'<div class="wcmp-product-desc">';
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$output .= "\n\t\t".'<h2 style="'.$heading_style.'">'.$product_title.'</h2>';
|
||||
$output .= '</a>';
|
||||
|
||||
if(in_array("category",$elemets)){
|
||||
$output .= '<h5 style="'.$cat_style.'">';
|
||||
if($categories !== ''){
|
||||
$output .= $categories;
|
||||
$output .= $tags;
|
||||
}
|
||||
$output .= '</h5>';
|
||||
}
|
||||
|
||||
$output .= "\n\t\t".'<div class="wcmp-price"><span class="price" style="'.$price_style.'">'.$price.'</span></div>';
|
||||
$output .= '<div class="wcmp-style3-cart-block">';/*Class Start wcmp-style3-cart-block*/
|
||||
|
||||
$output .= '<div class="wcmp-add-to-cart" style="'.$cart_bg_style.'"><a style="'.$cart_style.'" title="Add to Cart" href="?add-to-cart='.$product_id.'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="" class="button add_to_cart_button product_type_simple">Add to Cart</a></div>';
|
||||
|
||||
if(in_array("reviews",$elemets)){
|
||||
$output .= "\n".'<div class="wcmp-star-ratings" style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
|
||||
if(in_array("quick",$elemets)){
|
||||
$output .= '<div class="wcmp-quick-view quick-view-single" style="'.$view_bg_style.'"><a style="'.$view_style.'" title="Quick View" href="'.get_permalink($product_id).'"><i class="wooicon-plus32"></i></a></div>';
|
||||
}
|
||||
|
||||
$output .= '</div>';/*Class End wcmp-style3-cart-block*/
|
||||
|
||||
|
||||
if(in_array("description",$elemets)){
|
||||
$output .= "\n\t\t".'<div class="wcmp-product-content" style="'.$desc_style.'">'.$product_desc.'</div>';
|
||||
}
|
||||
|
||||
if(in_array("quick",$elemets)){
|
||||
$query = new WP_Query( array( 'post_type' => 'product', 'post__in' => array( $product_id ) ) );
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$output .= '<div class="wcmp-quick-view-wrapper">';
|
||||
$output .= '<div class="wcmp-quick-view-wrapper woocommerce">';
|
||||
$output .= '<div class="wcmp-close-single"><i class="wooicon-cross2"></i></div>';
|
||||
if(!empty($attachment_ids) && count($attachment_ids) > 1){
|
||||
$uniqid = uniqid();
|
||||
$output .= '<div class="wcmp-image-carousel wcmp-carousel-'.$uniqid.'" data-class="wcmp-carousel-'.$uniqid.'">';
|
||||
foreach($attachment_ids as $attachment_id){
|
||||
$product_img = wp_get_attachment_image_src( $attachment_id,$image_size);
|
||||
$output .= '<div><div class="wcmp-image"><img src="'.$product_img[0].'"/></div></div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),$image_size);
|
||||
$output .= '<div class="wcmp-single-image"><img src="'.$product_img[0].'"/></div>';
|
||||
}
|
||||
$output .= '<div class="wcmp-product-content-single">';
|
||||
ob_start();
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="clear"></div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
endwhile;
|
||||
endif;
|
||||
}
|
||||
$output .= "\n\t".'</div>';
|
||||
$output .= "\n\t".'</div>';
|
||||
return $output;
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
[08-Nov-2025 01:44:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[08-Nov-2025 01:44:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[08-Nov-2025 01:44:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[08-Nov-2025 01:44:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[08-Nov-2025 01:44:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[08-Nov-2025 01:44:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[15-Nov-2025 02:56:15 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[15-Nov-2025 02:56:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[15-Nov-2025 02:56:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[15-Nov-2025 02:56:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[15-Nov-2025 02:56:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[15-Nov-2025 02:56:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[11-Dec-2025 17:25:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[11-Dec-2025 17:25:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[11-Dec-2025 17:25:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[11-Dec-2025 17:25:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[11-Dec-2025 17:25:32 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[11-Dec-2025 17:25:32 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[22-Feb-2026 00:44:19 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[22-Feb-2026 00:44:34 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[22-Feb-2026 00:44:40 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[22-Feb-2026 00:44:49 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[22-Feb-2026 00:44:57 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[22-Feb-2026 00:45:10 UTC] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[20-May-2026 08:04:31 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[15-Jul-2026 14:30:20 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[15-Jul-2026 14:30:21 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[15-Jul-2026 14:30:21 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[15-Jul-2026 14:30:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[15-Jul-2026 14:30:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[15-Jul-2026 14:30:23 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[16-Jul-2026 13:44:48 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[16-Jul-2026 13:44:49 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[16-Jul-2026 13:44:50 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[16-Jul-2026 13:44:51 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[16-Jul-2026 13:44:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[16-Jul-2026 13:44:53 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[21-Aug-2026 12:44:43 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[21-Aug-2026 12:44:43 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[21-Aug-2026 12:44:43 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[21-Aug-2026 12:44:43 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[21-Aug-2026 12:44:43 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[21-Aug-2026 12:44:44 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[22-Aug-2026 01:26:21 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[22-Aug-2026 01:26:21 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[22-Aug-2026 01:26:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[22-Aug-2026 01:26:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[22-Aug-2026 01:26:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[22-Aug-2026 01:26:22 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php(566): WooComposer_ViewCarousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php(626): WooComposer_Cat_Carousel->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_carousel_cat.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php(454): WooComposer_Cat_Grid->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_cat_grid.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php(498): WooComposer_GridView->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_grid.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php(369): WooComposer_ViewList->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_list.php on line 11
|
||||
[24-Aug-2026 19:02:52 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function add_action() in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php:11
|
||||
Stack trace:
|
||||
#0 /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php(410): WooComposer_ViewProduct->__construct()
|
||||
#1 {main}
|
||||
thrown in /home/nurm6544/public_html/wp-content/plugins/Ultimate_VC_Addons/woocomposer/modules/shortcode_product.php on line 11
|
||||
@@ -0,0 +1,567 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: List view
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists('WooComposer_ViewCarousel')){
|
||||
class WooComposer_ViewCarousel
|
||||
{
|
||||
function __construct(){
|
||||
add_action('admin_init',array($this,'WooComposer_Init_Carousel'));
|
||||
add_shortcode('woocomposer_carousel',array($this,'WooComposer_Carousel'));
|
||||
} // end constructor
|
||||
function WooComposer_Init_Carousel(){
|
||||
if(function_exists('vc_map')){
|
||||
$categories = get_terms( 'product_cat', array(
|
||||
'orderby' => 'count',
|
||||
'hide_empty' => 0,
|
||||
) );
|
||||
$cat_arr = array();
|
||||
if(is_array($categories)){
|
||||
foreach($categories as $cats){
|
||||
$cat_arr[$cats->name] = $cats->slug;
|
||||
}
|
||||
}
|
||||
vc_map(
|
||||
array(
|
||||
"name" => __("Products Carousel", "ultimate_vc"),
|
||||
"base" => "woocomposer_carousel",
|
||||
"icon" => "woo_carousel",
|
||||
"class" => "woo_carousel",
|
||||
"category" => __("WooComposer [ Beta ]", "ultimate_vc"),
|
||||
"description" => __("Display products in carousel slider","ultimate_vc"),
|
||||
"controls" => "full",
|
||||
"show_settings_on_create" => true,
|
||||
"deprecated" => "3.13.5",
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "woocomposer",
|
||||
"class" => "",
|
||||
"heading" => __("Query Builder", "ultimate_vc"),
|
||||
"param_name" => "shortcode",
|
||||
"value" => "",
|
||||
"module" => "grid",
|
||||
"labels" => array(
|
||||
"products_from" => __("Display:","ultimate_vc"),
|
||||
"per_page" => __("How Many:","ultimate_vc"),
|
||||
"columns" => __("Columns:","ultimate_vc"),
|
||||
"order_by" => __("Order By:","ultimate_vc"),
|
||||
"order" => __("Display Order:","ultimate_vc"),
|
||||
"category" => __("Category:","ultimate_vc"),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Display Style", "ultimate_vc"),
|
||||
"param_name" => "product_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Style 01","ultimate_vc") => "style01",
|
||||
__("Style 02","ultimate_vc") => "style02",
|
||||
__("Style 03","ultimate_vc") => "style03",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Select options to display", "ultimate_vc"),
|
||||
"param_name" => "display_elements",
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"category" => array(
|
||||
"label" => __("Category","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"reviews" => array(
|
||||
"label" => __("Reviews","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"quick" => array(
|
||||
"label" => __("Quick View","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"description" => array(
|
||||
"label" => __("Description","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Text Alignment", "ultimate_vc"),
|
||||
"param_name" => "text_align",
|
||||
"value" => array(
|
||||
__("Left","ultimate_vc")=> "left",
|
||||
__("Center","ultimate_vc")=> "center",
|
||||
__("Right","ultimate_vc") => "right",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Label", "ultimate_vc"),
|
||||
"param_name" => "label_on_sale",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Style", "ultimate_vc"),
|
||||
"param_name" => "on_sale_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Circle","ultimate_vc") => "wcmp-sale-circle",
|
||||
__("Square","ultimate_vc") => "wcmp-sale-rectangle",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Alignment", "ultimate_vc"),
|
||||
"param_name" => "on_sale_alignment",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Right","ultimate_vc") => "wcmp-sale-right",
|
||||
__("Left","ultimate_vc") => "wcmp-sale-left",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Image Setting", "ultimate_vc"),
|
||||
"param_name" => "product_img_disp",
|
||||
"value" => array(
|
||||
__("Display product featured image","ultimate_vc") => "single",
|
||||
__("Display product gallery in carousel slider","ultimate_vc") => "carousel",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Hover Animation", "ultimate_vc"),
|
||||
"param_name" => "img_animate",
|
||||
"value" => array(
|
||||
__("Rotate Clock","ultimate_vc")=> "rotate-clock",
|
||||
__("Rotate Anti-clock","ultimate_vc")=> "rotate-anticlock",
|
||||
__("Zoom-In","ultimate_vc") => "zoomin",
|
||||
__("Zoom-Out","ultimate_vc") => "zoomout",
|
||||
__("Fade","ultimate_vc") => "fade",
|
||||
__("Gray Scale","ultimate_vc") => "grayscale",
|
||||
__("Shadow","ultimate_vc") => "imgshadow",
|
||||
__("Blur","ultimate_vc") => "blur",
|
||||
__("Anti Grayscale","ultimate_vc") => "antigrayscale",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Animation","ultimate_vc"),
|
||||
"param_name" => "product_animation",
|
||||
"value" => array(
|
||||
__("No Animation","ultimate_vc") => "",
|
||||
__("Swing","ultimate_vc") => "swing",
|
||||
__("Pulse","ultimate_vc") => "pulse",
|
||||
__("Fade In","ultimate_vc") => "fadeIn",
|
||||
__("Fade In Up","ultimate_vc") => "fadeInUp",
|
||||
__("Fade In Down","ultimate_vc") => "fadeInDown",
|
||||
__("Fade In Left","ultimate_vc") => "fadeInLeft",
|
||||
__("Fade In Right","ultimate_vc") => "fadeInRight",
|
||||
__("Fade In Up Long","ultimate_vc") => "fadeInUpBig",
|
||||
__("Fade In Down Long","ultimate_vc") => "fadeInDownBig",
|
||||
__("Fade In Left Long","ultimate_vc") => "fadeInLeftBig",
|
||||
__("Fade In Right Long","ultimate_vc") => "fadeInRightBig",
|
||||
__("Slide In Down","ultimate_vc") => "slideInDown",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Bounce In","ultimate_vc") => "bounceIn",
|
||||
__("Bounce In Up","ultimate_vc") => "bounceInUp",
|
||||
__("Bounce In Down","ultimate_vc") => "bounceInDown",
|
||||
__("Bounce In Left","ultimate_vc") => "bounceInLeft",
|
||||
__("Bounce In Right","ultimate_vc") => "bounceInRight",
|
||||
__("Rotate In","ultimate_vc") => "rotateIn",
|
||||
__("Light Speed In","ultimate_vc") => "lightSpeedIn",
|
||||
__("Roll In","ultimate_vc") => "rollIn",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title Color", "ultimate_vc"),
|
||||
"param_name" => "color_heading",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Price Color", "ultimate_vc"),
|
||||
"param_name" => "color_price",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Ratings Color", "ultimate_vc"),
|
||||
"param_name" => "color_rating",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Rating Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_rating_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Icon Color", "ultimate_vc"),
|
||||
"param_name" => "color_quick",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Icon Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_quick_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Icon Color", "ultimate_vc"),
|
||||
"param_name" => "color_cart",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Icon Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_cart_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Label Color", "ultimate_vc"),
|
||||
"param_name" => "color_on_sale",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_on_sale_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Text Color", "ultimate_vc"),
|
||||
"param_name" => "color_product_desc",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_product_desc_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title", "ultimate_vc"),
|
||||
"param_name" => "size_title",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Categories", "ultimate_vc"),
|
||||
"param_name" => "size_cat",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Price", "ultimate_vc"),
|
||||
"param_name" => "size_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notifications", "ultimate_vc"),
|
||||
"param_name" => "sale_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Slide to Scroll Setting ", "ultimate_vc"),
|
||||
"param_name" => "scroll_opts",
|
||||
"value" => array(
|
||||
__("Auto","ultimate_vc") => "auto",
|
||||
__("Custom","ultimate_vc") => "custom",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Slides to Scroll", "ultimate_vc"),
|
||||
"param_name" => "slides_to_scroll",
|
||||
"value" => "1",
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "",
|
||||
"description" => __("The number of slides to move on transition", "ultimate_vc"),
|
||||
"dependency" => Array("element" => "scroll_opts", "value" => array("custom")),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Slide Scrolling Speed", "ultimate_vc"),
|
||||
"param_name" => "scroll_speed",
|
||||
"value" => "1000",
|
||||
"min" => 100,
|
||||
"max" => 10000,
|
||||
"suffix" => "ms",
|
||||
"description" => __("Slide transition duration (in ms)", "ultimate_vc"),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "checkbox",
|
||||
"class" => "",
|
||||
"heading" => __("Advanced settings -", "ultimate_vc"),
|
||||
"param_name" => "advanced_opts",
|
||||
"value" => array(
|
||||
__("Enable infinite scroll","ultimate_vc")."<br>" => "infinite",
|
||||
__("Enable navigation dots","ultimate_vc")."<br>" => "dots",
|
||||
__("Enable auto play","ultimate_vc") => "autoplay",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Autoplay Speed", "ultimate_vc"),
|
||||
"param_name" => "autoplay_speed",
|
||||
"value" => "500",
|
||||
"min" => 100,
|
||||
"max" => 10000,
|
||||
"suffix" => "ms",
|
||||
"description" => __("The amount of time (in ms) between each auto transition", "ultimate_vc"),
|
||||
"group" => "Carousel Settings",
|
||||
"dependency" => Array("element" => "advanced_opts", "value" => array("autoplay")),
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // end WooComposer_Init_Carousel
|
||||
function WooComposer_Carousel($atts){
|
||||
$product_style = $slides_to_scroll = $scroll_speed = $advanced_opts = $output = $autoplay_speed = $scroll_opts = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_style" => "style01",
|
||||
"slides_to_scroll" => "1",
|
||||
"scroll_speed" => "1000",
|
||||
"advanced_opts" => "infinite",
|
||||
"autoplay_speed" => "500",
|
||||
"scroll_opts" => "auto",
|
||||
),$atts));
|
||||
|
||||
$infinite = $autoplay = $dots = 'false';
|
||||
$advanced_opts = explode(",", $advanced_opts);
|
||||
if(in_array("infinite",$advanced_opts)){
|
||||
$infinite = 'true';
|
||||
}
|
||||
if(in_array("autoplay",$advanced_opts)){
|
||||
$autoplay = 'true';
|
||||
}
|
||||
if(in_array("dots",$advanced_opts)){
|
||||
$dots = 'true';
|
||||
}
|
||||
ob_start();
|
||||
$output .= '<div class="woocommerce">';
|
||||
if(function_exists('wc_print_notices'))
|
||||
wc_print_notices();
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$uid = uniqid();
|
||||
|
||||
$output .= '<div id="woo-carousel-'.$uid.'" class="woocomposer_carousel">';
|
||||
$template = 'design-loop-'.$product_style.'.php';
|
||||
require_once($template);
|
||||
$function = 'WooComposer_Loop_'.$product_style;
|
||||
$output .= $function($atts,'carousel');
|
||||
$output .= '</div>';
|
||||
$output .= '<script>
|
||||
jQuery(document).ready(function(){
|
||||
var columns = jQuery("#woo-carousel-'.$uid.' > .woocomposer").data("columns");
|
||||
var slides_scroll_opt = "'.$scroll_opts.'";
|
||||
var slides_to_scroll;
|
||||
if(slides_scroll_opt == "custom"){
|
||||
slides_to_scroll = '.$slides_to_scroll.';
|
||||
} else {
|
||||
slides_to_scroll = columns;
|
||||
}
|
||||
var inline_vc = jQuery(".woocomposer_carousel").find(".wcmp_vc_inline").length;
|
||||
|
||||
if(inline_vc == 0){
|
||||
jQuery("#woo-carousel-'.$uid.' > .woocomposer").slick({
|
||||
infinite: '.$infinite.',
|
||||
slidesToShow: columns,
|
||||
slidesToScroll: slides_to_scroll,
|
||||
speed: '.$scroll_speed.',
|
||||
dots: '.$dots.',
|
||||
autoplay: '.$autoplay.',
|
||||
autoplaySpeed: '.$autoplay_speed.',
|
||||
responsive: [{
|
||||
breakpoint: 1024,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3,
|
||||
infinite: true,
|
||||
dots: true
|
||||
}
|
||||
}, {
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
}, {
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
var carousel_set = "{infinite: '.$infinite.',\
|
||||
slidesToShow: columns,\
|
||||
slidesToScroll: slides_to_scroll,\
|
||||
speed: '.$scroll_speed.',\
|
||||
dots: '.$dots.',\
|
||||
autoplay: '.$autoplay.',\
|
||||
autoplaySpeed: '.$autoplay_speed.',\
|
||||
responsive: [{\
|
||||
breakpoint: 1024,\
|
||||
settings: {\
|
||||
slidesToShow: 3,\
|
||||
slidesToScroll: 3,\
|
||||
infinite: true,\
|
||||
dots: true\
|
||||
}\
|
||||
}, {\
|
||||
breakpoint: 600,\
|
||||
settings: {\
|
||||
slidesToShow: 2,\
|
||||
slidesToScroll: 2\
|
||||
}\
|
||||
}, {\
|
||||
breakpoint: 480,\
|
||||
settings: {\
|
||||
slidesToShow: 1,\
|
||||
slidesToScroll: 1\
|
||||
}\
|
||||
}]\
|
||||
});}";
|
||||
jQuery("#woo-carousel-'.$uid.'").attr("data-slick", carousel_set);
|
||||
});
|
||||
jQuery(window).load(function(){
|
||||
//jQuery("[data-save=true]").trigger("click");
|
||||
});
|
||||
</script>';
|
||||
return $output;
|
||||
|
||||
} // end WooComposer_Carousel
|
||||
}
|
||||
new WooComposer_ViewCarousel;
|
||||
}
|
||||
@@ -0,0 +1,627 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: Category Grid Layout
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists('WooComposer_Cat_Carousel')){
|
||||
class WooComposer_Cat_Carousel
|
||||
{
|
||||
function __construct(){
|
||||
add_action('admin_init',array($this,'woocomposer_init_grid'));
|
||||
add_shortcode('woocomposer_carousel_cat',array($this,'woocomposer_carousel_shortcode'));
|
||||
} /* end constructor */
|
||||
function woocomposer_init_grid(){
|
||||
if(function_exists('vc_map')){
|
||||
$orderby_arr = array(
|
||||
__("Date","ultimate_vc") => "date",
|
||||
__("Title","ultimate_vc") => "title",
|
||||
__("Product ID","ultimate_vc") => "ID",
|
||||
__("Name","ultimate_vc") => "name",
|
||||
__("Price","ultimate_vc") => "price",
|
||||
__("Sales","ultimate_vc") => "sales",
|
||||
__("Random","ultimate_vc") => "rand",
|
||||
);
|
||||
vc_map(
|
||||
array(
|
||||
"name" => __("Categories Carousel", "ultimate_vc"),
|
||||
"base" => "woocomposer_carousel_cat",
|
||||
"icon" => "woo_grid",
|
||||
"class" => "woo_grid",
|
||||
"category" => __("WooComposer [ Beta ]", "ultimate_vc"),
|
||||
"description" => __("Display categories in grid view","ultimate_vc"),
|
||||
"controls" => "full",
|
||||
"wrapper_class" => "clearfix",
|
||||
"show_settings_on_create" => true,
|
||||
"deprecated" => "3.13.5",
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Categories", "ultimate_vc"),
|
||||
"param_name" => "number",
|
||||
"value" => "",
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Columns", "ultimate_vc"),
|
||||
"param_name" => "columns",
|
||||
"value" => "",
|
||||
"min" => 1,
|
||||
"max" => 6,
|
||||
"suffix" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Orderby", "ultimate_vc"),
|
||||
"param_name" => "orderby",
|
||||
"admin_label" => true,
|
||||
"value" => $orderby_arr,
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Order", "ultimate_vc"),
|
||||
"param_name" => "order",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Asending","ultimate_vc") => "asc",
|
||||
__("Desending","ultimate_vc") => "desc",
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Options", "ultimate_vc"),
|
||||
"param_name" => "options",
|
||||
"admin_label" => true,
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"hide_empty" => array(
|
||||
"label" => __("Hide empty categories","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"parent" => array(
|
||||
"label" => __("Display Child Categories","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"sel_cat" => array(
|
||||
"label" => __("Select custom categories to display","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "product_categories",
|
||||
"class" => "",
|
||||
"heading" => __("Select Categories", "ultimate_vc"),
|
||||
"param_name" => "ids",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"dependency" => Array("element" => "options", "value" => array("sel_cat")),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __("Category count text", "ultimate_vc"),
|
||||
"param_name" => "cat_count",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Design Style", "ultimate_vc"),
|
||||
"param_name" => "design_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Style 1","ultimate_vc") => "style01",
|
||||
__("Style 2","ultimate_vc") => "style02",
|
||||
__("Style 3","ultimate_vc") => "style03",
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Image Setting", "ultimate_vc"),
|
||||
"param_name" => "product_img",
|
||||
"value" => array(
|
||||
__("Display product featured image","ultimate_vc") => "single",
|
||||
__("Display product gallery in carousel slider","ultimate_vc") => "carousel",
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Text Alignment", "ultimate_vc"),
|
||||
"param_name" => "text_align",
|
||||
"value" => array(
|
||||
__("Left","ultimate_vc")=> "left",
|
||||
__("Center","ultimate_vc")=> "center",
|
||||
__("Right","ultimate_vc") => "right",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Border Style", "ultimate_vc"),
|
||||
"param_name" => "border_style",
|
||||
"value" => array(
|
||||
__("None","ultimate_vc")=> "",
|
||||
__("Solid","ultimate_vc")=> "solid",
|
||||
__("Dashed","ultimate_vc") => "dashed",
|
||||
__("Dotted","ultimate_vc") => "dotted",
|
||||
__("Double","ultimate_vc") => "double",
|
||||
__("Inset","ultimate_vc") => "inset",
|
||||
__("Outset","ultimate_vc") => "outset",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Border Color", "ultimate_vc"),
|
||||
"param_name" => "border_color",
|
||||
"value" => "#333333",
|
||||
////"description" => __("","smile"),,
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Size", "ultimate_vc"),
|
||||
"param_name" => "border_size",
|
||||
"value" => 1,
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "px",
|
||||
////"description" => __("","smile"),,
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Radius", "ultimate_vc"),
|
||||
"param_name" => "border_radius",
|
||||
"value" => 5,
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "px",
|
||||
////"description" => __("","smile"),,
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Hover Style", "ultimate_vc"),
|
||||
"param_name" => "img_animate",
|
||||
"value" => array(
|
||||
__("Rotate Clock","ultimate_vc")=> "rotate-clock",
|
||||
__("Rotate Anti-clock","ultimate_vc")=> "rotate-anticlock",
|
||||
__("Zoom-In","ultimate_vc") => "zoomin",
|
||||
__("Zoom-Out","ultimate_vc") => "zoomout",
|
||||
__("Fade","ultimate_vc") => "fade",
|
||||
__("Gray Scale","ultimate_vc") => "grayscale",
|
||||
__("Shadow","ultimate_vc") => "imgshadow",
|
||||
__("Blur","ultimate_vc") => "blur",
|
||||
__("Anti Grayscale","ultimate_vc") => "antigrayscale",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Animation","ultimate_vc"),
|
||||
"param_name" => "product_animation",
|
||||
"value" => array(
|
||||
__("No Animation","ultimate_vc") => "",
|
||||
__("Swing","ultimate_vc") => "swing",
|
||||
__("Pulse","ultimate_vc") => "pulse",
|
||||
__("Fade In","ultimate_vc") => "fadeIn",
|
||||
__("Fade In Up","ultimate_vc") => "fadeInUp",
|
||||
__("Fade In Down","ultimate_vc") => "fadeInDown",
|
||||
__("Fade In Left","ultimate_vc") => "fadeInLeft",
|
||||
__("Fade In Right","ultimate_vc") => "fadeInRight",
|
||||
__("Fade In Up Long","ultimate_vc") => "fadeInUpBig",
|
||||
__("Fade In Down Long","ultimate_vc") => "fadeInDownBig",
|
||||
__("Fade In Left Long","ultimate_vc") => "fadeInLeftBig",
|
||||
__("Fade In Right Long","ultimate_vc") => "fadeInRightBig",
|
||||
__("Slide In Down","ultimate_vc") => "slideInDown",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Bounce In","ultimate_vc") => "bounceIn",
|
||||
__("Bounce In Up","ultimate_vc") => "bounceInUp",
|
||||
__("Bounce In Down","ultimate_vc") => "bounceInDown",
|
||||
__("Bounce In Left","ultimate_vc") => "bounceInLeft",
|
||||
__("Bounce In Right","ultimate_vc") => "bounceInRight",
|
||||
__("Rotate In","ultimate_vc") => "rotateIn",
|
||||
__("Light Speed In","ultimate_vc") => "lightSpeedIn",
|
||||
__("Roll In","ultimate_vc") => "rollIn",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories_bg",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Category Count Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_cat_count_bg",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Category Count Text Color", "ultimate_vc"),
|
||||
"param_name" => "color_cat_count_color",
|
||||
"value" => "",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title", "ultimate_vc"),
|
||||
"param_name" => "size_cat",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Slide to Scroll Setting ", "ultimate_vc"),
|
||||
"param_name" => "scroll_opts",
|
||||
"value" => array(
|
||||
__("Auto","ultimate_vc") => "auto",
|
||||
__("Custom","ultimate_vc") => "custom",
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Slides to Scroll", "ultimate_vc"),
|
||||
"param_name" => "slides_to_scroll",
|
||||
"value" => "1",
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "",
|
||||
"description" => __("The number of slides to move on transition", "ultimate_vc"),
|
||||
"dependency" => Array("element" => "scroll_opts", "value" => array("custom")),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Slide Scrolling Speed", "ultimate_vc"),
|
||||
"param_name" => "scroll_speed",
|
||||
"value" => "1000",
|
||||
"min" => 100,
|
||||
"max" => 10000,
|
||||
"suffix" => "ms",
|
||||
"description" => __("Slide transition duration (in ms)", "ultimate_vc"),
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Advanced settings -", "ultimate_vc"),
|
||||
"param_name" => "advanced_opts",
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"infinite" => array(
|
||||
"label" => __("Infinite scroll","ultimate_vc"),
|
||||
"on" => __("Enable","ultimate_vc"),
|
||||
"off" => __("Disable","ultimate_vc"),
|
||||
),
|
||||
"dots" => array(
|
||||
"label" => __("Navigation dots","ultimate_vc"),
|
||||
"on" => __("Enable","ultimate_vc"),
|
||||
"off" => __("Disable","ultimate_vc"),
|
||||
),
|
||||
"autoplay" => array(
|
||||
"label" => __("Slider auto play","ultimate_vc"),
|
||||
"on" => __("Enable","ultimate_vc"),
|
||||
"off" => __("Disable","ultimate_vc"),
|
||||
),
|
||||
),
|
||||
////"description" => __("","smile"),,
|
||||
"group" => "Carousel Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Autoplay Speed", "ultimate_vc"),
|
||||
"param_name" => "autoplay_speed",
|
||||
"value" => "500",
|
||||
"min" => 100,
|
||||
"max" => 10000,
|
||||
"suffix" => "ms",
|
||||
"description" => __("The amount of time (in ms) between each auto transition", "ultimate_vc"),
|
||||
"group" => "Carousel Settings",
|
||||
"dependency" => Array("element" => "advanced_opts", "value" => array("autoplay")),
|
||||
),
|
||||
)/* vc_map params array */
|
||||
)/* vc_map parent array */
|
||||
); /* vc_map call */
|
||||
} /* vc_map function check */
|
||||
} /* end woocomposer_init_grid */
|
||||
function woocomposer_carousel_shortcode($atts){
|
||||
global $woocommerce_loop;
|
||||
|
||||
$number = $orderby = $order = $columns = $options = $parent = $design_style = $text_align = $border_style = $border_color = '';
|
||||
$border_size = $border_radius = $product_animation = $color_categories = $size_cat = $img_animate = $color_categories_bg = $cat_count = '';
|
||||
$slides_to_scroll = $scroll_speed = $advanced_opts = $output = $autoplay_speed = $scroll_opts = $color_cat_count_color = $color_cat_count_bg = '';
|
||||
extract( shortcode_atts( array(
|
||||
'number' => null,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'columns' => '4',
|
||||
'ids' => '',
|
||||
'options' => '',
|
||||
'cat_count' => '',
|
||||
'design_style' => 'style01',
|
||||
'text_align' => '',
|
||||
'border_style' => '',
|
||||
'border_color' => '',
|
||||
'border_size' => '',
|
||||
'border_radius' => '',
|
||||
'product_animation' => '',
|
||||
'color_categories_bg' => '',
|
||||
'color_categories' => '',
|
||||
'color_cat_count_bg' => '',
|
||||
'color_cat_count_color' => '',
|
||||
'size_cat' => '',
|
||||
'slides_to_scroll' => '1',
|
||||
'scroll_speed' => '1000',
|
||||
'advanced_opts' => '',
|
||||
'autoplay_speed' => '500',
|
||||
'scroll_opts' => '',
|
||||
'img_animate' => '',
|
||||
), $atts ) );
|
||||
|
||||
$border = $size = $count_style = '';
|
||||
$opts = explode(",",$options);
|
||||
|
||||
$infinite = $autoplay = $dots = 'false';
|
||||
if($product_animation !== ''){
|
||||
$product_animation = 'animated '.$product_animation.' ';
|
||||
}
|
||||
$uid = uniqid();
|
||||
$advanced_opts = explode(",", $advanced_opts);
|
||||
if(in_array("infinite",$advanced_opts)){
|
||||
$infinite = 'true';
|
||||
}
|
||||
if(in_array("autoplay",$advanced_opts)){
|
||||
$autoplay = 'true';
|
||||
}
|
||||
if(in_array("dots",$advanced_opts)){
|
||||
$dots = 'true';
|
||||
}
|
||||
if($color_categories !== ''){
|
||||
$size .= 'color:'.$color_categories.';';
|
||||
}
|
||||
if($color_categories_bg !== ''){
|
||||
$size .= 'background:'.$color_categories_bg.';';
|
||||
}
|
||||
if($size_cat !== ''){
|
||||
$size .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
|
||||
if($color_cat_count_bg !== ''){
|
||||
$count_style .= 'background:'.$color_cat_count_bg.';';
|
||||
}
|
||||
if($color_cat_count_color !== ''){
|
||||
$count_style .= 'color:'.$color_cat_count_color.';';
|
||||
}
|
||||
|
||||
if ( isset( $atts[ 'ids' ] ) ) {
|
||||
$ids = explode( ',', $atts[ 'ids' ] );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
} else {
|
||||
$ids = array();
|
||||
}
|
||||
|
||||
$hide_empty = in_array('hide_empty',$opts) ? 1 : 0;
|
||||
$parent = in_array('parent',$opts) ? '' : 0;
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
// get terms and workaround WP bug with parents/pad counts
|
||||
$args = array(
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'hide_empty' => $hide_empty,
|
||||
'include' => $ids,
|
||||
'pad_counts' => true,
|
||||
'child_of' => $parent
|
||||
);
|
||||
|
||||
$product_categories = get_terms( 'product_cat', $args );
|
||||
|
||||
if ( $parent !== "" ) {
|
||||
$product_categories = wp_list_filter( $product_categories, array( 'parent' => $parent ) );
|
||||
}
|
||||
|
||||
if ( $hide_empty ) {
|
||||
foreach ( $product_categories as $key => $category ) {
|
||||
if ( $category->count == 0 ) {
|
||||
unset( $product_categories[ $key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $number ) {
|
||||
$product_categories = array_slice( $product_categories, 0, $number );
|
||||
}
|
||||
|
||||
$woocommerce_loop['columns'] = $columns;
|
||||
|
||||
ob_start();
|
||||
|
||||
// Reset loop/columns globals when starting a new loop
|
||||
$woocommerce_loop['loop'] = $woocommerce_loop['column'] = '';
|
||||
|
||||
if ( $product_categories ) {
|
||||
|
||||
//woocommerce_product_loop_start();
|
||||
|
||||
foreach ( $product_categories as $category ) {
|
||||
$vc_span = '';
|
||||
if($columns == "2") $vc_span = 'vc_span6 wpb_column column_container';
|
||||
elseif($columns == "3") $vc_span = 'vc_span4 wpb_column column_container';
|
||||
elseif($columns == "4") $vc_span = 'vc_span3 wpb_column column_container';
|
||||
|
||||
echo '<div id="wcmp-category-'.uniqid().'" class="wooproduct">';
|
||||
// Store loop count we're currently on
|
||||
if ( empty( $woocommerce_loop['loop'] ) )
|
||||
$woocommerce_loop['loop'] = 0;
|
||||
|
||||
// Store column count for displaying the grid
|
||||
if ( empty( $woocommerce_loop['columns'] ) )
|
||||
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
|
||||
|
||||
// Increase loop count
|
||||
$woocommerce_loop['loop']++;
|
||||
?>
|
||||
<div class="wcmp-carousel-item <?php $product_animation;?>product-category <?php
|
||||
if ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 || $woocommerce_loop['columns'] == 1 )
|
||||
echo ' first';
|
||||
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 )
|
||||
echo ' last';
|
||||
?>" style="<?php //echo $border; ?>">
|
||||
<div class="wcmp-product wcmp-img-<?php echo $img_animate; ?> woocommerce wcmp-cat-<?php echo $design_style; ?>">
|
||||
<?php do_action( 'woocommerce_before_subcategory', $category ); ?>
|
||||
<a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>" style="text-align:<?php echo $text_align; ?>;">
|
||||
<div class="wcmp-product-image">
|
||||
<?php
|
||||
do_action( 'woocommerce_before_subcategory_title', $category );
|
||||
?>
|
||||
</div><!--.wcmp-product-image-->
|
||||
|
||||
<h3 style="<?php echo $size; ?>">
|
||||
<?php
|
||||
echo $category->name;
|
||||
if ( $category->count > 0 )
|
||||
echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count" style="'.$count_style.'">' . $category->count . ' '. $cat_count. '</mark>', $category );
|
||||
?>
|
||||
</h3>
|
||||
<?php
|
||||
do_action( 'woocommerce_after_subcategory_title', $category );
|
||||
?>
|
||||
</a>
|
||||
<?php do_action( 'woocommerce_after_subcategory', $category ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo '</div>';
|
||||
}
|
||||
//woocommerce_product_loop_end();
|
||||
}
|
||||
|
||||
woocommerce_reset_loop();
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(e) {
|
||||
jQuery("#woo-carousel-<?php echo $uid; ?> > .woocomposer").slick({
|
||||
infinite: <?php echo $infinite; ?>,
|
||||
slidesToShow: <?php echo $columns; ?>,
|
||||
slidesToScroll: <?php echo $slides_to_scroll; ?>,
|
||||
speed: <?php echo $scroll_speed; ?>,
|
||||
dots: <?php echo $dots; ?>,
|
||||
autoplay: <?php echo $autoplay; ?>,
|
||||
autoplaySpeed: <?php echo $autoplay_speed; ?>,
|
||||
responsive: [{
|
||||
breakpoint: 1024,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3,
|
||||
infinite: true,
|
||||
dots: true
|
||||
}
|
||||
}, {
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
}, {
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
}]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$output = '<div id="woo-carousel-'.$uid.'" class="woocommerce woocomposer_carousel wcmp-cat-carousel">';
|
||||
$output .= '<div class="woocomposer" data-columns="'.$columns.'">';
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
}/* end woocomposer_carousel_shortcode */
|
||||
} /* end class WooComposer_Cat_Carousel */
|
||||
new WooComposer_Cat_Carousel;
|
||||
}
|
||||
@@ -0,0 +1,455 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: Category Grid Layout
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists('WooComposer_Cat_Grid')){
|
||||
class WooComposer_Cat_Grid
|
||||
{
|
||||
function __construct(){
|
||||
add_action('admin_init',array($this,'woocomposer_init_grid'));
|
||||
add_shortcode('woocomposer_grid_cat',array($this,'woocomposer_grid_shortcode'));
|
||||
} /* end constructor */
|
||||
function woocomposer_init_grid(){
|
||||
if(function_exists('vc_map')){
|
||||
$orderby_arr = array(
|
||||
"Date" => "date",
|
||||
"Title" => "title",
|
||||
"Product ID" => "ID",
|
||||
"Name" => "name",
|
||||
"Price" => "price",
|
||||
"Sales" => "sales",
|
||||
"Random" => "rand",
|
||||
);
|
||||
vc_map(
|
||||
array(
|
||||
"name" => __("Categories Grid", "ultimate_vc"),
|
||||
"base" => "woocomposer_grid_cat",
|
||||
"icon" => "woo_grid",
|
||||
"class" => "woo_grid",
|
||||
"category" => __("WooComposer [ Beta ]", "ultimate_vc"),
|
||||
"description" => __("Display categories in grid view","ultimate_vc"),
|
||||
"controls" => "full",
|
||||
"wrapper_class" => "clearfix",
|
||||
"deprecated" => "3.13.5",
|
||||
"show_settings_on_create" => true,
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Categories", "ultimate_vc"),
|
||||
"param_name" => "number",
|
||||
"value" => "",
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Number of Columns", "ultimate_vc"),
|
||||
"param_name" => "columns",
|
||||
"value" => "",
|
||||
"min" => 1,
|
||||
"max" => 4,
|
||||
"suffix" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Orderby", "ultimate_vc"),
|
||||
"param_name" => "orderby",
|
||||
"admin_label" => true,
|
||||
"value" => $orderby_arr,
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Order", "ultimate_vc"),
|
||||
"param_name" => "order",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Asending","ultimate_vc") => "asc",
|
||||
__("Desending","ultimate_vc") => "desc",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Options", "ultimate_vc"),
|
||||
"param_name" => "options",
|
||||
"admin_label" => true,
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"hide_empty" => array(
|
||||
"label" => __("Hide empty categories","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"parent" => array(
|
||||
"label" => __("Display Child Categories if availabe in the loop","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"sel_cat" => array(
|
||||
"label" => __("Select custom categories to display","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "product_categories",
|
||||
"class" => "",
|
||||
"heading" => __("Select Categories", "ultimate_vc"),
|
||||
"param_name" => "ids",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __("Category count text", "ultimate_vc"),
|
||||
"param_name" => "cat_count",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Design Style", "ultimate_vc"),
|
||||
"param_name" => "design_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Style 1","ultimate_vc") => "style01",
|
||||
__("Style 2","ultimate_vc") => "style02",
|
||||
__("Style 3","ultimate_vc") => "style03",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Text Alignment", "ultimate_vc"),
|
||||
"param_name" => "text_align",
|
||||
"value" => array(
|
||||
__("Left","ultimate_vc")=> "left",
|
||||
__("Center","ultimate_vc")=> "center",
|
||||
__("Right","ultimate_vc") => "right",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Border Style", "ultimate_vc"),
|
||||
"param_name" => "border_style",
|
||||
"value" => array(
|
||||
__("None","ultimate_vc")=> "",
|
||||
__("Solid","ultimate_vc")=> "solid",
|
||||
__("Dashed","ultimate_vc") => "dashed",
|
||||
__("Dotted","ultimate_vc") => "dotted",
|
||||
__("Double","ultimate_vc") => "double",
|
||||
__("Inset","ultimate_vc") => "inset",
|
||||
__("Outset","ultimate_vc") => "outset",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Border Color", "ultimate_vc"),
|
||||
"param_name" => "border_color",
|
||||
"value" => "#333333",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Size", "ultimate_vc"),
|
||||
"param_name" => "border_size",
|
||||
"value" => 1,
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Radius", "ultimate_vc"),
|
||||
"param_name" => "border_radius",
|
||||
"value" => 5,
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Animation","ultimate_vc"),
|
||||
"param_name" => "product_animation",
|
||||
"value" => array(
|
||||
__("No Animation","ultimate_vc") => "",
|
||||
__("Swing","ultimate_vc") => "swing",
|
||||
__("Pulse","ultimate_vc") => "pulse",
|
||||
__("Fade In","ultimate_vc") => "fadeIn",
|
||||
__("Fade In Up","ultimate_vc") => "fadeInUp",
|
||||
__("Fade In Down","ultimate_vc") => "fadeInDown",
|
||||
__("Fade In Left","ultimate_vc") => "fadeInLeft",
|
||||
__("Fade In Right","ultimate_vc") => "fadeInRight",
|
||||
__("Fade In Up Long","ultimate_vc") => "fadeInUpBig",
|
||||
__("Fade In Down Long","ultimate_vc") => "fadeInDownBig",
|
||||
__("Fade In Left Long","ultimate_vc") => "fadeInLeftBig",
|
||||
__("Fade In Right Long","ultimate_vc") => "fadeInRightBig",
|
||||
__("Slide In Down","ultimate_vc") => "slideInDown",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Slide In Left","ultimate_vc") => "slideInLeft",
|
||||
__("Bounce In","ultimate_vc") => "bounceIn",
|
||||
__("Bounce In Up","ultimate_vc") => "bounceInUp",
|
||||
__("Bounce In Down","ultimate_vc") => "bounceInDown",
|
||||
__("Bounce In Left","ultimate_vc") => "bounceInLeft",
|
||||
__("Bounce In Right","ultimate_vc") => "bounceInRight",
|
||||
__("Rotate In","ultimate_vc") => "rotateIn",
|
||||
__("Light Speed In","ultimate_vc") => "lightSpeedIn",
|
||||
__("Roll In","ultimate_vc") => "rollIn",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Title", "ultimate_vc"),
|
||||
"param_name" => "size_cat",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
)/* vc_map params array */
|
||||
)/* vc_map parent array */
|
||||
); /* vc_map call */
|
||||
} /* vc_map function check */
|
||||
} /* end woocomposer_init_grid */
|
||||
function woocomposer_grid_shortcode($atts){
|
||||
global $woocommerce_loop;
|
||||
|
||||
$number = $orderby = $order = $columns = $options = $parent = $design_style = $text_align = $border_style = $border_color = '';
|
||||
$border_size = $border_radius = $product_animation = $color_categories = $size_cat = $img_animate = $color_categories_bg = '';
|
||||
$color_cat_count_color = $color_cat_count_bg = $cat_count = '';
|
||||
extract( shortcode_atts( array(
|
||||
'number' => null,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'columns' => '4',
|
||||
'ids' => '',
|
||||
'options' => '',
|
||||
'cat_count' => '',
|
||||
'design_style' => 'style01',
|
||||
'text_align' => '',
|
||||
'border_style' => '',
|
||||
'border_color' => '',
|
||||
'border_size' => '',
|
||||
'border_radius' => '',
|
||||
'product_animation' => '',
|
||||
'color_categories_bg' => '',
|
||||
'color_categories' => '',
|
||||
'color_cat_count_bg' => '',
|
||||
'color_cat_count_color' => '',
|
||||
'size_cat' => '',
|
||||
'img_animate' => '',
|
||||
), $atts ) );
|
||||
|
||||
$border = $size = $count_style = '';
|
||||
$opts = explode(",",$options);
|
||||
|
||||
if($color_categories !== ''){
|
||||
$size .= 'color:'.$color_categories.';';
|
||||
}
|
||||
if($color_categories_bg !== ''){
|
||||
$size .= 'background:'.$color_categories_bg.';';
|
||||
}
|
||||
if($size_cat !== ''){
|
||||
$size .= 'font-size:'.$size_cat.'px;';
|
||||
}
|
||||
|
||||
if($color_cat_count_bg !== ''){
|
||||
$count_style .= 'background:'.$color_cat_count_bg.';';
|
||||
}
|
||||
if($color_cat_count_color !== ''){
|
||||
$count_style .= 'color:'.$color_cat_count_color.';';
|
||||
}
|
||||
|
||||
if ( isset( $atts[ 'ids' ] ) ) {
|
||||
$ids = explode( ',', $atts[ 'ids' ] );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
} else {
|
||||
$ids = array();
|
||||
}
|
||||
|
||||
$hide_empty = in_array('hide_empty',$opts) ? 1 : 0;
|
||||
$parent = in_array('parent',$opts) ? '' : 0;
|
||||
|
||||
if($border_style !== ''){
|
||||
$border .= 'border:'.$border_size.'px '.$border_style.' '.$border_color.';';
|
||||
$border .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
// get terms and workaround WP bug with parents/pad counts
|
||||
$args = array(
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'hide_empty' => $hide_empty,
|
||||
'include' => $ids,
|
||||
'pad_counts' => true,
|
||||
'child_of' => $parent
|
||||
);
|
||||
|
||||
$product_categories = get_terms( 'product_cat', $args );
|
||||
|
||||
if ( $parent !== "" ) {
|
||||
$product_categories = wp_list_filter( $product_categories, array( 'parent' => $parent ) );
|
||||
}
|
||||
|
||||
if ( $hide_empty ) {
|
||||
foreach ( $product_categories as $key => $category ) {
|
||||
if ( $category->count == 0 ) {
|
||||
unset( $product_categories[ $key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $number ) {
|
||||
$product_categories = array_slice( $product_categories, 0, $number );
|
||||
}
|
||||
|
||||
$woocommerce_loop['columns'] = $columns;
|
||||
|
||||
ob_start();
|
||||
|
||||
// Reset loop/columns globals when starting a new loop
|
||||
$woocommerce_loop['loop'] = $woocommerce_loop['column'] = '';
|
||||
|
||||
if ( $product_categories ) {
|
||||
|
||||
//woocommerce_product_loop_start();
|
||||
|
||||
echo '<ul class="wcmp-cat-grid products">';
|
||||
|
||||
foreach ( $product_categories as $category ) {
|
||||
|
||||
// Store loop count we're currently on
|
||||
if ( empty( $woocommerce_loop['loop'] ) )
|
||||
$woocommerce_loop['loop'] = 0;
|
||||
|
||||
// Store column count for displaying the grid
|
||||
if ( empty( $woocommerce_loop['columns'] ) )
|
||||
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
|
||||
|
||||
// Increase loop count
|
||||
$woocommerce_loop['loop']++;
|
||||
?>
|
||||
<li class="product-category product<?php
|
||||
if ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 || $woocommerce_loop['columns'] == 1 )
|
||||
echo ' first';
|
||||
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 )
|
||||
echo ' last';
|
||||
?>">
|
||||
|
||||
<div class="wcmp-product wcmp-img-<?php echo $img_animate; ?> wcmp-cat-<?php echo $design_style.' animated '.$product_animation; ?>" style="<?php echo $border; ?>">
|
||||
|
||||
<?php do_action( 'woocommerce_before_subcategory', $category ); ?>
|
||||
|
||||
<a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>" style="text-align:<?php echo $text_align; ?>;">
|
||||
|
||||
<div class="wcmp-product-image">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_subcategory_title hook
|
||||
*
|
||||
* @hooked woocommerce_subcategory_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory_title', $category );
|
||||
?>
|
||||
</div><!--.wcmp-product-image-->
|
||||
|
||||
<h3 style="<?php echo $size; ?>">
|
||||
<?php
|
||||
echo $category->name;
|
||||
|
||||
if ( $category->count > 0 )
|
||||
echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count" style="'.$count_style.'">' . $category->count . ' '. $cat_count.'</mark>', $category );
|
||||
?>
|
||||
</h3>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_subcategory_title hook
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory_title', $category );
|
||||
?>
|
||||
|
||||
</a>
|
||||
|
||||
<?php do_action( 'woocommerce_after_subcategory', $category ); ?>
|
||||
|
||||
</div><!--.wcmp-product-->
|
||||
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
}
|
||||
|
||||
woocommerce_reset_loop();
|
||||
|
||||
return '<div class="woocommerce columns-' . $columns . '">' . ob_get_clean() . '</div>';
|
||||
}/* end woocomposer_grid_shortcode */
|
||||
} /* end class WooComposer_Cat_Grid */
|
||||
new WooComposer_Cat_Grid;
|
||||
}
|
||||
@@ -0,0 +1,499 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: Grid Layout view
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists('WooComposer_GridView')){
|
||||
class WooComposer_GridView
|
||||
{
|
||||
function __construct(){
|
||||
add_action('admin_init',array($this,'woocomposer_init_grid'));
|
||||
add_shortcode('woocomposer_grid',array($this,'woocomposer_grid_shortcode'));
|
||||
} /* end constructor */
|
||||
function woocomposer_init_grid(){
|
||||
if(function_exists('vc_map')){
|
||||
vc_map(
|
||||
array(
|
||||
"name" => __("Products Grid", "woocomposer"),
|
||||
"base" => "woocomposer_grid",
|
||||
"icon" => "woo_grid",
|
||||
"class" => "woo_grid",
|
||||
"category" => __("WooComposer [ Beta ]", "woocomposer"),
|
||||
"description" => "Display products in grid view",
|
||||
"controls" => "full",
|
||||
"wrapper_class" => "clearfix",
|
||||
"show_settings_on_create" => true,
|
||||
"deprecated" => "3.13.5",
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "woocomposer",
|
||||
"class" => "",
|
||||
"heading" => __("Query Builder", "woocomposer"),
|
||||
"param_name" => "shortcode",
|
||||
"value" => "",
|
||||
"module" => "grid",
|
||||
"labels" => array(
|
||||
"products_from" => __("Display:","woocomposer"),
|
||||
"per_page" => __("How Many:","woocomposer"),
|
||||
"columns" => __("Columns:","woocomposer"),
|
||||
"order_by" => __("Order By:","woocomposer"),
|
||||
"order" => __("Display Order:","woocomposer"),
|
||||
"category" => __("Category:","woocomposer"),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Style", "woocomposer"),
|
||||
"param_name" => "product_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
"Style 1" => "style01",
|
||||
"Style 2" => "style02",
|
||||
"Style 3" => "style03",
|
||||
/* "Style 4" => "style04", */
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => "",
|
||||
"param_name" => "pagination",
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"enable" => array(
|
||||
"label" => "Enable Pagination",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => "",
|
||||
"param_name" => "lazy_images",
|
||||
"admin_label" => true,
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"enable" => array(
|
||||
"label" => "Enable Lazy Load",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Select Product Elements to display", "woocomposer"),
|
||||
"param_name" => "display_elements",
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"category" => array(
|
||||
"label" => "Category",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
"reviews" => array(
|
||||
"label" => "Reviews",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
"quick" => array(
|
||||
"label" => "Quick View",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
"description" => array(
|
||||
"label" => "Description",
|
||||
"on" => "Yes",
|
||||
"off" => "No",
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Select quick view type", "woocomposer"),
|
||||
"param_name" => "quick_view_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
"Expanding Preview " => "expandable",
|
||||
"Display in Lightbox" => "popup",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Text Alignment", "woocomposer"),
|
||||
"param_name" => "text_align",
|
||||
"value" => array(
|
||||
"Left"=> "left",
|
||||
"Center"=> "center",
|
||||
"Right" => "right",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Label", "woocomposer"),
|
||||
"param_name" => "label_on_sale",
|
||||
"value" => "",
|
||||
"description" => __("Enter custom text for Product On Sale label. Default is - Sale!.", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Style", "woocomposer"),
|
||||
"param_name" => "on_sale_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
"Circle" => "wcmp-sale-circle",
|
||||
"Square" => "wcmp-sale-rectangle",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Alignment", "woocomposer"),
|
||||
"param_name" => "on_sale_alignment",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
"Right" => "wcmp-sale-right",
|
||||
"Left" => "wcmp-sale-left",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Image Setting", "woocomposer"),
|
||||
"param_name" => "product_img_disp",
|
||||
"value" => array(
|
||||
"Display product featured image" => "single",
|
||||
"Display product gallery in carousel slider" => "carousel",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Hover Style", "woocomposer"),
|
||||
"param_name" => "img_animate",
|
||||
"value" => array(
|
||||
"Rotate Clock"=> "rotate-clock",
|
||||
"Rotate Anti-clock"=> "rotate-anticlock",
|
||||
"Zoom-In" => "zoomin",
|
||||
"Zoom-Out" => "zoomout",
|
||||
"Fade" => "fade",
|
||||
"Gray Scale" => "grayscale",
|
||||
"Shadow" => "imgshadow",
|
||||
"Blur" => "blur",
|
||||
"Anti Grayscale" => "antigrayscale",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Border Style", "woocomposer"),
|
||||
"param_name" => "border_style",
|
||||
"value" => array(
|
||||
"None"=> "",
|
||||
"Solid"=> "solid",
|
||||
"Dashed" => "dashed",
|
||||
"Dotted" => "dotted",
|
||||
"Double" => "double",
|
||||
"Inset" => "inset",
|
||||
"Outset" => "outset",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Border Color", "woocomposer"),
|
||||
"param_name" => "border_color",
|
||||
"value" => "#333333",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Size", "woocomposer"),
|
||||
"param_name" => "border_size",
|
||||
"value" => 1,
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Radius", "woocomposer"),
|
||||
"param_name" => "border_radius",
|
||||
"value" => 5,
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Animation","smile"),
|
||||
"param_name" => "product_animation",
|
||||
"value" => array(
|
||||
__("No Animation","smile") => "",
|
||||
__("Swing","smile") => "swing",
|
||||
__("Pulse","smile") => "pulse",
|
||||
__("Fade In","smile") => "fadeIn",
|
||||
__("Fade In Up","smile") => "fadeInUp",
|
||||
__("Fade In Down","smile") => "fadeInDown",
|
||||
__("Fade In Left","smile") => "fadeInLeft",
|
||||
__("Fade In Right","smile") => "fadeInRight",
|
||||
__("Fade In Up Long","smile") => "fadeInUpBig",
|
||||
__("Fade In Down Long","smile") => "fadeInDownBig",
|
||||
__("Fade In Left Long","smile") => "fadeInLeftBig",
|
||||
__("Fade In Right Long","smile") => "fadeInRightBig",
|
||||
__("Slide In Down","smile") => "slideInDown",
|
||||
__("Slide In Left","smile") => "slideInLeft",
|
||||
__("Slide In Left","smile") => "slideInLeft",
|
||||
__("Bounce In","smile") => "bounceIn",
|
||||
__("Bounce In Up","smile") => "bounceInUp",
|
||||
__("Bounce In Down","smile") => "bounceInDown",
|
||||
__("Bounce In Left","smile") => "bounceInLeft",
|
||||
__("Bounce In Right","smile") => "bounceInRight",
|
||||
__("Rotate In","smile") => "rotateIn",
|
||||
__("Light Speed In","smile") => "lightSpeedIn",
|
||||
__("Roll In","smile") => "rollIn",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title Color", "woocomposer"),
|
||||
"param_name" => "color_heading",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Color", "woocomposer"),
|
||||
"param_name" => "color_categories",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Price Color", "woocomposer"),
|
||||
"param_name" => "color_price",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Ratings Color", "woocomposer"),
|
||||
"param_name" => "color_rating",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Ratings Background Color", "woocomposer"),
|
||||
"param_name" => "color_rating_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Icon Color", "woocomposer"),
|
||||
"param_name" => "color_quick",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Icon Background Color", "woocomposer"),
|
||||
"param_name" => "color_quick_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Icon Color", "woocomposer"),
|
||||
"param_name" => "color_cart",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Icon Background Color", "woocomposer"),
|
||||
"param_name" => "color_cart_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Label Color", "woocomposer"),
|
||||
"param_name" => "color_on_sale",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Background Color", "woocomposer"),
|
||||
"param_name" => "color_on_sale_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Text Color", "woocomposer"),
|
||||
"param_name" => "color_product_desc",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Background Color", "woocomposer"),
|
||||
"param_name" => "color_product_desc_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title", "woocomposer"),
|
||||
"param_name" => "size_title",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Categories", "woocomposer"),
|
||||
"param_name" => "size_cat",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Price", "woocomposer"),
|
||||
"param_name" => "size_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification", "woocomposer"),
|
||||
"param_name" => "sale_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Size Settings",
|
||||
),
|
||||
)/* vc_map params array */
|
||||
)/* vc_map parent array */
|
||||
); /* vc_map call */
|
||||
} /* vc_map function check */
|
||||
} /* end woocomposer_init_grid */
|
||||
function woocomposer_grid_shortcode($atts){
|
||||
$product_style = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_style" => "style01",
|
||||
),$atts));
|
||||
$output = '';
|
||||
ob_start();
|
||||
$output .= '<div class="woocommerce">';
|
||||
if(function_exists('wc_print_notices'))
|
||||
wc_print_notices();
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
$uid = uniqid();
|
||||
$output = '<div id="woo-grid-'.$uid.'" class="woocomposer_grid">';
|
||||
|
||||
$template = 'design-loop-'.$product_style.'.php';
|
||||
require_once($template);
|
||||
$function = 'WooComposer_Loop_'.$product_style;
|
||||
$output .= $function($atts,'grid');
|
||||
$output .= "\n".'</div>';
|
||||
return $output;
|
||||
}/* end woocomposer_grid_shortcode */
|
||||
} /* end class GridView */
|
||||
new WooComposer_GridView;
|
||||
}
|
||||
@@ -0,0 +1,375 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: List view
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists("WooComposer_ViewList")){
|
||||
class WooComposer_ViewList
|
||||
{
|
||||
function __construct(){
|
||||
add_shortcode('woocomposer_list',array($this,'woocomposer_list_shortcode'));
|
||||
add_action('admin_init',array($this,'woocomposer_init_grid'));
|
||||
} /* end constructor */
|
||||
function woocomposer_init_grid(){
|
||||
if(function_exists('vc_map')){
|
||||
vc_map(
|
||||
array(
|
||||
"name" => __("Product List", "ultimate_vc"),
|
||||
"base" => "woocomposer_list",
|
||||
"icon" => "woo_list",
|
||||
"class" => "woo_list",
|
||||
"category" => __("WooComposer [ Beta ]", "ultimate_vc"),
|
||||
"description" => __("Display products in list view","ultimate_vc"),
|
||||
"controls" => "full",
|
||||
"show_settings_on_create" => true,
|
||||
"deprecated" => "3.13.5",
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "woocomposer",
|
||||
"class" => "",
|
||||
"heading" => __("Query Builder", "ultimate_vc"),
|
||||
"param_name" => "shortcode",
|
||||
"value" => "",
|
||||
"module" => "list",
|
||||
"labels" => array(
|
||||
"products_from" => __("Display:","ultimate_vc"),
|
||||
"per_page" => __("How Many:","ultimate_vc"),
|
||||
"columns" => __("Columns:","ultimate_vc"),
|
||||
"order_by" => __("Order By:","ultimate_vc"),
|
||||
"order" => __("Display Order:","ultimate_vc"),
|
||||
"category" => __("Category:","ultimate_vc"),
|
||||
),
|
||||
//"description" => __("", "woocommerce")
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Display", "ultimate_vc"),
|
||||
"param_name" => "img_position",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Left","ultimate_vc") => "left",
|
||||
__("Right","ultimate_vc") => "right",
|
||||
),
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Image Width", "ultimate_vc"),
|
||||
"param_name" => "img_size",
|
||||
"value" => "",
|
||||
"min" => 30,
|
||||
"max" => 300,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce")
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Border", "ultimate_vc"),
|
||||
"param_name" => "img_border",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("None","ultimate_vc") => "",
|
||||
__("Solid","ultimate_vc") => "solid",
|
||||
__("Dashed","ultimate_vc") => "dashed",
|
||||
__("Dotted","ultimate_vc") => "dotted",
|
||||
__("Inset","ultimate_vc") => "inset",
|
||||
__("Outset","ultimate_vc") => "outset",
|
||||
),
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Size", "ultimate_vc"),
|
||||
"param_name" => "border_size",
|
||||
"value" => "",
|
||||
"min" => 0,
|
||||
"max" => 10,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce"),
|
||||
"dependency" => Array("element" => "img_border", "not_empty" => true),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Radius", "ultimate_vc"),
|
||||
"param_name" => "border_radius",
|
||||
"value" => "",
|
||||
"min" => 0,
|
||||
"max" => 500,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce"),
|
||||
"dependency" => Array("element" => "img_border", "not_empty" => true),
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Border Color", "ultimate_vc"),
|
||||
"param_name" => "border_color",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocommerce"),
|
||||
"dependency" => Array("element" => "img_border", "not_empty" => true),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title Font Size", "ultimate_vc"),
|
||||
"param_name" => "title_font",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title Color", "ultimate_vc"),
|
||||
"param_name" => "title_color",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Product Price Font Size", "ultimate_vc"),
|
||||
"param_name" => "price_font",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Price Color", "ultimate_vc"),
|
||||
"param_name" => "price_color",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Star Rating Font Size", "ultimate_vc"),
|
||||
"param_name" => "rating_font",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Ratings Color", "ultimate_vc"),
|
||||
"param_name" => "rating_color",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocommerce"),
|
||||
),
|
||||
)/* vc_map params array */
|
||||
)/* vc_map parent array */
|
||||
); /* vc_map call */
|
||||
} /* vc_map function check */
|
||||
} /* end woocomposer_init_grid */
|
||||
function woocomposer_list_shortcode($atts){
|
||||
global $woocommerce;
|
||||
$img_position = $img_size = $img_border = $border_size = $border_radius = $border_color = $title_font = $price_font = $price_color = $rating_color = $rating_font = $shortcode = '';
|
||||
extract(shortcode_atts(array(
|
||||
"img_position" => "left",
|
||||
"shortcode" => "",
|
||||
"img_size" => "",
|
||||
"img_border" => "",
|
||||
"border_size" => "",
|
||||
"border_radius" => "",
|
||||
"border_color" => "",
|
||||
"title_color" => "",
|
||||
"title_font" => "",
|
||||
"price_font" => "",
|
||||
"price_color" => "",
|
||||
"rating_color" => "",
|
||||
"rating_font" => "",
|
||||
),$atts));
|
||||
$output = $on_sale = $style = $title_style = $pricing_style = $rating_style = '';
|
||||
if($img_size !== ""){
|
||||
$style .= 'width:'.$img_size.'px; height:'.$img_size.'px;';
|
||||
}
|
||||
if($title_color !== ""){
|
||||
$title_style .= 'color:'.$title_color.';';
|
||||
}
|
||||
if($title_font !== ""){
|
||||
$title_style .= 'font-size:'.$title_font.'px;';
|
||||
}
|
||||
|
||||
if($img_border !== ''){
|
||||
$style .= 'border-style:'.$img_border.';';
|
||||
if($border_size !== ''){
|
||||
$style .= 'border-width:'.$border_size.'px;';
|
||||
}
|
||||
if($border_color !== ''){
|
||||
$style .= 'border-color:'.$border_color.';';
|
||||
}
|
||||
if($border_radius !== ''){
|
||||
$style .= 'border-radius:'.$border_radius.'px;';
|
||||
}
|
||||
}
|
||||
if($price_font !== ""){
|
||||
$pricing_style .= 'font-size:'.$price_font.'px;';
|
||||
}
|
||||
if($price_color !== ""){
|
||||
$pricing_style .= 'color:'.$price_color.';';
|
||||
}
|
||||
if($rating_color !== ""){
|
||||
$rating_style .= 'color:'.$rating_color.';';
|
||||
}
|
||||
if($rating_font !== ""){
|
||||
$rating_style .= 'font-size:'.$rating_font.'px;';
|
||||
}
|
||||
$post_count = '12';
|
||||
$output .= '<div class="woocomposer_list woocommerce">';
|
||||
/* $output .= do_shortcode($content); */
|
||||
$pattern = get_shortcode_regex();
|
||||
if($shortcode !== ''){
|
||||
$new_shortcode = rawurldecode( base64_decode( strip_tags( $shortcode ) ) );
|
||||
}
|
||||
preg_match_all("/".$pattern."/",$new_shortcode,$matches);
|
||||
$shortcode_str = str_replace('"','',str_replace(" ","&",trim($matches[3][0])));
|
||||
parse_str($shortcode_str, $short_atts);//explode("&",$shortcode_str);
|
||||
if(isset($matches[2][0])): $display_type = $matches[2][0]; else: $display_type = ''; endif;
|
||||
if(!isset($columns)): $columns = '4'; endif;
|
||||
if(isset($per_page)): $post_count = $per_page; endif;
|
||||
if(isset($number)): $post_count = $number; endif;
|
||||
if(!isset($order)): $order = 'ASC'; endif;
|
||||
if(!isset($orderby)): $orderby = 'date'; endif;
|
||||
if(!isset($category)): $category = ''; endif;
|
||||
if(!isset($ids)): $ids = ''; endif;
|
||||
if($ids){
|
||||
$ids = explode( ',', $ids );
|
||||
$ids = array_map( 'trim', $ids );
|
||||
}
|
||||
|
||||
if($columns == "2") $columns = 6;
|
||||
elseif($columns == "3") $columns = 4;
|
||||
elseif($columns == "4") $columns = 3;
|
||||
$meta_query = '';
|
||||
if($display_type == "recent_products"){
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
if($display_type == "featured_products"){
|
||||
$meta_query = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array('catalog', 'visible'),
|
||||
'compare' => 'IN'
|
||||
),
|
||||
array(
|
||||
'key' => '_featured',
|
||||
'value' => 'yes'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "top_rated_products"){
|
||||
add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
$meta_query = WC()->query->get_meta_query();
|
||||
}
|
||||
$args = array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'ignore_sticky_posts' => 1,
|
||||
'posts_per_page' => $post_count,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'meta_query' => $meta_query
|
||||
);
|
||||
|
||||
if($display_type == "sale_products"){
|
||||
$product_ids_on_sale = woocommerce_get_product_ids_on_sale();
|
||||
$meta_query = array();
|
||||
$meta_query[] = $woocommerce->query->visibility_meta_query();
|
||||
$meta_query[] = $woocommerce->query->stock_status_meta_query();
|
||||
$args['meta_query'] = $meta_query;
|
||||
$args['post__in'] = $product_ids_on_sale;
|
||||
}
|
||||
|
||||
if($display_type == "best_selling_products"){
|
||||
|
||||
$args['meta_key'] = 'total_sales';
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['meta_query'] = array(
|
||||
array(
|
||||
'key' => '_visibility',
|
||||
'value' => array( 'catalog', 'visible' ),
|
||||
'compare' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
if($display_type == "product_category"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => array( esc_attr( $category ) ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if($display_type == "product_categories"){
|
||||
$args['tax_query'] = array(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'terms' => $ids,
|
||||
'field' => 'term_id',
|
||||
'operator' => 'IN'
|
||||
)
|
||||
);
|
||||
}
|
||||
$query = new WP_Query( $args );
|
||||
$output .= '<ul class="wcmp-product-list wcmp-img-'.$img_position.' '.$order.'">';
|
||||
if($query->have_posts()):
|
||||
while ( $query->have_posts() ) : $query->the_post();
|
||||
$product_id = get_the_ID();
|
||||
$post = get_post($product_id);
|
||||
$product_title = get_the_title();
|
||||
|
||||
$product = new WC_Product( $product_id );
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
$price = $product->get_price_html();
|
||||
$rating = $product->get_rating_html();
|
||||
$product_var = new WC_Product_Variable( $product_id );
|
||||
$available_variations = $product_var->get_available_variations();
|
||||
|
||||
$output .= '<li>';
|
||||
|
||||
$output .= '<a href="'.get_permalink($product_id).'">';
|
||||
$product_img = wp_get_attachment_image_src( get_post_thumbnail_id($product_id),'full');
|
||||
$output .= '<img style="'.$style.'" src="'.$product_img[0].'"/>';
|
||||
$output .= '<span style="'.$title_style.'">'.$product_title.'</span>';
|
||||
$output .= '</a>';
|
||||
if($display_type == "top_rated_products"){
|
||||
$output .= '<div style="'.$rating_style.'">'.$rating.'</div>';
|
||||
}
|
||||
$output .= '<span class="amount" style="'.$pricing_style.'">'.$price.'</span>';
|
||||
$output .= '</li>';
|
||||
endwhile;
|
||||
endif;
|
||||
$output .= "\n".'</ul>';
|
||||
$output .= "\n".'</div>';
|
||||
if($display_type == "top_rated_products"){
|
||||
remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
|
||||
}
|
||||
wp_reset_postdata();
|
||||
return $output;
|
||||
}/* end woocomposer_list_shortcode */
|
||||
}
|
||||
new WooComposer_ViewList;
|
||||
}
|
||||
if(class_exists('WPBakeryShortCode'))
|
||||
{
|
||||
class WPBakeryShortCode_woocomposer_list extends WPBakeryShortCode {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,411 @@
|
||||
<?php
|
||||
/*
|
||||
@Module: Single Product view
|
||||
@Since: 1.0
|
||||
@Package: WooComposer
|
||||
*/
|
||||
if(!class_exists('WooComposer_ViewProduct')){
|
||||
class WooComposer_ViewProduct
|
||||
{
|
||||
function __construct(){
|
||||
add_action('admin_init',array($this,'WooComposer_Init_Product'));
|
||||
add_shortcode('woocomposer_product',array($this,'WooComposer_Product'));
|
||||
}
|
||||
function WooComposer_Init_Product(){
|
||||
if(function_exists('vc_map')){
|
||||
$params =
|
||||
array(
|
||||
"name" => __("Single Product", "ultimate_vc"),
|
||||
"base" => "woocomposer_product",
|
||||
"icon" => "woo_product",
|
||||
"class" => "woo_product",
|
||||
"category" => __("WooComposer [ Beta ]", "ultimate_vc"),
|
||||
"description" => __("Display single product from list","ultimate_vc"),
|
||||
"controls" => "full",
|
||||
"show_settings_on_create" => true,
|
||||
"deprecated" => "3.13.5",
|
||||
"params" => array(
|
||||
array(
|
||||
"type" => "product_search",
|
||||
"class" => "",
|
||||
"heading" => __("Select Product", "ultimate_vc"),
|
||||
"param_name" => "product_id",
|
||||
"admin_label" => true,
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Select Product Style", "ultimate_vc"),
|
||||
"param_name" => "product_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Style 01","ultimate_vc") => "style01",
|
||||
__("Style 02","ultimate_vc") => "style02",
|
||||
__("Style 03","ultimate_vc") => "style03",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "ult_switch",
|
||||
"class" => "",
|
||||
"heading" => __("Select Options to Display", "ultimate_vc"),
|
||||
"param_name" => "options",
|
||||
"admin_label" => true,
|
||||
"value" => "",
|
||||
"options" => array(
|
||||
"category" => array(
|
||||
"label" => __("Category","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"reviews" => array(
|
||||
"label" => __("Reviews","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"quick" => array(
|
||||
"label" => __("Quick View","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
"description" => array(
|
||||
"label" => __("Description","ultimate_vc"),
|
||||
"on" => __("Yes","ultimate_vc"),
|
||||
"off" => __("No","ultimate_vc"),
|
||||
),
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Text Alignment", "ultimate_vc"),
|
||||
"param_name" => "text_align",
|
||||
"value" => array(
|
||||
__("Left","ultimate_vc")=> "left",
|
||||
__("Center","ultimate_vc")=> "center",
|
||||
__("Right","ultimate_vc") => "right",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Label", "ultimate_vc"),
|
||||
"param_name" => "label_on_sale",
|
||||
"value" => "",
|
||||
"description" => __("Enter custom text for Product On Sale label. Default is - Sale!.", "ultimate_vc"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Style", "ultimate_vc"),
|
||||
"param_name" => "on_sale_style",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Circle","ultimate_vc") => "wcmp-sale-circle",
|
||||
__("Rectangle","ultimate_vc") => "wcmp-sale-rectangle",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Alignment", "ultimate_vc"),
|
||||
"param_name" => "on_sale_alignment",
|
||||
"admin_label" => true,
|
||||
"value" => array(
|
||||
__("Right","ultimate_vc") => "wcmp-sale-right",
|
||||
__("Left","ultimate_vc") => "wcmp-sale-left",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Image Setting", "ultimate_vc"),
|
||||
"param_name" => "product_img_disp",
|
||||
"value" => array(
|
||||
__("Display product featured image","ultimate_vc") => "single",
|
||||
__("Display product gallery in carousel slider","ultimate_vc") => "carousel",
|
||||
),
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Image Hover Animation", "ultimate_vc"),
|
||||
"param_name" => "img_animate",
|
||||
"value" => array(
|
||||
__("Rotate Clock","ultimate_vc")=> "rotate-clock",
|
||||
__("Rotate Anti-clock","ultimate_vc")=> "rotate-anticlock",
|
||||
__("Zoom-In","ultimate_vc") => "zoomin",
|
||||
__("Zoom-Out","ultimate_vc") => "zoomout",
|
||||
__("Fade","ultimate_vc") => "fade",
|
||||
__("Gray Scale","ultimate_vc") => "grayscale",
|
||||
__("Shadow","ultimate_vc") => "imgshadow",
|
||||
__("Blur","ultimate_vc") => "blur",
|
||||
__("Anti Grayscale","ultimate_vc") => "antigrayscale",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => __("Product Border Style", "ultimate_vc"),
|
||||
"param_name" => "border_style",
|
||||
"value" => array(
|
||||
__("None","ultimate_vc")=> "",
|
||||
__("Solid","ultimate_vc")=> "solid",
|
||||
__("Dashed","ultimate_vc") => "dashed",
|
||||
__("Dotted","ultimate_vc") => "dotted",
|
||||
__("Double","ultimate_vc") => "double",
|
||||
__("Inset","ultimate_vc") => "inset",
|
||||
__("Outset","ultimate_vc") => "outset",
|
||||
),
|
||||
//"description" => __("","smile"),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Border Color", "ultimate_vc"),
|
||||
"param_name" => "border_color",
|
||||
"value" => "#333333",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Width", "ultimate_vc"),
|
||||
"param_name" => "border_size",
|
||||
"value" => 1,
|
||||
"min" => 1,
|
||||
"max" => 10,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Border Radius", "ultimate_vc"),
|
||||
"param_name" => "border_radius",
|
||||
"value" => 5,
|
||||
"min" => 1,
|
||||
"max" => 500,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"dependency" => Array("element" => "border_style", "not_empty" => true),
|
||||
"group" => "Initial Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title Color", "ultimate_vc"),
|
||||
"param_name" => "color_heading",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Categories Color", "ultimate_vc"),
|
||||
"param_name" => "color_categories",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Price Color", "ultimate_vc"),
|
||||
"param_name" => "color_price",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Ratings Color", "ultimate_vc"),
|
||||
"param_name" => "color_rating",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Star Rating Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_rating_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Icon Color", "ultimate_vc"),
|
||||
"param_name" => "color_quick",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Quick View Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_quick_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Icon Color", "ultimate_vc"),
|
||||
"param_name" => "color_cart",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Cart Button Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_cart_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Text Color", "ultimate_vc"),
|
||||
"param_name" => "color_on_sale",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_on_sale_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Text Color", "ultimate_vc"),
|
||||
"param_name" => "color_product_desc",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "colorpicker",
|
||||
"class" => "",
|
||||
"heading" => __("Product Description Background Color", "ultimate_vc"),
|
||||
"param_name" => "color_product_desc_bg",
|
||||
"value" => "",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Style Settings",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Product Title", "ultimate_vc"),
|
||||
"param_name" => "size_title",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Font Sizes",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Categories", "ultimate_vc"),
|
||||
"param_name" => "size_cat",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Font Sizes",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Price", "ultimate_vc"),
|
||||
"param_name" => "size_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Font Sizes",
|
||||
),
|
||||
array(
|
||||
"type" => "number",
|
||||
"class" => "",
|
||||
"heading" => __("Sale Notification", "ultimate_vc"),
|
||||
"param_name" => "sale_price",
|
||||
"value" => "",
|
||||
"min" => 10,
|
||||
"max" => 72,
|
||||
"suffix" => "px",
|
||||
//"description" => __("", "woocomposer"),
|
||||
"group" => "Font Sizes",
|
||||
),
|
||||
)
|
||||
);
|
||||
vc_map($params);
|
||||
}
|
||||
}
|
||||
function WooComposer_Product($atts){
|
||||
$product_style = '';
|
||||
extract(shortcode_atts(array(
|
||||
"product_style" => "style01",
|
||||
),$atts));
|
||||
|
||||
$output = '';
|
||||
|
||||
ob_start();
|
||||
$output .= '<div class="woocommerce woo-msg">';
|
||||
if(function_exists('wc_print_notices'))
|
||||
wc_print_notices();
|
||||
$output .= ob_get_clean();
|
||||
$output .= '</div>';
|
||||
|
||||
$template = 'design-single-'.$product_style.'.php';
|
||||
require_once($template);
|
||||
$function = 'WooComposer_Single_'.$product_style;
|
||||
$output .= $function($atts);
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
}
|
||||
new WooComposer_ViewProduct;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
function woocomposer_pagination($pages = '', $range = 2)
|
||||
{
|
||||
ob_start();
|
||||
$showitems = ($range * 2)+1;
|
||||
global $paged;
|
||||
if(empty($paged)) $paged = 1;
|
||||
if($pages == '')
|
||||
{
|
||||
global $wp_query;
|
||||
$pages = $wp_query->max_num_pages;
|
||||
if(!$pages)
|
||||
{
|
||||
$pages = 1;
|
||||
}
|
||||
}
|
||||
if(1 != $pages)
|
||||
{
|
||||
echo "<div class='wcmp-pagination'>";
|
||||
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>«</a>";
|
||||
if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹</a>";
|
||||
for ($i=1; $i <= $pages; $i++)
|
||||
{
|
||||
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
|
||||
{
|
||||
echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
|
||||
}
|
||||
}
|
||||
if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>›</a>";
|
||||
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>»</a>";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
Reference in new issue
Block a user