VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: woodhouse on May 28, 2021, 17:47:58 PM

Title: Coupon creation takes a lot of time to display
Post by: woodhouse on May 28, 2021, 17:47:58 PM
Hi,
I'm using Joomla 3.9.27 and VirtueMart 3.8.8 10472 for an Italian and English site.
I noticed that coupon creation is very slow, and the time varies from browser to browser.
With firefox if I click on the "new" button I must quit the browser after several secends (20" and more)
With Chrome, after clicking "new" the form displays after 6/10 seconds. It works, but I do not understand why it takes so long to display a form.
I noticed that the process fills some field that is empty when the form is displayed.
The attached picture shows the "allowed product category" text field while the form is created.
The installation is fresh, but I have more then 40K products.

Do someone have any idea?

Daniele
Title: Re: Coupon creation takes a lot of time to display
Post by: Jörgen on May 28, 2021, 21:32:55 PM
My guess would be the custom template. Something is messing things up. Try with VMBeez

Jörgen @ Kreativ Fotografi
Title: Re: Coupon creation takes a lot of time to display
Post by: woodhouse on May 31, 2021, 10:34:46 AM
Hi,
I think it's something else because I do not understand why a front-end template should have something to do with the administration.
I also have other site with different front-end template ad the time is almost the same.
I wil try with beez, but I'm not confident.
Title: Re: Coupon creation takes a lot of time to display
Post by: Jumbo! on May 31, 2021, 15:44:30 PM
The recent versions of VirtueMart have two new fields on the coupon creation page. (1) Allowed Products and (2) Allowed Product Categories.

I think the problem is created by the "Allowed Products" field trying to load all 40K products of your shop under a single list (select field). Ideally, this needs to an ajax field and it should load a maximum of 20 products at a time.
Title: Re: Coupon creation takes a lot of time to display
Post by: woodhouse on June 01, 2021, 11:58:23 AM
Hi Jumbo!
That seems to be a good reason, thank you.
It does not explains why it take such differnt times on different browsers, but it can be a differnt timeout handlig.

However, I'm considering the idea of creating coupons in MySql directly. It's only 1 table with very simple fields and, apparently, no relations with other tables.
Title: Re: Coupon creation takes a lot of time to display
Post by: jenkinhill on June 01, 2021, 15:36:44 PM
For sites that make require the use of coupons I use Awocoupon which is very flexible and also useful for specil offers & gift coupons.
https://awodev.com/products/joomla/awocoupon