Wordpress Plug In (WooCommerce)

Bids
1
Average Bid (USD)
$75
Budget (USD)
$30 - $250
17 day(s) 2 hour(s) left
OPEN

Project Description:

Hello I need to develop a custom plug in which applies a discount to items in the cart based on the following logic:


function applyDiscount(){
xCount = 0;
foreach(Product in Cart){
if(Product.variation.name == "XXXX"){
xCount++;
}
}

if(xCount > 1){
foreach(Product in Cart){
if(Product.variation.name == "XXXX"){
discount = (Product.variation.getPrice("ZZZZ") / 2) - Product.variation.price;
Product.applyDiscount(discount);
}
}
}
}

Skills Required:


img
Posted by :
0 0 Reviews
United States of America

All Bids


img
4.83 6 Reviews
$75
1 day(s)
4.83 6 Reviews
$75
1 day(s)