Page 1 of 2

Options keep vanishing

Posted: Wed Nov 30, 2011 9:05 pm
by Reverend2100
Hi all

My first post after my first implementation of OC!

Site is working perfectly, except... Options. My client has added dozens of options, and she reports that sometimes they go missing and vanish altogether. I've investigated the cause and it turns out that it's something wrong in the Admin.

Basically... if I go in to the Product page and look at its options, some of them don't load in properly, and rather than showing the sub-option in the Selector, it just shows an empty Selector (see image).
tl_screen.jpg

tl_screen.jpg (224.71 KiB) Viewed 6005 times

If I hit Refresh, they could reappear, or a different Selector will be empty. So, this is the obvious cause - my client is going in to the Admin, editing the product somewhere, and not noticing that some of the options have not loaded into the Admin correctly, so when she then Saves that session, that option Selector is empty and so isn't saved.

So, this is where my detective work runs out of steam - can anyone suggest why this could be happening?

Please help, am at risk of losing the only paid job I have before Christmas!

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 3:02 am
by Cyberwoolf
I have been getting that issue too.. try increasing you memory limit with a php.ini file and if you have vQmod installed, set it true for the cache.

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 3:18 am
by jcsmithy
It's a common problem with AJAX and vQmod - upgrade to the latest version of vqmod, should fix your problem.

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 3:34 am
by Cyberwoolf
I'm not sure what Rev is running but..

Mine is upgraded to the latest version (2.1.5) and I still get the disappearing options. Cache is enabled and error log is set to off. memory_limit = 1000M is set in php.ini. OC 1.5.1.3

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 5:55 am
by Qphoria
Cyberwoolf wrote:I'm not sure what Rev is running but..

Mine is upgraded to the latest version (2.1.5) and I still get the disappearing options. Cache is enabled and error log is set to off. memory_limit = 1000M is set in php.ini. OC 1.5.1.3
Odd.. you shouldn't still be getting this with 2.1.5
But try enabling useCache on vQmod to see if that resolves it.
http://code.google.com/p/vqmod/wiki/useCache

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 12:01 pm
by Cyberwoolf
Nope :-/

Image

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 7:23 pm
by Reverend2100
Sorry for getting back to my post so late! Er, I haven't tried doing anything on vQmod yet, but I'm pretty sure that this issue was happening *before* I installed vQmod as that was the add-on I installed last...

Cyber, do I take it that this didn't fix it anyway?

Re: Options keep vanishing

Posted: Thu Dec 01, 2011 8:25 pm
by Reverend2100
Actually, the "$vqmod->useCache = true;" fix may have worked... 5 refreshes and still no empty Selectors.

Cyberwoolf, you said it didn't work for you - did you try editing the index.php file within the root, or within the Admin directory? I edited the one in Admin, which is where I think the problem is coming from.

And, so far, it *seems* OK. Still, I bet as soon as I've hit Submit... :)

Re: Options keep vanishing

Posted: Fri Dec 02, 2011 1:00 am
by Cyberwoolf
Checked again this morning and still the same :-/ And yes, it was the admin index I edited :-)

I'm glad you have it working Rev!

Re: Options keep vanishing

Posted: Fri Dec 02, 2011 1:07 am
by Reverend2100
Hmmm, well, now that I seem to have fixed mine, I really want to help you fix yours... I wonder if there could also be a browser cache issue, on top... Have you tried (after editing your admin/index.php with useCache) clearing the browser cache? I always have Cache switched off in FireFox.

Re: Options keep vanishing

Posted: Fri Dec 02, 2011 2:51 am
by Qphoria
Well the useCache=true absolutely fixes it from the vQmod standpoint. It is due to the excessive ajax callbacks on the product option tab. useCache prevents the vqcache files from being overwritten each time.

vQmod 2.1.5 has a pseudo-cache that I added also to prevent this. It basically caches the files for 3 secs by default then allows normal replacement again. This 3 sec time covers the time it usually takes for all the ajax callbacks to complete.

But I've also seen this issue happening on servers without vQmod. Simply due to their being a lot of options and a ton of ajax callbacks so it just times out or takes a longer time than you give it to load.

We need to fix it from the core and I guess the front running idea for that is to change it from open fields, to individual ajax entries...


FROM THIS:
Image

(full image)

TO THIS:
Image

(full image)

Re: Options keep vanishing

Posted: Fri Dec 02, 2011 8:43 pm
by Reverend2100
... *nods wisely*

:)

Re: Options keep vanishing

Posted: Sat Dec 03, 2011 9:36 am
by Daniel
already been improved its in the svn.

might release without order editing system finished.

Re: Options keep vanishing

Posted: Sat Dec 03, 2011 10:56 pm
by Johnathan
Good suggestion, Q, and glad to know it's been fixed, Daniel.

Re: Options keep vanishing

Posted: Sun Dec 04, 2011 1:17 pm
by Cyberwoolf
Daniel wrote:already been improved its in the svn.

might release without order editing system finished.
What files? I'll test it out :D

I do like that option Q. Hopefully there will be an edit button next to the delete ones!

One of my clients makes baskets, so she has a tooon of options to go with each product. I'm in the process of switching her over to OC from Zen cart.

Re: Options keep vanishing

Posted: Tue Feb 07, 2012 11:56 pm
by picstart
did anyone find the files and test them this is causing us major headache with our client

Re: Options keep vanishing

Posted: Wed Feb 08, 2012 1:59 am
by Qphoria
I should note, my proposed fix is not the way it was changed in SVN.
Daniel changed the ajax load to simply preload the default values. This will fix the vQmod ajax collision.

There still may be a problem with a LOT of options due to max post size and page execution times... so in the long run my way may be best, but it isn't done that way at this time.

The solution for now is to simply follow this:
http://forum.opencart.com/viewtopic.php ... 60#p218360

Re: Options keep vanishing

Posted: Wed Feb 08, 2012 3:42 am
by Brook
I have OpenCart 1.5.1.3 installed with vqMod 2.1.5 and the Options Boost Module. Works great, but like others Product Option Values keep disappearing randomly. I have followed all the links and read all the posts that I can find on this subject.

Here is what I have tried so far:
I have implemented the home\index.php $vqmod->useCache = true; suggestion
I have changed the vqmod\vqmod.php code line to public $useCache = true;
I have changed the vqmod\vqmod.php code line from ((filemtime($writePath) + 3) to ((filemtime($writePath) + 10)
Still not confident that my install is not having Product Options disappear...

I would be very interested in trying out the "New Method Proposed" mentioned in this thread by Q,
Adding a Product Option Value one at a time, by clicking the "Add Option Value" Button

Does anyone have the code that they can post to redesign the Admin Product Page via Q's "New Method Proposed" vs. the "Current Way"? What code changes need to be made?

Thank you for your help.

Re: Options keep vanishing

Posted: Wed Feb 08, 2012 4:30 am
by picstart
can see from an above post that a fix has been put in the svn , have now discovered how to access the svn , what files do i need to replace to effect a cure.

Re: Options keep vanishing

Posted: Wed May 02, 2012 4:22 pm
by Josign
Hi, I got this problem yesterday but I cannot follow your answers on how to do.
I dont think I have vQmod - this is something that you have to add to your Opencart, right? Otherwise, how do I know if I have that?
I have Opencart 1.5.2.1 and use Theme Global as theme. I have a very simple shop and havent done much to it besides the designs. I have only added 4 options myself that I use and now they just arent there. Is there someone that can help me?

Thank you
J
www.josignart.se