shopping-cart

Shopping cart and stock management

浪子不回头ぞ 提交于 2019-11-29 00:51:37
问题 I am currently building an ecommerce site with PHP/MySQL. Recently, I have been working on the Shopping Cart integration. The client wanted to ensure that stock was available to potential buyers, so I created a stock management system. The shopping cart works as follows: Client adds a quantity of an item to his cart. Item quantity is reserved from available stock in the database. No one else can purchase reserved stock. Stock remains reserved until client processes order - where stock is then

Using acts_as_shopping_cart how do I implement basic quantity editing?

北城以北 提交于 2019-11-28 12:23:00
问题 The acts_as_shopping_cart gem requires two models - Shopping Cart and Shopping Cart Item . The attributes it allows you to access like this for the item: <td><%= shopping_cart_item.item.name %></td> <td><%= shopping_cart_item.item.price %></td> <td><%= shopping_cart_item.quantity %></td> But I want to allow users to change the quantity - from say a drop-down menu (so a select tag from a collection). But I am not quite sure how to approach that. I would also like to add other attributes to my

ModelValidationException was unhandled user code

守給你的承諾、 提交于 2019-11-28 11:49:42
Can you help me on the following error, i checked everything no ID mistakes ModelValidationException was un handled by user code An exception of type 'System.Data.Entity.ModelConfiguration.ModelValidationException' occurred in EntityFramework.dll but was not handled in user code Additional information: One or more validation errors were detected during model generation: public int GetCount() { ShoppingCartId = GetCartId(); // Get the count of each item in the cart and sum them up int? count = (from cartItems in _db.ShoppingCartItems where cartItems.CartId == ShoppingCartId select (int?

Programmatically add Bundle Products in Magento, using the SKU / ID of Simple Items

青春壹個敷衍的年華 提交于 2019-11-28 07:50:22
I have some simple catalog products in Magento, so I have their SKUs & IDs. Now I want to create a Bundled product using the array elements "bundle_options" & "bundle_selections" of the Bundle Items, which are used by the Magento Admin coding in its Observer Class. Also in the Observer class, there are method calls of two functions " setBundleOptionsData() " & " setBundleSelectionsData() ", for whose I am not able to find any function definition. Please any professional post here, because I need some proper way of doing this thing. If it needs, overriding modules or using events, I will do,

shopping cart for non registered users

纵然是瞬间 提交于 2019-11-28 04:33:31
I am in the process of making a website that involves a shopping cart. There are two major requirements: The user experience guys want login/authentication to be the very last step in the entire work flow. The user gets to do all the shopping and is asked to login only at the time of checking out. The shopping cart shouldn't expire(not even on browser close) unless the user (registered or not) does check-out. In the above context, I have the following question with respect to maintaining the cart's state: Should I go with file based or database sessions? Please keep in mind this would be for

Builing a cart with multiple items and the PayPal button in PHP

有些话、适合烂在心里 提交于 2019-11-27 18:54:18
问题 I'm building a shopping cart in PHP and want to allow customers to enter the quantity for each item and then press a button which brings you to PayPal and lists how many products you have. On PayPal's website, all the info I found seems to lead to me needing a shopping cart. If this is absolutely necessary, how could I implement that? 回答1: I just had to do this. I use this form in my HTML: <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="payPalForm" onsubmit="if (verify(

When does Magento consider a cart to be abandoned? Where's that time limit set?

◇◆丶佛笑我妖孽 提交于 2019-11-27 13:05:47
问题 If left to default settings, what circumstances would have to occur for Magento 1.7 to consider a cart abandoned? Where is the code that makes this determination located? I know that this is probably set somewhere in the quote, but I can't find it for the life of me. I've done some Googling, but like so many Magento questions I'm left empty handed. Thanks! 回答1: As you probably know the setting is located here: Admin => system => Configuration => Sales => Checkout => Quote Lifetime (days) This

Submit Multiple Forms With One Button

只谈情不闲聊 提交于 2019-11-27 09:31:54
I am using $_SESSION to dynamically create forms for my web store. These forms hold the custom info for the product that the customer wants. This is the layout: Page1 Customer fills out form that looks something like this: <form action="page2" method="post"> <input type="text" name="size"> <input type="text" name="color"> <input type="submit" name="submit" value="Review Order"> </form> Page2 Customer reviews order details and has the option of adding more products. Customer goes back to page1 to order another one. All of the customer's orders will show on page2 in their respective form. Looks

Storing multiple values in a $_SESSION variable with PHP

梦想与她 提交于 2019-11-27 02:22:03
问题 I'm creating a site which has a shopping cart. I do not need any special functionality so I'm creating the cart on my own rather than integrating any ready one. My products do not have a predefined price in the database. The price is being generated dynamically based on the values entered by a user on the product page. So, the user chooses some specifications, enters the quantity and I get the following values: Item ID Quantity Total price I need to store those values in the $_SESSION