/home/techb158/immovalet.com/platform/plugins/ecommerce/helpers
NameSizeModeActions
brands.php14580644editdlrm
common.php45100644editdlrm
constants.php53610644editdlrm
currencies.php47970644editdlrm
customer.php17710644editdlrm
discounts.php44840644editdlrm
order.php14830644editdlrm
prices.php32360644editdlrm
product-attributes.php11230644editdlrm
product-categories.php16300644editdlrm
product-variations.php36870644editdlrm
products.php174080644editdlrm
shipping.php6660644editdlrm
Edit: /home/techb158/immovalet.com/platform/plugins/ecommerce/helpers/discounts.php (4484B)
type_option) { case 'shipping': if ($discount->target) { $description = __('Free shipping to') . ' ' . $discount->target . ''; } else { $description = __('Free shipping for all orders'); } $description .= ' ' . __('when shipping fee less than or equal') . ' ' . format_price($discount->value); break; case 'same-price': $description = __('Same fee') . ' ' . format_price($discount->value) . ' '; switch ($discount->target) { case 'group-products': $collections = DiscountProductCollection::where('discount_id', $discount->id) ->join('ec_product_collections', 'ec_product_collections.id', '=', 'ec_discount_product_collections.product_collection_id') ->pluck('ec_product_collections.name') ->all(); $description .= __('for all product in collection') . ' ' . implode(', ', $collections); break; default: $description .= __('for all products in order'); break; } break; default: if ($discount->type_option === 'percentage') { $description = __('Discount') . ' ' . $discount->value . '% '; } else { $description = __('Discount') . ' ' . format_price($discount->value) . ' '; } switch ($discount->target) { case 'amount-minimum-order': $description .= __('for order with amount from') . ' ' . format_price($discount->min_order_price); break; case 'specific-product': $products = DiscountProduct::where('discount_id', $discount->id) ->join('ec_products', 'ec_products.id', '=', 'ec_discount_products.product_id') ->pluck('ec_products.name') ->all(); $description .= __('for product(s)') . ' ' . implode(', ', $products); break; case 'customer': $customers = DiscountCustomer::where('discount_id', $discount->id) ->join('ec_customers', 'ec_customers.id', '=', 'ec_discount_customers.customer_id') ->pluck('ec_customers.name') ->all(); $description .= __('for customer(s)') . ' ' . implode(', ', $customers); break; case 'group-products': $collections = DiscountProductCollection::where('discount_id', $discount->id) ->join('ec_product_collections', 'ec_product_collections.id', '=', 'ec_discount_product_collections.product_collection_id') ->pluck('ec_product_collections.name') ->all(); $description .= __('for all products in collection') . ' ' . implode(', ', $collections); break; case 'product-variant': $products = DiscountProduct::where('discount_id', $discount->id) ->join('ec_products', 'ec_products.id', '=', 'ec_discount_products.product_id') ->pluck('ec_products.name') ->all(); $description .= __('for product(s) variant') . ' ' . implode(', ', $products); break; default: $description .= __('for all orders'); break; } } return $description; } }