Wordpress / Woocommerce Cart plug in
- or -
Post a project like this2904
$80
- Posted:
- Proposals: 7
- Remote
- #1133410
- Awarded
Top seller in WooCommerce, WordPress, and JavaScript development with superfast speed and 99.98% accuracy.
Jabalpur
Web and App Development,SEO,Data Entry,Content Writer,Translation Services and expertise in a variety of domains.
Mumbai
118160355434410045801110592116295512187931235228
Description
Experience Level: Intermediate
Estimated project duration: less than 1 week
General information for the website: Auto Parts seller
Kind of development: Customization of existing website
Description of every page/module: We require a plugin developed for a Wordpress with Woocommerce to add 2 product fees that are automatically applied at checkout for an auto parts online shop. Plugin should be developed as per wordpress best practices, in english only. I've found some snippets of code online to assist with the first fee, however it does not currently find products in product subcategories of Tires.
Description of requirements/features: Sample code describing functions in detail:
/**
* Add “Tire Installation” fee to WooCommerce per product quantity, based on product category.
* Fee applies to products in store category "tires" (taxonomy=product_cat&tag_ID=8) and all hierarchal subcategories
* $25 fee x QTY of products in this category in the cart
**/
function io_add_tireinstallation_surcharge( $cart_object ) {
global $woocommerce;
$specialfeecat = 8; // category id for the special fee - TODO: Search all subcategories also
$spfee = 0.00; // initialize special fee
$spfeeperprod = 25.00; //special fee per product
foreach ( $cart_object->cart_contents as $key => $value ) {
$proid = $value['product_id']; //get the product id from cart
$quant = $value['quantity']; //get quantity from cart
$itmprice = $value['data']->price; //get product price
$terms = get_the_terms( $proid, 'product_cat' ); //get taxonamy of the prducts
if ( $terms && ! is_wp_error( $terms ) ) :
foreach ( $terms as $term ) {
$catid = $term->term_id;
if($specialfeecat == $catid ) {
$spfee = $spfee + $quant * $spfeeperprod;
}
}
endif;
}
if($spfee > 0 ) {
$woocommerce->cart->add_fee( 'Tire Installation ($25/ea)', $spfee, true, 'standard' );
}
}
/**
* Add “Tire Tax” fee to WooCommerce per product, based on category and order location.
* If customer billing address Country = CA and Province = BC, then fee is $5 per tire, ELSE default fee is $4 per tire.
* Fee applies to products in store category “tires” (taxonomy=product_cat&tag_ID=8) and all hierarchal subcategories
* fee x QTY of products in this category in the cart
**/
Extra services needed: Customization
Specific technologies required: php, woocommerce
Extra notes:
Kind of development: Customization of existing website
Description of every page/module: We require a plugin developed for a Wordpress with Woocommerce to add 2 product fees that are automatically applied at checkout for an auto parts online shop. Plugin should be developed as per wordpress best practices, in english only. I've found some snippets of code online to assist with the first fee, however it does not currently find products in product subcategories of Tires.
Description of requirements/features: Sample code describing functions in detail:
/**
* Add “Tire Installation” fee to WooCommerce per product quantity, based on product category.
* Fee applies to products in store category "tires" (taxonomy=product_cat&tag_ID=8) and all hierarchal subcategories
* $25 fee x QTY of products in this category in the cart
**/
function io_add_tireinstallation_surcharge( $cart_object ) {
global $woocommerce;
$specialfeecat = 8; // category id for the special fee - TODO: Search all subcategories also
$spfee = 0.00; // initialize special fee
$spfeeperprod = 25.00; //special fee per product
foreach ( $cart_object->cart_contents as $key => $value ) {
$proid = $value['product_id']; //get the product id from cart
$quant = $value['quantity']; //get quantity from cart
$itmprice = $value['data']->price; //get product price
$terms = get_the_terms( $proid, 'product_cat' ); //get taxonamy of the prducts
if ( $terms && ! is_wp_error( $terms ) ) :
foreach ( $terms as $term ) {
$catid = $term->term_id;
if($specialfeecat == $catid ) {
$spfee = $spfee + $quant * $spfeeperprod;
}
}
endif;
}
if($spfee > 0 ) {
$woocommerce->cart->add_fee( 'Tire Installation ($25/ea)', $spfee, true, 'standard' );
}
}
/**
* Add “Tire Tax” fee to WooCommerce per product, based on category and order location.
* If customer billing address Country = CA and Province = BC, then fee is $5 per tire, ELSE default fee is $4 per tire.
* Fee applies to products in store category “tires” (taxonomy=product_cat&tag_ID=8) and all hierarchal subcategories
* fee x QTY of products in this category in the cart
**/
Extra services needed: Customization
Specific technologies required: php, woocommerce
Extra notes:
Paul L.
100% (3)Projects Completed
7
Freelancers worked with
6
Projects awarded
44%
Last project
27 Apr 2016
Canada
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies