Home / Woo-Commerce

Woo-Commerce

How to url redirect with another url in .htaccess file?

How to url redirect with another url in .htaccess file? Copy the code and past in root folder .Htaccess  file . Redirect 302 /jewellry-photography http://www.circulatetechnology.com/ Redirect 302 /http:www.google.com http://www.circulatetechnology.com/ example like: http://www.circulatetechnology.com/jewellry-photography redirect on http://www.circulatetechnology.com and http:www.google.com it will be redirect on http://www.circulatetechnology.com  

Read More »

Display Product Discount/Offer percentage in bubble WooCommerce

Display Product Discount/Offer percentage in bubble WooCommerce. So what I have here is a code snippet to calculate individual product discount and display it in sale bubble. Replace all the codes in following files your theme folder/woocommerce/loop/sale-flash.php and  your theme folder/woocommerce/single-product/sale-flash.php with below code. <?php /** * Product loop sale flash …

Read More »

WooCommerce Products Custom Fields with Discount price

WooCommerce Products Custom Fields with Discount price. /***********************my custom code******************/ // Add save percent next to sale item prices. add_filter( ‘woocommerce_sale_price_html’, ‘woocommerce_custom_sales_price’, 10, 2 ); function woocommerce_custom_sales_price( $price, $product ) { $percentage = round( ( ( $product->regular_price – $product->sale_price ) / $product->regular_price ) * 100 ); echo $price . sprintf( …

Read More »

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?   Copy and paste the code in .htaccess file. ErrorDocument 401 /path-to-your-site/index.php?error=404 ErrorDocument 403 /path-to-your-site/index.php?error=404 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ RewriteCond %{REMOTE_ADDR} !^IP Address One$ RewriteCond %{REMOTE_ADDR} !^IP Address …

Read More »

How to Creating a Custom Post Type for product, slider, portfolio or News Sections in wordpress or Woocommerce

custom_post_type

Copy and paste the code in functions.php function my_custom_post_product() { $args = array(); register_post_type( 'product', $args ); } add_action( 'init', 'my_custom_post_product' ); <?php function my_custom_post_product() { $labels = array( 'name' => _x( 'Products', 'post type general name' ), 'singular_name' => _x( 'Product', 'post type singular name' ), 'add_new' => _x( …

Read More »

WooCommerce All Shortcodes List here

– shows the cart page – shows the checkout page – shows the order tracking form – shows the user account page [woocommerce_edit_account] – Edit account pages [woocommerce_change_password] – shows the change password page [woocommerce_view_order] – shows the user account view order page [woocommerce_logout] – shows the logout page [woocommerce_pay] …

Read More »

How to Display Product specific category with WooCommerce ?

  How to Display Product specific category with WooCommerce ? <?php $cate = get_queried_object(); $cateID = $cate->term_id; $args = array( 'hierarchical' => 1, 'show_option_none' => '', 'hide_empty' => 0, 'parent' => $cateID, 'taxonomy' => 'product_cat' ); $subcats = get_categories($args); foreach ($subcats as $sc) { $link = get_term_link( $sc->slug, $sc->taxonomy ); …

Read More »

WOO-COMMERCE VARIABLE PRODUCT ADD CUSTOM FIELD IN VARIATIONS FOR VENDOR PRICE AND COMMISSION PRICE ON MRP

WOO-COMMERCE VARIABLE PRODUCT ADD CUSTOM FIELD IN VARIATIONS FOR VENDOR PRICE AND COMMISSION PRICE ON MRP

Code copy and past in them functions.php , its work fine. /*************for variable product**************/ // Add Variation Settings add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 ); /** * Create new fields for variations * */ function variation_settings_fields( $loop, $variation_data, $variation ) { // Number Field woocommerce_wp_text_input( array( 'id' => '_vendor_price[' . $variation->ID …

Read More »
0

December 9, 2016

Clear all