shopping-cart

PHP Shopping Cart Problem

情到浓时终转凉″ 提交于 2019-12-25 08:48:45
问题 Okay, so I have a shopping cart problem. I've decided to roll out my own cart, which is alot easier than I had expected. BUT, I've run into a problem and cannot for the life of me figure out what to do next. The problem: After adding products to the cart, the user is taken to a "checkout" page, where they edit the quantities of the items they want. These items are displayed in a table. How can I get these items with their edited/new values into a PHP variable, and then update the

Display item list in shopping cart using PHP

孤街醉人 提交于 2019-12-25 06:06:13
问题 With the foreach loop I'm trying to connect to my database and display in a list the products that have been added to the cart. Each product has a product ID which is correctly working and being stored in the session variable through the cart.php. I can't figure out how to connect to the database to display the information gathered about the product added - I also tried doing var_dump $SESSION['cart'] and its prints out null even after I use the "Add" button in cart.php . <div class="row">

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

PHP: Foreach echo not showing anything

跟風遠走 提交于 2019-12-25 04:17:42
问题 EDIT Now I can output the current product, but every time the form adds another item it gets overriden. I want to make the list incremental like this: 1. Banana 3 Units, Price 350 CRC 2. Yougurt 4 Units Price 2000 CRC 3. etc etc 4. etc The current output only shows the last added item. This is the script: <?php session_start(); //Getting the list $list= $_SESSION['list']; //stock $products = array( 'Pineaple' => 500, 'Banana' => 50, 'Mango' => 150, 'Milk' => 500, 'Coffe' => 1200, 'Butter' =>

Woocommerce format price display of cart calculated fees

别等时光非礼了梦想. 提交于 2019-12-25 03:18:16
问题 I am manually modifying the price of the cart total (to £10) when there are 4 items in the cart and none of the items are from the category: christmas . This essentially gives the user a discount + "Free Shipping" . However, the total does not match up and it can be confusing to the user as shipping is still shown as charged. Is there a way to manually apply a dummy "Free Shipping Applied -£3.00" to the cart based on these conditions? Just to make it clearer for the user? I understand that

Get magento product feed using Mangento rest api but OAuth error [closed]

有些话、适合烂在心里 提交于 2019-12-25 03:07:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I have a core php website where client create a different type of widgets to get reporting in the form of charts. I want to develop widget for that purpose to show Magento orders reporting , sales reporting etc on php site using Magento store API. Anyone know about magento Api to

PHP Shopping Cart list only one item

时光毁灭记忆、已成空白 提交于 2019-12-24 08:38:58
问题 I am working on an onlinestore project. In my code,the shopping cart will only list 1 item. For example when i click add to cart button under iphone 5s it will jump to the cart and show me Iphone 5s with 1 quantity. However, when i press again Samsung, it will overwrite Iphone 5s and show me only Samsung. Here is the code for product: <div> <image src="ip5s.jpg"> <p><font color="blue">&nbsp&nbspIphone 5S</font></p> <p><font color="red">&nbsp&nbspRM1999</font></p> <p><form name="addcart"

Buy One Get One Half Price in PHP shopping cart total

不想你离开。 提交于 2019-12-24 07:56:55
问题 I am creating a shopping cart in PHP and a particular item is buy one get one half price. When the user purchases the item, I would get like the offer to be deducted from the total but I'm stuck on how I would do this mathematically. So far I have something like this in a if loop getting data from database: $total = $total+($arraycart['Price']*$quantity); Then I think it will be something along the lines of: if ($arraycart['Item'] == "A1" and $quantity > 1) { //calculate here buy one get one

How can I keep track of a shopping cart across multiple projects?

自作多情 提交于 2019-12-24 06:07:29
问题 First some background, we are creating a new "eGov" application. Eventually, a citizen can request permits and pay for licenses along with pay their utility bills and parking tickets online. Our vision has a shopping cart so a person can pay for multiple items in one transaction. To keep things organized better, we are going to break each section into a different project. This also allows me to work on one project while the other developer works another. The person making a payment could be a

Difference between two commands of fetching Shopping Cart Items in Magento

醉酒当歌 提交于 2019-12-23 19:43:18
问题 In Magento, if you need to get / fetch the Shopping Cart's Item details, you can do it in any of the two possible ways, which will provide you with all the shopped Items in an array:- $cartItems1 = $cart->getQuote()->getAllItems(); $cartItems2 = $cart->getItems()->getData(); But before using any one of the above two methods, you need to initialize the shopping cart object as:- $cart = new Mage_Checkout_Model_Cart(); $cart->init(); Can anyone please describe in details as to what the two