Home / Tag Archives: Product variation

Tag Archives: Product variation

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 »

Woo-commerce simple product add custom field for vendor price and commission price on MRP

Woo-commerce simple product add custom field for vendor price  and commission price on MRP

Code copy and past in them functions.php , its work fine. add_action( 'woocommerce_product_options_pricing', 'wc_vendor_price_product_field' ); function wc_vendor_price_product_field() { woocommerce_wp_text_input( array( 'id' => 'vendor_price', 'class' => 'wc_input_price short', 'label' => __( 'Vendor Price', 'woocommerce' ) . ' (RS) ' ) ); } add_action( 'save_post', 'wc_vendor_price_save_product' ); function wc_vendor_price_save_product( $product_id ) { …

Read More »

WooCommerce Product Variations Grid or Table form with add to cart button

woocommerce-product-variation-grid-table

WooCommerce Product Variations Grid or Table form with add to cart button. Copy and Paste the code in your theme function.php function find_valid_variations() { global $product; $variations = $product->get_available_variations(); $attributes = $product->get_attributes(); $new_variants = array(); // Loop through all variations foreach( $variations as $variation ) { // Peruse the attributes. …

Read More »
0

December 10, 2016

Clear all