e-commerce: Algorithm for calculating discounts

Assuming that: You can compute all available discounts based on your basket Each product can only have a single discount applied to it Each discount can only be used once Then the problem becomes one that is called an assignment problem and can be optimally solved in O(n^3) using the Hungarian algorithm. You will need … Read more

Designing a SQL schema for a combination of many-to-many relationship (variations of products)

Applying normalization to your problem, the solution is as given. Run and see it on SQL Fiddle. CREATE TABLE products ( product_id int AUTO_INCREMENT PRIMARY KEY, name varchar(20), description varchar(30) ); INSERT INTO products (name, description) VALUES (‘Rug’, ‘A cool rug’ ), (‘Cup’, ‘A coffee cup’); — ======================================== CREATE TABLE variants ( variant_id int AUTO_INCREMENT … Read more

Symfony2 ecommerce bundles feedback

TLDR If you are going to develop an ecommerce website with symfony right now ( as of 2013-05-26 ) and you want to make use of existing bundles/implementations… Go for Sylius! Why? Vespolina Vespolina has received some attention when first announced as it claimed to be the first ecommerce solution for symfony2 but it’s really … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)