XCart unable to add items to cart - x-cart

Hey guys I'm taking over another web developers installation of XCart and am unable to
add items to a cart, it seems like they disabled this functionality somehow, and am wondering
if there are thoughts on how this has been done. You can play with an actual item here
Item Test
To see what it actually does. It seems like the item completely skips the cart somehow, I'm
wondering if this is a product irregularity? All products were imported, none were created.

I fear I can't test that. You don't have any "add-to-cart" buttons enabled on that web-site pages.
If this is what you faced to - make sure
1) you have "add-to-cart" code in product.tpl template file
2) you have non-zero in-stock qty for products
3) at least one of payment methods enabled

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.

How to replicate "Available Groups" to "Chosen Group" functionality in Django Admin

I am moving from Rails to Django and trying to convert a Hamper Business website I run. Love Django!!
I have hampers with a number of products. Each hamper has different products. I'd love to be able to use the following structure to move products into a hamper.
An example: Django uses the following to have a list of groups which then moves to Chosen Groups:
All I seem to be able to get with a ManyToManyField is a list box which I have to select by control and clicking to add multiple fields. This becomes impractical and not easy to read.
To take it one step further, I'd love to be able to include a product more than once. For example, a hamper which has three bottles of the same beer. I would like to not have to set up three seperate products for the same hamper.
Thanks so much in advance for pointing me in the right direction.
I found the answer for part of it. I simply added filter_horizontal to the admin.ModelAdmin class in admin.py.
Still not sure how to add multiple quantities, but I'll maybe save that for another day.

How to create sub-pages for apphook model instances with django-cms?

Question Context
I am responsible to design the cms architecture for a project.
The requirements state that a group of editors should be able to create "Projects".
Each project..
saves meta data about itself
is queryable from other places (e.g. top 5 projects).
has a page that displays information about it. (does not need to be a cms page instance)
can be connected to countries (meaning that an implementation of that project exists in the selected counties).
can have sub-pages which in turn can also be nested.
Imagined Example
Using the django-cms documentation as a bases I would image the resulting structure to look like this:
Projects (apphook)
"Project 1" (Page for project 1 model instance)
"Project 2" (Page for project 2 model instance)
"Project 2 Subpage 1" (Subpage for project 2 model instance)
"Project 2 Subpage 2" (Subpage for project 2 model instance)
"Project 2 Sub-Subpage" (Subpage of "Project 2 Subpage 2")
However that does not seem to exist or at least I did not see any references on how to get such a structure.
In a video I heard that as soon as there is an apphook.. subpages do not make sense anymore.
Somewhere else I read that in theory if the hook is permissive enough.. it could be combined. However even if that works.. the subpages would not be liked to actual instances of the custom apphook model.
PS: I am currently using: django-cms==3.3.0
Question
How can I feature such a structure using django-cms?
I figured it could be done by having an apphooked page for each project. In that case.. the server would have to be restarted for every newly created project. That does not seem to be very elegant.
Alternatives
I have been working with wagtail on a previous project. Thus I do know how to implement such a structure with wagtail easily using ProjectPage and ProjectSubpage models.
I refuse to give up on django-cms being capable of replicating such functionality. I am open for alternative paradigms and approaches. Maybe there are some I have not thought of. If so please let me know. :)
Request
Guidance and ideas are very welcome!
Please tell me if you know of any way how to get that or have some idea that could point me in the right direction.
Thank you!
A couple of points here for you.
django CMS can happily serve pages "beneath" and apphook, but the apphook gets priority during URL resolution. So, just make sure that your apphook's URL patterns don't gobble up everything and sub-pages should be OK.
An alternative approach would be to make a one-to-many table that holds "page-like" attributes (title, meta-attributes, etc.) and at least one PlaceholderField. This can then be used to present what appears to be normal CMS pages that the apphook-itself can control with its views. So, you could have apphook-model-specific context and url-patterns and still have almost all of the front-end editing features of the CMS.
I hope this helps!

Add category while adding product in OpenCart2.x

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.

Hybris ProductListPage does not find category

here is my question. I have one ProductListPage where I want to display a single product. I have a simple Product catalog with one category "TestCategory" and one product assigned to it "TestProduct". What I want is just to display the product in my Product List Page.
However, when I access the Product List Page, there is a message stating:
Category with code 'TestCategory' not found! (Active session catalogversions: ProductTestCatalog.staged, ContentTestCatalog.staged)
Both content and product catalogs are synched and everythings seems fine. I started an indexer operation wizard and it was successful, but nothing has changed, I keep getting this message, even though the category is existing - it even comes with the name "TestCategory not found" What should I do to find it?Can you provide any ideas or solution to this problem? Maybe the problem is in my Solr Configuraiton? If yes, any ideas how to fix it will be highly appreciated. Thanks! :))
The ProductDetails Page in the hybris Accelerator does not use SOLR so it is unlikely to be that.
The error suggests that the category TestCategory is not visible to the current user in the current session.
The Active Session catalogVersions should show Online catalogs only unless you are in Preview/LiveEdit. So this suggests something is wrong.
You should try to understand the SearchRestrictions in the Session.