'.esc_html__( "Importing demo data (post, pages, images, theme settings, ...) is the easiest way to setup your theme.", "mobimax" ).'
'.esc_html__( "It will allow you to quickly edit everything instead of creating content from scratch.", "mobimax" ).'
'.esc_html__( "Important things to know before starting demo import", "mobimax" ).'
- '.esc_html__( "No existing posts, pages, categories, images, custom post types or any other data will be deleted or modified.", "mobimax" ).'
- '.esc_html__( "Posts, pages, images, widgets, menus and other theme settings will get imported.", "mobimax" ).'
- '.esc_html__( "Please click on the Import button only once and wait, it can take a couple of minutes.", "mobimax" ).'
- '.esc_html__( "If you want to change the homepage version after import, do not import another demo, go to WordPress settings >> Reading and choose different homepage version as your front-page.", "mobimax" ).'
- '.esc_html__( "If you want to import pages/posts/custom post type/menu etc. separately use regular WordPress importer", "mobimax" ).'
- '.esc_html__( "Sometimes not all widgets are displayed after the import, this is known issue, you will need to replace these plugins or re-save one more time", "mobimax" ).'
- '.esc_html__( "Sometimes not all images are imported during import process, this is known issue, you just need before import uncheck the 'Organize my uploads into month- and year-based folders' option from WordPress dashboard >> settings >> media", "mobimax" ).'
'.esc_html__( "What to do after import", "mobimax" ).'
- '.esc_html__( "After import don't forget to import Revolution Slider separately from Revolution Slider settings page", "mobimax" ).'
- '.esc_html__( "All the images will be imported with original sizes without cropping. This way your import process will be quicker and your server will have less work to do. After the import completed go to the WordPress >> Tools and use the Regenerate thumbnails plugin to crop images to theme supported sizes.", "mobimax" ).'
- '.esc_html__( "Also change permalinks from default to whatever you want. (WordPress settings >> permalinks)", "mobimax" ).'
'.esc_html__( "Troubleshooting", "mobimax" ).'
'.esc_html__( "If you will have any issues with the import process, please update these option on your server (edit your php.ini file)", "mobimax" ).'
- upload_max_filesize (256M)
- max_input_time (300)
- memory_limit (256M)
- max_execution_time (300)
- post_max_size (512M)
'.esc_html__( "These defaults are not perfect and it depends on how large of an import you are making. So the bigger the import, the higher the numbers should be.", "mobimax" ).'
';
add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
}
}
add_action( 'woocommerce_before_shop_loop', 'mobimax_enovathemes_before_shop_loop_close', 40 );
function mobimax_enovathemes_before_shop_loop_close() {?>
is_on_sale()) {
if($product->is_type( 'variable' ) )
{
$variations = $product->get_available_variations();
$all_variation_prices = array();
foreach ($variations as $variation) {
$variation_prices = array();
$variation_prices['regular_price'] = $variation['display_regular_price'];
$variation_prices['sale_price'] = $variation['display_price'];
array_push($all_variation_prices, $variation_prices);
}
$all_regular_prices = array();
$all_sale_prices = array();
foreach ($all_variation_prices as $variation_price) {
array_push($all_regular_prices, $variation_price['regular_price']);
array_push($all_sale_prices, $variation_price['sale_price']);
}
$regular_price = array_sum($all_regular_prices)/count($all_regular_prices);
$sale_price = array_sum($all_sale_prices)/count($all_sale_prices);
} else {
$regular_price = $product->get_regular_price();
$sale_price = $product->get_sale_price();
}
if (!$product->is_type( 'grouped' )) {
$off = get_woocommerce_currency_symbol().round(($regular_price - $sale_price),2);
echo '
' .esc_html__("Save","mobimax").' '.$off . '';
}
}
}
add_filter( 'woocommerce_before_single_product_summary', 'mobimax_enovathemes_single_product_sale_flash', 15);
add_action( 'woocommerce_single_product_summary', 'mobimax_enovathemes_single_product_before_title', 2 );
function mobimax_enovathemes_single_product_before_title(){ ?>
get_manage_stock() && $product->get_stock_status() == "instock" && $product->get_total_sales()) {
$total_sales = $product->get_total_sales();
$stock_quantity = $product->get_stock_quantity();
$percent = ($total_sales/$stock_quantity)*100;
?>
is_on_sale()) {
$date_on_sale_to = '';
if ($product->is_type( 'variable' ) ) {
$args = array(
'post_type' => 'product_variation',
'post_status' => array( 'private', 'publish' ),
'numberposts' => -1,
'orderby' => 'menu_order',
'order' => 'asc',
'post_parent' => $product->get_id()
);
$variations = get_posts( $args );
if ($variations) {
$all_variation_sale_dates = array();
foreach ( $variations as $variation ) {
$sale_price_date_to = get_post_meta( $variation->ID , '_sale_price_dates_to', true );
if (!empty($sale_price_date_to)) {
array_push($all_variation_sale_dates, $sale_price_date_to);
}
}
if (!empty($all_variation_sale_dates)) {
$date_on_sale_to = max($all_variation_sale_dates);
$date_on_sale_to = date('F j, Y H:i:s',$date_on_sale_to);
}
}
} else {
$date_on_sale_to = $product->get_date_on_sale_to();
if ($date_on_sale_to) {
$date_on_sale_to = $date_on_sale_to->format('F j, Y H:i:s');
}
}
if ($date_on_sale_to && shortcode_exists('et_timer')) {
echo '
'.esc_html__("Hurry up! Offer ends in:","mobimax").'
';
echo do_shortcode('[et_timer enddate="'.$date_on_sale_to.'" days="'.esc_html__("Days","mobimax").'" hours="'.esc_html__("Hours","mobimax").'" minutes="'.esc_html__("Minutes","mobimax").'" seconds="'.esc_html__("Seconds","mobimax").'"]');
}
}
}
add_action('init', 'mobimax_enovathemes_single_product');
function mobimax_enovathemes_single_product(){
global $mobimax_enovathemes;
$product_single_social = (isset($GLOBALS['mobimax_enovathemes']['product-single-social']) && $GLOBALS['mobimax_enovathemes']['product-single-social'] == 1) ? "true" : "false";
if ($product_single_social == "true") {
add_filter( 'woocommerce_product_meta_end', 'mobimax_enovathemes_woocommerce_product_meta_end', 5, 2 );
function mobimax_enovathemes_woocommerce_product_meta_end(){ ?>
ID, 'enovathemes_addons_cars',true);
$user_id = $current_user->ID;
if (!empty($current_user_cars)) {
$current_user_cars = explode('|', $current_user_cars);
foreach ($current_user_cars as $car) {
array_push($user_cars, $car);
}
}
if (!empty($user_cars)) {
foreach ($user_cars as $car) {
$data_car = $car;
$car = explode(':', $car);
$car_obj = array();
$car_obj['make'] = $car[0];
$car_obj['model'] = $car[1];
$car_obj['year'] = $car[2];
$car_obj['trim'] = $car[3];
$car_link = $shop_link.'?make='.$car_obj['make'];
$car_link .= '&model='.$car_obj['model'];
$car_link .= '&yr='.$car_obj['year'];
$car_link .= '&trim='.urlencode($car_obj['trim']);
$make = get_term_by('id',$car_obj['make'],'product-make');
$model = get_term_by('id',$car_obj['model'],'product-model');
$trim = get_term_by('id',$car_obj['trim'],'product-trim');
$output .= '