Opencart categories too slow - opencart

In open cart admin panel, after adding around 1k products, i'm not able to take the category section. I takes a lot of time to load the category and once loaded, when i try to save or delete a category, it takes too long and shows me 500 error. Is there anything i can do to improve the speed. The other sections in admin panel, loads fine. The problem is only for category section.

I think this is what you are looking for

Related

Xcart classic - Products randomly appearing disappearing from the cart

I am using xcart classic 4.7.1 for my shop. We did a lot of customization in the code to make it suitable for my clients need. We made it live the previous year and everything worked fine. Now, these days a strange issue is happening. The products are randomly appearing and disappearing in the cart. Sometimes after adding the products to cart, the cart stays empty. It is not happening regularly. Sometimes if a product is deleted from the cart, previous products are randomly added into the cart again. Suppose the cart containing 4 products. Customer deleting the products one by one. After he deleted the last product, previously deleted products are showing in the cart again. As it is not happening regularly, it is very hard to track it and fix it. A lot of customers are complaining and my client is not happy now.
Thank you very much in advance. Blessings.
1)Try to convert the engine type from MyISAM to InnoDB for the xcart_sessions_data table.
For this
run the query
ALTER TABLE xcart_sessions_data ENGINE=INNODB;
2)Maybe upgrade to the newest X-Cart version will fix the problem.
Since there has been a lot of customization in your cart, as you wrote, the most probable reason is some bug in the customizations, related to the cart functionality. Have you had any customizations on the cart functionality itself?

Django multiple admin modifying the same databases

i'm a total noob in django and just wondering if it's possible for an admin doing a same thing at the same time ? the only thing i get after looking at the django documentation is that it is possible to have two admins, but is it possible for the admins to do a task in the same databases at the same time ?
thanks for any help
You didn't made it clear that what do you actually want but:
If by admin you mean a superuser then yes you can have as many admins as you want.
Admins can change anything in database at the same time, but if you mean changing a specific row of a specific table at the same time, its not possible because of these reasons:
Its kinda impossible to save something at the same time. when both admins tries to save anything, the last request will be saved (the first one will be saved too but it changes to the last request)
and if there is any important data in database, you should block any other accesses to that row till the first user has done his job and saved the changes. (imagine a ticket reservation website which has to block any other users to be allowed to order the same ticket number till user finishes the order or cancel it.)
Also if you mean 2 different django projects using a single database, then its another yes. Basically they are like 2 different admins and all above conditions works for them too.

Ember js big table

I have a page with a few tables, in total there are a few after 1000 rows.
After the tables is ready, when I click to go on another page, the route is changing in the address bar, but nothing happens until a few seconds.
Then the new page is rendered.
Why is that and what can I do?
This sounds like the new page route you are shifting to has a model hook that takes a bit to load. If that is indeed where your slowdown is then you can add a loading substate to your application to display a loading spinner of some kind.
More details available here: https://guides.emberjs.com/v2.12.0/routing/loading-and-error-substates/

How to know where database has changed

I have a project that looks like a simple shopping site that sells different kinds of products. For example, I have 4 models: Brand, Product, Consignment. Consignment is linked to Product, and Product is linked to Brand. To reduce count of queries to databases, I want to save current state of these models(or at least some of them). I want to do it, because I show a sidebar with brands and products. So every time when user opens some page, it will execute the query to database to get those brands and products.
But when admin add some new product or brand, I want to handle database changing and resave it. How to implement it?
Your answer is by using Cache. Cache is a method to store your objects in memory/other app like redis temporarily so that you do not need send queries to database. You can read the full description here.
Or, you can use this third party library that helps you to cache Django ORM Model. Here are the example.
Brand.objects.filter(name='stackoverlow').cache()
After doing an update to the model, you need to clear or invalidate the cache.
invalidate_model(Brand)

Magento products not visible via REST api addition

I'm currently running into the problem that I am using a webservice system to load products into magento.
I'm using the REST api in conjunction with Oauth to create products and assign a category. It works and when I go to the admin I can see the products as well as see they are properly assigned to the correct category. When I open the category management in the management console i can see i have (example: 106) items assigned in the category.
However, the problem is: It does not show in the site.. even with refreshing anything that is cache or index.
When I open up the management console and open 1 article and save it without changing any other property and then Save it. I can suddenly see the item in the front end webshop...
I'm lost to why this occurs.. also for 19k product updates it is becoming a bit of an annoying bit of work to update this amount of products since any bulk update method does not do the same as editing just 1 product at a time.
Any help is much appreciated.
In the end I have discovered the answer myself. Thought it might be nice to list it here as well.
In the 'rights' tab i added all the accessrights for the user using the api. This allowed me to read products etc. Very stupid mistake but somehow I overlooked this at first.
IF you'd expect security errors.. you wont get any. just empty lists and null responses.