Qchmqs
Qchmqs

Reputation: 1805

how to make multiple products apear as a single one in opencart

hi there i was writing a module for opencart that let's the user chose from some

products(mother board, graphical card, processor ...)

in a wizard style that for every choice i retreive the "id" of the selected product

but calling a

 addtocart(id);

for every product will make them apear as a list of products

but i want to make them added to the cart as a single product called

"costimized pc"

and make the order treat them as a single product as well

any idea about how or where should i start are welcome

Upvotes: 1

Views: 4456

Answers (3)

Ijas Ameenudeen
Ijas Ameenudeen

Reputation: 9259

Use Product as Group. Options as Products withing the group. Simple as that. :)

Upvotes: 0

Qchmqs
Qchmqs

Reputation: 1805

Because there is simply ne easy way to do this i think the best way to do so is :

->Copy the Cart system and rename it to Build

->Remove the Options from the getProduct() function

->rewrite the total calcultion to calculate every total of a group of products as a single product

->in the admin add another order page that handle the products groups

->in the add to cart function in common.js add a function that sends the products as a string of joined IDs

->add to the cart common/cart.tpl the needed variable to display the groups of products as a single products and the price of them and rewrite the removeCart() function;

Upvotes: 0

Jay Gilford
Jay Gilford

Reputation: 15151

This isn't really something simple to achieve, since OpenCart is designed as a shopping cart for single item products. Your best solution would be to use options instead for a single product, and perhaps change it so that they display in a better fashion on your product page

Upvotes: 2

Related Questions