shopping-cart

How can I store my Cart data to database in Laravel using DarrylDecode Cart functionalities

陌路散爱 提交于 2020-07-22 14:14:50
问题 I was trying to learn Laravel by making a small ecommerce website project and for implementing cart functionality, I came across DarrylDecode Cart functionality (https://github.com/darryldecode/laravelshoppingcart) But soon I realised that the cart data for a user gets stored in a session and whenever the user logs out and log back in again, the cart data gets lost. The user cannot access the cart items from another browser or another device aswell since it is saved on a session on particular

Need to add and delete items from a Shopping Cart using javascript/jQuery

柔情痞子 提交于 2020-06-28 06:55:34
问题 I'm having trouble with my homework assignment. I need to create a Shopping Cart using Javascript, HTML5 and JQuery, and it must collect all the items from the shop inside an Array. I think I pretty much solved it, but I cannot figure out how to add multiple of the same item to the cart without it creating 2 different objects on the cart list. Also, if possible, I would like to be able to change the amount of certain items directly from the cart, with the option of upgrading or downgrading

How can save session of shopping cart data after logout, so the user can find them when login again in Django?

一个人想着一个人 提交于 2020-06-01 06:20:53
问题 I am working on e-commerce website using Django, I'm working on the shopping cart it's implemented using sessions and it's currently working fine, except one problem when the authenticated user logout from website, and login again , all data on cart lost. How can save session of shopping cart data after logout, so the user can find them when login again? my cart app files are: 1) cart.py from decimal import Decimal from django.conf import settings from shop.models import Product from coupons

How do I add PayPal's Smart Buttons to an existing javascript cart?

瘦欲@ 提交于 2020-04-07 07:04:21
问题 I am trying to integrate PayPal's Smart Payment Buttons into my cart on my website. My cart is integrated using VanillaCart JS and here is my main.js file: 'use strict'; let cart = (JSON.parse(localStorage.getItem('cart')) || []); const cartDOM = document.querySelector('.cart'); const addToCartButtonsDOM = document.querySelectorAll('[data-action="ADD_TO_CART"]'); if (cart.length > 0) { cart.forEach(cartItem => { const product = cartItem; insertItemToDOM(product); countCartTotal();

Shopping cart and different kinds of discounts. Storing discounts in DB and applying it to order calculations

断了今生、忘了曾经 提交于 2020-02-22 05:15:03
问题 Currently, I'm looking for best practice to "applying discounts" to cart/order. So, I'm planning to implement such kind of discounts as... fixed user's discount (for example, I'd like to give 10% discount to my favourite customer) discount for number of items (for example, you're buying 10 different colored pens and you'll be getting discount of 1.5%) discount for coupon (for example, during promo action we've produced 100 coupons with 10% discount each. Coupons work only for one order and

Shopping cart and different kinds of discounts. Storing discounts in DB and applying it to order calculations

二次信任 提交于 2020-02-22 05:11:52
问题 Currently, I'm looking for best practice to "applying discounts" to cart/order. So, I'm planning to implement such kind of discounts as... fixed user's discount (for example, I'd like to give 10% discount to my favourite customer) discount for number of items (for example, you're buying 10 different colored pens and you'll be getting discount of 1.5%) discount for coupon (for example, during promo action we've produced 100 coupons with 10% discount each. Coupons work only for one order and

Shopping Cart Error (LaravelShoppingcart)

心已入冬 提交于 2020-01-30 12:13:45
问题 I am using Crinsane/LaravelShoppingcart with Laravel 5. When I try to add items to Cart then it will display error Non-static method Gloudemans\Shoppingcart\Cart::add() should not be called statically, assuming $this from incompatible context Any help for resolve this.. 回答1: Add this line at the top of your PHP file: use Cart; instead of this: use Gloudemans\Shoppingcart\Cart; 来源: https://stackoverflow.com/questions/28526033/shopping-cart-error-laravelshoppingcart

Paypal Shopping cart custom create order objects and user details

两盒软妹~` 提交于 2020-01-25 01:07:22
问题 I have a shopping cart that holds an array or my objects. I have all my custom user details serialized with a form and jQuery. I would like to insert the user data I got from my user details form (maybe I use payer or payer_info? Object. Also, I would like to insert my items to the PayPal CreateOrder: actions.order.create({ I am guessing I do it like this? "item_list": { "items": [ { "name": "hat", "description": "Brown color hat", "quantity": "5", "price": "3", "tax": "0.01", "sku": "1",

Submit Multiple Forms With One Button

。_饼干妹妹 提交于 2020-01-19 01:46:52
问题 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

Template not found- using angularjs ngCart to build shopping cart for ecommerce

两盒软妹~` 提交于 2020-01-17 06:02:07
问题 I am building an angular web app and am trying to incorporate ngCart. I installed it using bower install ngcart --save , incorporated the bower file in my index.html file and injected it as a dependency into the app. When I try to use the <ngcart-addtocart> directive (only incorporating the ngcart-addtocart tag in the view file) I get the following error - Error: [$compile:tpload] Failed to load template: template/ngCart/addtocart.html (HTTP status: 404 Not Found) I suspect it is something