Author Topic: Coupon creation takes a lot of time to display  (Read 1385 times)

woodhouse

  • Beginner
  • *
  • Posts: 10
    • The Collector Avenue
  • VirtueMart Version: Always the latest
Coupon creation takes a lot of time to display
« 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3672
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Coupon creation takes a lot of time to display
« Reply #1 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

woodhouse

  • Beginner
  • *
  • Posts: 10
    • The Collector Avenue
  • VirtueMart Version: Always the latest
Re: Coupon creation takes a lot of time to display
« Reply #2 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.

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 751
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always latest
Re: Coupon creation takes a lot of time to display
« Reply #3 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.

woodhouse

  • Beginner
  • *
  • Posts: 10
    • The Collector Avenue
  • VirtueMart Version: Always the latest
Re: Coupon creation takes a lot of time to display
« Reply #4 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.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28198
  • Always on vacation
    • Jenkin Hill Internet
Re: Coupon creation takes a lot of time to display
« Reply #5 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
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14