我想在12(数量)上应用折扣,并删除低于12(数量)的折扣。我已经创建了一个八折优惠券代码(‘genew’)。我申请并删除了优惠券代码,当有人在购物车页面上点击更新购物车按钮(woo-commerce)。删除优惠券代码功能仅当有人单击更新购物车按钮两次时才起作用。第一次点击它就不会删除优惠券代码。
下面是我在function.php中使用函数
add_action('woocommerce_before_cart_table', 'discount_coupon');
function discount_coupon() {
global $woocommerc
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
我有购物车。我也有一个部分视图cartSummary -这是一个简单的部分视图,列出了购物车中的所有优惠。在我页面的某个地方,我点击了"add to cart“Ajax.ActionLink,它会将所选的oofer添加到购物车中,如下所示:
public ActionResult AddToCart(Cart cart, string offerId)
{
OffersServices offersServices = new OffersServices();
var offer = offersServices.Get
我正面临一个关于rails应用程序的设计问题,我现在正在为我的公司产品开发一个应用程序。我的应用程序允许创建两个类,它们是父类的子类。
class Coupon
include Commonelements
end
class ServiceCenterCoupon < Coupon
end
class DealershipCoupon < Coupon
end
当您转到视图并想要创建新的优惠券时,您可以选择这两种优惠券之一,并根据params:coupon_type创建新的优惠券。
在主计长中:
if params[:coupon_type] == 'dealer
我收到警告:
WARNING: Element 'fullname_user' with expression on attribute 'value' has no value for mandatory property 'Fail On Error'.
值为:= False &“"&lastname,当我转到properties >可选>失败的错误时,我会在‘True’或‘False’上标记
保存报告并关闭它。然后重新打开它,我将再次收到警告,而Fail又会被设置为“未定义”。
我该怎么解决这个问题?有