cart

Remove attribute values from product variation title and show them on separate rows

爷,独闯天下 提交于 2019-12-29 08:52:08
问题 I have a checkout page where I want to: Remove selected product attribute values from product variation title item. Remove the quantity from item title too. Display the different product attribute value such as size, color and the quantity on different rows, for this product variation item. I want to display on my checkout page: Aria Sport Shorts (the product title) Color: Dusty Pink Size: Small QTY: 1 Instead of this: Is it possible? Where I should start to make this real? 回答1: UPDATED 1)

Cart discount based on cart item count and only for items that are not in sale

孤人 提交于 2019-12-29 07:55:48
问题 In WooCommerce, I would like to give a discount of 10% specifically for those products that are not on sale. If cart item count is 5 or more items and not on sale, then I give a discount of 10%. I use the following code to get a discount based on cart item count restriction here: add_action('woocommerce_cart_calculate_fees' , 'add_custom_fees'); /** * Add custom fee if more than three article * @param WC_Cart $cart */ function add_custom_fees( WC_Cart $cart ){ if( $cart->cart_contents_count <

Cart discount based on cart item count and only for items that are not in sale

一世执手 提交于 2019-12-29 07:55:08
问题 In WooCommerce, I would like to give a discount of 10% specifically for those products that are not on sale. If cart item count is 5 or more items and not on sale, then I give a discount of 10%. I use the following code to get a discount based on cart item count restriction here: add_action('woocommerce_cart_calculate_fees' , 'add_custom_fees'); /** * Add custom fee if more than three article * @param WC_Cart $cart */ function add_custom_fees( WC_Cart $cart ){ if( $cart->cart_contents_count <

Allow checkout only when a product of a mandatory category is in cart

丶灬走出姿态 提交于 2019-12-29 01:45:29
问题 I'd like to stop any customer advancing to the checkout if they do not have a particular product category in their basket. I would also like to tell them with an error message that they need to add a certain product. I've found some code but cannot it to work. I've added it as a code snippet into my Wordpress install but alas it does not function and there are no error messages even though I have debugging switched on. Here is the code that I have found in Github that may need modification in

Set different Tax rates conditionally based on cart item prices in Woocommerce

邮差的信 提交于 2019-12-29 01:28:11
问题 In My Wordpress e-commerce web site I use WP Hotel Booking , a plugin for hotel room bookings. The checkout process is done using WooCommerce . The Issue : We have different rooms with different pricing.For example : Room A price - 1500 Room B Price - 2700 Room c price - 2200 GST Tax is set at 12% for rooms wich price is below 2500 and 18% for rooms above 2500. Since I am using WP Hotel Booking for this custom product (room Management), I am unable to use the Additional Tax Classes option in

Hooks around add to cart for Woocommerce

落花浮王杯 提交于 2019-12-29 01:28:10
问题 I am running a WooCommerce store with WC Marketplace. What I am trying to achieve with the hook below is to prevent a new item being added to a basket if there is already a product in the basket from a different vendor. e.g. If a shopper adds product x from vendor y to his basket, if they were to add product a from vendor b, then the item will not be added and the user will be informed of the error. I have 2 questions: - firstly when does a hook run, is it before the main function fired or

Dynamic shipping fee based on custom radio buttons in Woocommerce

时光怂恿深爱的人放手 提交于 2019-12-28 04:27:09
问题 In Woocommerce, I have added two custom radio buttons on the checkout page and on click, I called an ajax function to add a delivery fee. Here is my code: $(document).on('change','#shipping_method_0_local_pickup5',function(e) { $('.woocommerce-shipping-fields').css({ 'display': 'none' }); $("#deli").css("display","block"); var selected = $("input[type='radio'][name='post-del']:checked"); var selectedVal = selected.val(); var pickurl= "<?php echo admin_url('admin-ajax.php');?>?action=delivery"

I am building a Cart system, Added items displaying , i want same items in a group/addition

点点圈 提交于 2019-12-25 18:35:31
问题 Here is My Code Please have a look. It is displaying a single Item every time when a product is added to Cart, all I wants is to display single item once, and its total cost. Please guide... <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com

Prestashop : How to Empty cart?

我是研究僧i 提交于 2019-12-25 06:52:05
问题 I want to make Cart order list empty after a new product has been added to the cart. In fact only on product every time can be in cart. Tanx 回答1: 2 ways to add your custom logic : create your own module and hook it on "actionCartSave" override "add" and "update" methods in "Cart" class (/override/classes/Cartp.php) Edit : The 2nd way os wrong because infinite update loop. Here is a module that do it : class OneProductCart extends Module { public function __construct() { $this->name =

Add to cart button not working

陌路散爱 提交于 2019-12-25 04:27:49
问题 I'm having an issue with Magento 1.* based on the add to cart button: When i try push the button i get Jquery errors. Does anyone know what these errors are and how to solve it? The error is: Uncaught TypeError: Cannot read property 'validate' of undefined(…) My view.phtml looks like this: <?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available