Is there a easy way to add a product to the cart by knowing the 'model' ID?
On the normal way it will added with product_id.
What function I do have to change for that?
Thanks for your help in advance
Related
I have a book object which needs to be categorized up to sub 5 categories. The business requirement required the admin to add these categories page by page by first adding first-level categories and then click on each on to add second-level categories, After that, click on each one to add the third-level and so on up to 5. the below figure can describe the idea.
Django inlines can add two objects of different models on the same page Which can help me only for the second-level categories, but what if I want to click in that second object to add subs inside it?
Is that possible in Django? from the DB side, I think one table with the following attributes: key, value, and parent can help me in storing all the categories and whenever I wanted them on the client side I can arrange them before sending them in views. But the issue is on the admin side, how can I do it in that way?
Thank you.
I think nested_admin might help.
Please, check out the reference.
https://django-nested-admin.readthedocs.io/en/latest/index.html
I would like to change the model name displayed in admin. The idea is to be able to register filtered versions of the model to the admin view. I know that I can add filter options when viewing the model. I am not interested in doing that.
I don't think using the approach for solving admin plural naming is an option: Django fix Admin plural. I could be wrong. If so, please tell me how this can be done.
I found this approach which seems to be the right solutions: Change 'Change model class name' in Django Admin || Change the 'Change' <h1>. However, I can't make it work. Is it just me not trying hard enough?
It is also an option to make a number of models and then register each of them. However, I will prefer to rename and register filtered versions in admin.
Any suggestions for solving this little issue?
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
I'm working on a webshop using OpenCart2.x. I would like to add category while I'm adding product and assign product to that category.
Just to clarify... Let's say I want to add "HTC One" to category "Android". I would like to go to Catalog > Product > Add Product, enter "HTC One" details and
if category "Android" dosen't exist OC should offer to create new category.
It is possible in wordpress/woocommerce so I hope it is possible in OC2.
Sorry if the question is not for this site.
Thank you!
No, this is unfortunately not possible in vanilla OpenCart. However, I did find somewhat of a trick to make this process a tad bit more convenient.
If you open your OpenCart admin panel in 2 different browser instances that use different sets of cookies (different browser or incognito/no cookie mode) you can make your categories in one instance and then the category auto complete list in your product creation page will instantly update. Not exactly the desired functionality but definitely better than having to switch back and forth.
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