Questions tagged [e-commerce]

Electronic commerce, commonly known as e-commerce, eCommerce or e-comm, refers to the buying and selling of products or services over electronic systems such as the Internet.

Filter by
Sorted by
Tagged with
5
votes
1answer
850 views

Calculating shopping cart discounts

I have a method that checks to see if a hash of given items should have discounts applied and if so, determines and returns the discount: ...
6
votes
1answer
310 views

Shopping cart simulator

I have tried to simulate a cart (only partially completed). I just wanted to see how the code upto this point can be enhanced. I am trying to learn about the usage of ...
2
votes
1answer
9k views

Shopping cart application in Spring MVC

I am creating a shopping cart application to learn Spring MVC. I want to display a list of all categories and subcategories in more than one page. i.e; Home Page, Products page, and Category page. In ...
3
votes
2answers
1k views

Shopping cart code kata

I have recently started code kata and learning for myself, as I would like to learn test-first development. I have started doing a shopping cart as my code kata. I have included a test as well. I ...
4
votes
1answer
429 views

TDD Django - Shopping Cart

I'm new in Python TDD and I would like to ask you about some feedback for Django unit testing. ...
5
votes
2answers
6k views

Shopping cart with discounts

I want to create a shopping cart project with discounts for products. For instance, if you buy 2 books, you can get 10% off Parker pens. I created a shopping cart example, but without exception ...
1
vote
4answers
2k views

Front end to PHP shopping cart

I'm very new to jQuery and JavaScript in general but decided to develop my own code rather than use 3rd party plugins as I really need to learn the language. Would anyone be so kind as to review my ...
3
votes
1answer
2k views

Shopping cart program in Java with a text menu

I wrote this program to implement a shopping cart. It supports adding/removing items to the cart, viewing the current order, and completing the checkout process. ...
1
vote
1answer
624 views

Shopping cart business rules

A purchase order has an order ID, a customer ID, total price and line items. Line items can be a product or membership type. Business rules: If the purchase order contains a membership, it has to be ...
2
votes
4answers
2k views

Object-oriented shopping cart

I have just started to try and learn 'OOP' but it appears I'm doing this wrong, according to the people on Stack Overflow. The code below is far from object-orientated, but I'm finding it hard as I'm ...
3
votes
2answers
1k views

Shopping Cart Handler Class

I've written an eCommerce shopping cart handler class in PHP. Please review the code and inform me of any errors and/or badly written code and/or badly handled logics. Please also inform me of any ...
6
votes
3answers
10k views

Python OOP shopping cart

I completed the following task: You need to create the foundations of an e-commerce engine for a B2C (business-to-consumer) retailer. You need to have a class for a customer called User, a class ...
6
votes
2answers
406 views

Shopping cart using events and delegates

I am trying to learn events and delegates in C#. To do that I am trying to create a hypothetical console project where when some user submits the orders in his/her shopping cart, I need the Billing ...
5
votes
2answers
341 views

PHP shopping cart class

The following is a shopping cart class. The initial version of this was pulled from a production application. Since then it has changed a bit but I'd love to hear your feedback on this. Due to having ...
4
votes
3answers
106 views

Removal of jQuery from script to auto-apply coupons from a link

We are using a small extension that auto-applies coupons from a link. The extension had pop-up JS based on jQuery: ...
6
votes
3answers
6k views

Shopping Cart design interview task

I was interviewed for one position and had the following task. The goal is to design system according step 1, then adapt it to additional requirements in step 2. Step 1: Shopping cart You are ...
4
votes
1answer
140 views

pyvdp - Python library for Visa Developer Program

I'm coming from PHP and recently started developing in Python. As a part of my self-study course, I developed a small library for access to Visa Developer Program APIs and published it on Github. It ...
1
vote
1answer
27 views

Class for Stripe transactions

I just wonder whether it is a common approach to hit the third-party API and fetch values within the initialize method? Ex. ...
7
votes
2answers
934 views

Front page for an e-commerce website, with a simple animation for the search field

I've been using CSS and HTML for a while and I'm trying to start to use better methods of coding. I've tried my best not to hack anything. Could anyone let me know how I'm doing at the moment in terms ...
2
votes
2answers
235 views

Rails controller method to create a customer with credit card info

I'm working on a Rails application that has a lot of logic in the controller that should be in the model. In the app/controllers/customers_controller.rb#create ...
1
vote
3answers
853 views

Checking address fields for presence of a Post Office Box

I'm just trying to learn how to write jQuery better so I wanted some smart peoples opinions. The code is checking the billing and shipping address fields to see if it contains a PO Box address by ...
7
votes
1answer
140 views

Card payment strategies

