cart

Unable to add product quantity more than one items in one order MAGENTO

放肆的年华 提交于 2019-12-11 18:09:16
问题 I am facing a very strange problem in my magento site, the problem is when I am adding a quantity for a particular product from frontend for order it works properly for one item, but when I am adding one more different item in the same order and trying to increase its quantity it restricts to me the only 1 item for the next item, please suggest to me some ideas how I can fix this issue: http://www.debreiboerderij.nl. 回答1: Magento: limit product max quantity to 1 per order. quantity 2 = 2

Woocommerce Mini Cart Widget Change Quantity

邮差的信 提交于 2019-12-11 17:47:51
问题 I've been researching and cannot find a solution to this. I am trying to add or remove items individually from the Default Woocommerce mini cart widget cart. Items are being added to the cart using AJAX. Currently, it's only possible to remove all quantities of the product. For example: If user adds 3 Shirt's to the cart, I want to allow the user to remove AND add 1 at a time instead of forcing them to remove the entire amount (all 3) at once. I have found that it's possible to add these

Fatal error: [] operator not supported for strings ERROR shopping cart

会有一股神秘感。 提交于 2019-12-11 16:31:50
问题 I'm trying to store items in a shopping cart from user input in a form using sessions. This is my code to store the items in the cart. //Create cart if it doesn't already exist if (!isset($_SESSION['Cart'])) { $_SESSION['Cart'] = array(); } //Add an item only if required movie info needed if(isset($_POST['Cinema']) && isset($_POST['Day']) && isset($_POST['Time']) && isset($_POST['Quantity']) && isset($_POST['Price'])) { $ITEM = array( 'Cinema' => $_POST['Cinema'], 'Day' => $_POST['Day'],

Remove subtotal line from cart and checkout pages in Woocommerce

≡放荡痞女 提交于 2019-12-11 15:57:26
问题 I want to remove the Subtotals from Cart, Checkout, Order Received, Order Details and the emails. I don't want to use CSS, as it won't remove the reference from the order details page and emails. I have tried this code: add_filter( 'woocommerce_get_order_item_totals', 'adjust_woocommerce_get_order_item_totals' ); function adjust_woocommerce_get_order_item_totals( $totals ) { unset($totals['cart_subtotal'] ); return $totals; } It isn't working, the Subtotal is visible on the Cart and Checkout

Disable coupons & discounts from applying to defined Woocommerce products in cart

偶尔善良 提交于 2019-12-11 15:19:34
问题 I would like to stop any discount code being applied when purchasing a certain product (in this case a Gift Card). Other items in the cart should be unaffected and have the discount code applied to them. I know that this can be done on the individual coupon creation page, but with hundreds of coupons already made I'd like a way for this to apply automatically. All help is very appreciated! This the closest code I have found, but it relates to a plugin rather than woocommerce in general. add

Codeigniter cart can't insert data

纵然是瞬间 提交于 2019-12-11 14:56:12
问题 I'm trying to add some data to a codeigniter (HMVC codeigniter) chopping cart and display it, i'm using this method in the main cart controller: function add_to_cart(){ $this->load->library('cart'); // Get data $userID = $this->input->post('userID'); $eventID = $this->input->post('eventID'); $tickedID = $this->input->post('tickedID'); // Get ticket data $this->load->module('ticket'); $ticket_query = $this->ticket->get_where($tickedID); //echo $this->session->all_userdata(); foreach($ticket

Magento - Adding multiple products to cart programatically

冷暖自知 提交于 2019-12-11 14:08:57
问题 In a bit of a pickle trying to get multiple products to add to cart, effectively I have a block with a form element that defines the products that are added to the cart (free products, which is handled with an observer event). The observer event to change the products price to free is working fine however, adding more than one product to the cart is proving troublesome with the following method: public function addFreeItems($observer) { $cart = Mage::getSingleton('checkout/cart'); $freeItems

WooCommerce - add shipping costs and add an extra fee for paypal gateway

回眸只為那壹抹淺笑 提交于 2019-12-11 12:17:12
问题 First Question In my WooCommerce shop I use the plugin PayPal Express. With the plugin Woocommerce payment fees I can set an extra fee for the paypal payment. The fee will correctly shown in the shopping cart and will correctly add to the sum. But if I want to pay with Paypal, I am redirected to the Paypal site and there is only the total, WITHOUT the extra fee. Where is the mistake? Woocommerce payment fees Second Question I have two products in my shopping cart The shipping cost of product

Cart discount for product that cost less in Woocommerce

﹥>﹥吖頭↗ 提交于 2019-12-11 12:07:30
问题 How can I apply a discount in products cart for product that costs less? For example: I have two product in cart: one cost 150$ and one 200$. I would like to apply a 10 percent discount only for product that cost less, in this case the first one. I have this code but it works only for the second product in cart: add_filter( 'woocommerce_before_calculate_totals', 'discount_on_2nd_cart_item', 10, 1 ); function discount_on_2nd_cart_item( $cart_object ) { if ( is_admin() && ! defined( 'DOING_AJAX

Magento - How to check if a product has already been removed from the cart

╄→гoц情女王★ 提交于 2019-12-11 11:45:42
问题 I'm writing a small module that will add a product to the cart automatically (based on certain criterias). However if the user subsequently removes that automatic product from the cart I need to know so that I don't add it again in the current session. Does the cart object hold anything that can tell me if a product has been removed from the cart already? 回答1: Magento doesn't keep record of which items have been removed, you will have to do that yourself. Start by listening for an event; app