I
I
Iskander Mamedov2014-03-24 12:31:54
PHP
Iskander Mamedov, 2014-03-24 12:31:54

How to implement a shopping cart without PHP?

There is an online store with 9 products. I write mainly in HTML, JQuery and I would like to know if it is possible to somehow implement a shopping cart with product design later without using PHP?

The problem is simply that I don’t know where to store information about the selected product if the user selected the product and the size of the product on the same page, and then continued to climb the site and ordered something else. I heard that PHP has a session in which you can store it, but how without PHP?

Answer the question

In order to leave comments, you need to log in

9 answer(s)
S
Sild, 2014-03-24
@Sild

citforum.ru/internet/html/cookie.shtml
This is what you need. But from experience with a shopping cart (quite complex, with options and various stages), which hangs completely on the frontend - no need . Use backend and sessions. Everything is more logical and more beautiful there.

M
Michael, 2014-03-24
@Baaa

simplecartjs.org

V
Vampiro, 2014-03-24
@Vampiro

There is an online store with 9 products.

open the console. (f12)
write
localStorage['backet'] = ['Мухи'];
localStorage['backet'] = ['Мухи','Котлеты'];

On any other page of this site, open the console, look:
total business ....

O
Online store without Php, 2014-12-09
@HEEG

If you don’t want to figure it out at all, you can simply find a ready-made solution and use it. For example, here heeg.ru the entire engine of the online store (including the shopping cart and the admin panel) is made on pure javascript without using php at all, even sending PHP orders is not needed.

D
Dmitry Prikhodchenko, 2014-03-24
@LazyProger

To store the selected product, you can use localstorage or websql

K
Konstantin Kitmanov, 2014-03-24
@k12th

https://backendless.com/

H
hadra, 2014-03-24
@hadra

And what do you need?
You can use php c js ... or purely php, but the load on the server will increase significantly.
Using array or session..

M
marazmua, 2014-12-24
@marazmua

There is a script for an electronic store (basket) EasyShop . There is a code in JS, online payment is implemented, storage of selected goods in localStorage, invoicing, it works both on bare HTML and under DLE and other engines, and PHP is executed on the developer's side. Free for small orders (up to 2 items per order).

A
antfrolov, 2016-03-21
@antfrolov

Cart widget for cartme.org is free and there are paid advanced features. Try to use it. Among analogues, I have not seen better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question