In TCPDiscount.class.php starting at line 420 there is filter function tcp_options_title whose job is to print discounted option prices. However it does not take into account price formatting settings or discount formatting settings. Also it always formats discount with tcp_format_the_price regardless of discount type.
This is my own solution:
function tcp_options_title( $option_title, $product_id, $option_id_1 = 0, $option_id_2 = 0 ) {
$discounts = $this->getDiscountsByProduct();
$discounts = $this->getDiscountByProduct( $discounts, $product_id, $option_id_1, $option_id_2 );
if ( count( $discounts ) > 0 ) {
// HACK:
$option_price = floatval(tcp_get_the_price($product_id)) + floatval(tcp_get_the_price($option_id_1));
$option_price = $discounts[0]['type'] == 'amount' ? $option_price - $discounts[0]['value'] : $option_price * (1 - $discounts[0]['value'] / 100);
$option_title = get_the_title($option_id_1) . ' ' . tcp_format_the_price($option_price);
return $option_title;
// END OF HACK
return $option_title . ' ' . sprintf( __( '(%s off)', 'tcp-discount' ), tcp_format_the_price( $discounts[0]['value'] ) ); // This is obsolete now.
}
return $option_title;
}
https://www.ads-software.com/plugins/discounts-for-thecartpress/
]]>I have implemented my own solution to fix this. In TCPDiscount.class.php line 401 is
if ( $discount_option_id_1 == $option_id_1 ) {
It should be
if ( $discount_option_id_1 == $option_id_1 || $discount_option_id_1 == 'All' ) {
https://www.ads-software.com/plugins/discounts-for-thecartpress/
]]>If an item is 100% discounted, it should automatically complete the order without going to Paypal.
Also, the discounted rate does not translate to Paypal. At least not when 100% discounted. Paypal wants the full price when the TCP invoice says $0
https://www.ads-software.com/plugins/discounts-for-thecartpress/
]]>Good Day,
I’m attempting to use a By Product coupon with a product that has 6 Dynamic Option attributes. the coupon discount does not apply in the cart. Adding the coupon in the cart and continue shopping, when I return to the product page with the coupon, the discount shows in the price correctly. Go back to the cart – no coupon applied to the price, but the coupon still appears in the box at the bottom of the page. It would seem the coupon is recognized based on the behavior on the product page. Just does not apply the discount in the cart or at checkout.
If I remove the By Product option in the coupon, the discount applies as expected so this appears to be an issue with the By Product option.
Running TCP 1.3.4.2 with Dynamic Options 1.2.3 and TCP Discounts 1.3.3 on WP 3.8.1.
any help would be greatly appreciated. Happy to provide more information as needed. The site is brooklyngracejewelry.com but the coupon and sale page are turned off right now until I can get this resolved.
thanks again,
https://www.ads-software.com/plugins/discounts-for-thecartpress/
]]>Hi,
I am demoing this cart for a client. Is it possible to have coupons that are associated with a specific product. We’d like to give out a coupon code to individuals to all them to download products for free or at some reduced amount.
Thanks
https://www.ads-software.com/extend/plugins/discounts-for-thecartpress/
]]>How to activated TheCartPress Discount on premiumpress product?
https://www.ads-software.com/extend/plugins/discounts-for-thecartpress/
]]>