shopping-cart

Codeigniter Cart Class - additional price for product options

拟墨画扇 提交于 2019-12-11 08:34:37
问题 Is it possible to add price values to product options in the Codeigniter Cart Class. For example: T-shirt price is $10.00, but the XXL size is an extra $2.00. $data = array( 'id' => 'abc', 'qty' => 1, 'price' => 10.00, 'name' => 'T-Shirt', 'options' => array('Size' => 'XXL') // Where would you add $2.00 for XXL? ); $this->cart->insert($data); 回答1: That's one of the reasons why we built our own cart and order management system apart from CI's original one. The better way imho is to extend or

Disable Link while animated Basket

笑着哭i 提交于 2019-12-11 07:53:30
问题 I'm using this script for my online shopping basket: http://www.webresourcesdepot.com/fly-to-basket-effect-with-jquery/. Like people suggest in the comments it's easy buggy when you click multiple times on the same image. How can I disable the img link when it's clicked once and re-enable it when the product is added to the basket? I've tried setting the attribute HREF of to # in the beginning of the function, but that doesn't help. So when a user clicks the function needs to be executed, but

What happens to cart object when session expires?

狂风中的少年 提交于 2019-12-11 07:28:49
问题 I am following the Agile Web Development tutorials and I came across an annoying issue with the current implementation. if the session changes or expires, the cart still exists in the database. How is Rails supposed to deal with these useless cart objects? Thanks 回答1: Normally, a background process will delete old shopping carts every so often. You need to guard against recreating the session while someone is shopping. Doing so would be considered a bug if you are using it to track the

USPS api - using curl and codeigniter

↘锁芯ラ 提交于 2019-12-11 02:45:54
问题 I am trying to develop a USPS rate calculator for a cart that I am building in codeigniter. I am having issues getting getting success responses from the USPS test server and their api. I have called in with my issues and apparently, they don't want to provide any support to anyone trying to create a custom solution. To make it more confusing, they told me that all I need to know can be found in their Development Guide v3.pdf, but in it they state: Step 3: Run “Canned” Test from Test Server

PayPal Convertings Spaces in _cart Form to Plus Sign

荒凉一梦 提交于 2019-12-10 12:19:56
问题 Recently (starting March 2017), the _cart form integration with PayPal payments standard has started encoding spaces in all item info (names and options) to the plus sign ( + ). I verified this was happening in Chrome and added the enctype attribute to the form, which seemed to solve the issue for me. In Chrome and Firefox, I can send data to PayPal and spaces are preserved properly. Perhaps this is a fluke? However, almost every customer that purchases is getting their info encoded

Get base product image in Magento

吃可爱长大的小学妹 提交于 2019-12-08 14:46:03
问题 I want to get base product image in Magento to resize it and display in cart sidebar. Unfortunatelly this: echo $this->helper('catalog/image')->init($_product, 'image')->resize(38, 38); prints Magento placeholder image. Base image is set for this product properly. Small image and thumbnail works great. No idea what's going on. EDIT: Solution: Get full product data this way: $_product = Mage::getModel('catalog/product')->load($_item->getProduct()->getId()); and then use it as you wish: echo

How can I update my cart with Ajax?

霸气de小男生 提交于 2019-12-08 13:43:17
问题 I would really need some help from to AJAX Guru master overthere to help me building my update cart function on my website in AJAX. So basically, what I would like to do is, when I modify one of my product in one input_dropdown, my 'update_cart' function is automaticaly called and my prices are updated as well as my input EDIT : I rewrite my question since I made some progress thanks to Matei Here is my view : <?php $options = array( '0' => '0', '1' => '1', '2' => '2', '3' => '3', '4' => '4',

Pass javascript into a .txt file with PHP

谁说我不能喝 提交于 2019-12-08 11:28:08
问题 Ok so far I have had some help from you guys and this is the last thing that I have spent way too much time on. I am using nopCart for an online store for uni. We aren't required to do the back end stuff but I have been saving the customer details to a text file. Inititally I was able to get everything sent via email but since going through PHP I don't know how to get the order details. The customer information is entered into text boxes and then saved to the text file via PHP. My checkout

Relationship between Customer and Order in a Shopping Cart

走远了吗. 提交于 2019-12-08 08:10:19
问题 I'm making an ERD, so that I can build my shopping cart. I am confused about the relationship between Order and Customer. If im not mistaken, a customer can order many products, an order can be placed by 1 customer So Create Table OrderProduct( orderProductId int PRIMARY KEY, productID int, Quantity int ) Create Table Orders( OrderId int PRIMARY KEY, orderProductId int, //foregin key CustomerId int, date ) Am I correct, or is mu table structure wrong? 回答1: That seems fine to me, but you need

Problem with Magento connect

感情迁移 提交于 2019-12-08 05:33:53
问题 Since a while I can't install any magento modules by magento connect anymore because of the code below. Any help would be realy appreciated as I can't find the answer on the internet. Fatal error: Cannot use string offset as an array in /home/username/public_html/mydomain.nl/downloader/lib/Mage/Xml/Parser.php on line 86 Many thanks for the help 回答1: Does this describe the problem you are having with magento? Issue #7983: http://www.magentocommerce.com/bug-tracking/issue/index/id/964 There are