Can I use my own HTML files with OpenCart? - opencart

I just want to implement the Shopping cart side of things where they add products to basket and quantities etc.
Would I have to select a theme or can I just add the things I want from it for my site?

Yes you can have your own html files but make sure, all variables from controller are passing onto your view files...

Related

Is it possible to make 'cart' with django Class Based View?

I am trying to make a simple e-commerce website and followed some tutorials.
However, the author of the book used complicated function based view to make cart function..
there are bunch of session stuffs.. and I don't understand the logic..
and I am trying to think the other way..
what about using database to store all the cart related data, and
use CBV to build it?
for example,
CartListView to see the contents of the cart, and CartUpdateView to change the quantity..
then are they going to be two different pages? separated page that user should go to the
different page to change the value??
please help me T T
You can access the session in any sort of CBV as self.request.session and a "shopping cart" is normally stored therein.
You'll certainly need to implement a CartListView to see what's in it, or possibly a CartEditView to show the cart with options to edit the quantities and delete anything that shouldn't be in there.
Adding products to the cart may well be an "Add" button on a ProductDetailView or lots of add buttons in a ProductListView. You might add a POST handler method to these views which are otherwise read-only (GET-only) bt default. Or you might make them FormViews, even though the form would be hidden and filled/POSTed by JS rather than the shopper doing anything other than clicking "add".
And then there will be a CheckoutView.
Check https://djangopackages.org/ (put "cart" in the search box). this will throw up several shopping cart things which might be the code you want, or the source of which might be a valuable learning resource before you end up rolling your own.

opencart shared order, one cart - multiple customers

I'm looking for a solution to share an order on opencart. Basically what I need is if I'm in an office and I add to cart a product, to have an url, which I share with my colleagues.
My colleagues will be able to add in the same cart the products they want, While on my screen i see what they added.
Once I see everybody added to the cart, I'll continue placing the order as 1 customer.
Is this possible? Is there any extension for this on opencart (2.3.x)
Thanks.
This looks like something you might want
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=21677

Django multi-select widget. Add arbitrary select components

i would like to make a widget that lets the user select a value from a drop-down list and then add new drop-down lists with values filtered based on the previous selections. I don't know where to start from....
If the amount of drop-downs is finite and determinable by the time you develop the software (e.g. selecting country->city->street) I would suggest to:
add all the extra dropdowns (without data yet) to your form, make sure they are hidden
use jqueryui to un-hide and populate the dropdowns as needed using ajax
Don't forget to disable/hide the whole form by default and only show it if JS is enabled in browser.
Also, you will of course need another view, with which only ajax speaks.
Here for you to catch the idea how the stuff should work. Sorry don't know if they have anything more similar. But: user selects something -> jquery requests data for the next dropdown -> jquery displays next populated dropdown.

Open Cart - Categories

I've new to Open Cart and there's something I'm trying to accomplish. Basically, my header has main categories. When a user clicks a Category in the header, and is taken to the Category template, I want to list Brands and Styles in the Category sidebar, to narrow down their search.
However, Brand and Style aren't sub categories, since 1 brand could be part of many Categories. And they don't seem to fall into Options or Attributes either.
So what's the best way to pursue this? Does it make more sense to create a Category called "Brands", and make subcategories under that of the different brands? And same with Style? And then display those in the sidebar?
Or is there other functionality in Open Cart that I seem to be missing?
thanks!
I certainly wouldn't create dozens of sub categories. I believe your issue may be resolved with filters. I use them in the same method you described. My cats only go one level deep and then filters allow the user to narrow the results down.
Read more here: Product Filters
Nice extension which allows you to add ajax to those filters: Ajax Pagination and Filters

Displaying options and add to cart on category page - opencart

I am using Opencart v1.5.1.3.1
I want to be able to create a template which certain categories use. Cat1 would use the normal category.tpl file where cat2 would use category-cart.tpl
The category-cart.tpl would have extra functionality of displaying price options and an add to cart button which would normally only work on the products.tpl page.
I know that in order to make this happen I have to modify the category.php controller for category.tpl file.
The question is what do I change in the category.php controller to make this happen?
Add product with options to cart from category page http://www.opencart.com/index.php?route=extension/extension/info&extension_id=8649
You will need to make more changes than can be listed here, so you will need to familiarize yourself with the opencart framework to do what you want. As a starter if you look at the bottom of the category controller you will see what template is loaded. Do a search for template. You could put a if statement here that loads templates based on the value of the selected category.
You will then need to add more code to the controller which loads variables for price options and add to cart.
http://opencart-help.com/modifications/39-add-product-options-to-category-listing-in-opencart.html
Check the above link and you will find out how to show the options
It should then look like this
http://i38.tinypic.com/j7b60k.jpg