In my project, I have 3 payment mode. Via Manually Entered , Card Swipe, and cash. I have 2 fragments named RecordCardManuallyFragment and ...
3
votes
1answer
130 views

Sales tax calculator with branching based on postal address

A problem I come across very often is what to do with branching classes. The class below is one example of a class that can turn ugly very fast. The requirements of the class is that if the address ...
4
votes
2answers
4k views

E-commerce database design

I am new to database design but am fairly familiar with SQL and its syntax. I want to create a database for an e-commerce website that will sell a single product type such as a shirt. They could be ...
2
votes
1answer
159 views

Shopping basket script in object-oriented PHP

I have made a shopping basket script that allows the user to add and remove items from the basket, and edit quantity of items that are in the basket. I am new to OOP, and I would like to get your ...
2
votes
2answers
4k views

AngularJS shopping cart using local storage

Two weeks ago I started writing some Javascript and AngularJS code for a customer. As a proud newby I must also be aware of the dangers on the big bad Internet. In particular vulnerabilities such as ...
1
vote
0answers
177 views

Persistent shopping cart that allows users to do CRUD operations as well as perform a checkout

I have never dealt much with jQuery or JavaScript. The following code is something I wrote and while it is functional, I am pretty sure it is a complete mess and it could use some improvements for ...
1
vote
1answer
98 views

Recording a customer's shopping cart as an order 2.0

Some days ago, I put up a question here for review about the best way to handle JDBC transactions in the context of an e-commerce Java web application. After a kind suggestion from user @gardenhead, ...
2
votes
2answers
245 views

Recording a customer's shopping cart as an order

I have come up with the following method to post a transaction to a database, in the context of an e-commerce Java web application. The transaction consists in submitting a new order alongside its ...
0
votes
1answer
66 views

Funds transfer authorization

I have the working code but it is pretty dirty. The goal is to input a number in an application. If it satisfies the min/max logic then jump to the authorization part. Afterwards we can confirm it or ...
7
votes
2answers
4k views

Securing PHP shopping cart

I've managed to create a working shopping cart and my next concern is security, mostly about the architecture and session security. Should I make sessions somehow secure, if there's no authenticated ...
2
votes
2answers
373 views

Securing PHP shopping cart (Paytrail integration) - follow-up

I've developed my shopping cart further. This is related to my earlier post: Securing PHP shopping cart In addition to those functionalities, I've proceeded to make integration to Paytrail payment ...
3
votes
2answers
404 views

Showing an item in a shopping cart

I'm updating and old project from jQuery 1.4 to jQuery 1.7. Can this be simplified, thus reducing the amount of code, and perhaps in such reduction, have it improved? Having the following code: <...
2
votes
0answers
56 views

Byzantine payment processing code

I've been working on a large Ruby on Rails application for several years. We inherited it and refactored and upgraded it, but there are some sections that have not been touched in at least 5 years (...
1
vote
1answer
1k views

ISO8583 encoding data fields

I just want to confirm that my ISO8583 format is correct. Example: For the data field 35, the length of the data is 36, so I put 36 before the 4842. Then all the data is inserted in a string (...
4
votes
1answer
519 views

eCommerce project using the Repository pattern

I am currently working on an eCommerce project in Laravel 5.1. I have implemented Repository Pattern by learning from this site only for 1 model, namely, ...
6
votes
2answers
289 views

Updating the presentation of a credit card field as the card type becomes known

The goal here is to, add a credit card image, and remove all other credit card images, of a certain input field. I had a even larger code, with a lot of addClass() and removeClass()... then, I shrink ...
2
votes
3answers
233 views

Checkout (page) backend

I am developing an e-commerce site and am confused about this. Customers come on the site and add some products to the cart. Customers click on the checkout link if already logged in, then will go to ...
4
votes
2answers
276 views

Coupon code manager

My concern lies in understanding the nature of an object. My reasoning: when I instantiate my class, I am either creating an entirely new coupon, or I am referencing an existing one from the database....
4
votes
2answers
38 views

Multiple DB record creation after a successful operation

I am working on a payment process. Upon a successful payment process, I have to create multiple records. For that, I have made this class: ...
3
votes
1answer
2k views

Error handling for Stripe credit card processing

I have a rails application that uses Stripe for credit card processing. Currently several exceptions are being handled anywhere a transaction takes place. The code below is being used currently in 11 ...
4
votes
3answers
137 views

RFID financial transaction

I have this code below which establishes connection to server (from device). Basically assembles some buffer, sends it to server, gets response, parses and prints it. I would appreciate if someone can ...
4
votes
3answers
7k views

My perfect shopping cart class

Here is my shopping cart class! I want it to be perfect and never to have to implement it. What improvements would you do? New : IComparable ...