我想在12(数量)上应用折扣,并删除低于12(数量)的折扣。我已经创建了一个八折优惠券代码(‘genew’)。我申请并删除了优惠券代码,当有人在购物车页面上点击更新购物车按钮(woo-commerce)。删除优惠券代码功能仅当有人单击更新购物车按钮两次时才起作用。第一次点击它就不会删除优惠券代码。
下面是我在function.php中使用函数
add_action('woocommerce_before_cart_table', 'discount_coupon');
function discount_coupon() {
global $woocommerc
我已经看到了很多关于这方面的问题,但没有找到一个干净的解决方案:
我有以下lambda表达式:
var result = Store.FirstOrDefault(x.Products.Coupon[0] == 100);
我想检查优惠券集合的null,看看它是否不是null,然后将第一个优惠券与值100进行比较。在lambda中检查优惠券是否为空的干净方法是什么?我不想使用扩展方法来检查是否为空。我想在线结账。
我有购物车。我也有一个部分视图cartSummary -这是一个简单的部分视图,列出了购物车中的所有优惠。在我页面的某个地方,我点击了"add to cart“Ajax.ActionLink,它会将所选的oofer添加到购物车中,如下所示:
public ActionResult AddToCart(Cart cart, string offerId)
{
OffersServices offersServices = new OffersServices();
var offer = offersServices.Get
public function coupon($data) {
$couponCode = $data['couponcode'];
if (!Zend_Validate::is(trim($couponCode), 'NotEmpty')) {
throw new Exception($this->__('coupon code cannot be empty.'));
}
$oCoupon = Mage::getModel('salesru