VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Topknotch on November 29, 2015, 19:09:00 PM

Title: Children
Post by: Topknotch on November 29, 2015, 19:09:00 PM
Joomla 2.5.28 - virtuemart 3.0.10.
Bit of an odd one this -
On the flypage where a 'visitor' can choose a 'variant' of the product i.e say - small, medium , large .
When they are priced differently , the price changes to show them BUT if they then decide to change their mind and go with the original one, it dosent change back.
I thought originally this was a template issue but I put Beez on and it was the same. I have even disabled all modules in case it was one of them affecting it and it is still the same.
Any ideas greatly appreciated.
Thanks

Title: Re: Children
Post by: GJC Web Design on November 29, 2015, 23:02:27 PM
any js errors?  vmprices.js handles this...  btw vm3.0.12 is the current stable
Title: Re: Children
Post by: Topknotch on November 30, 2015, 10:19:37 AM
This is what it is showing - Is noone else having this problem then  ?

Use of getAttributeNode() is deprecated. Use getAttribute() instead.
   

...xt");}};}n=null;if(document.createElement("div").getAttributeNode("id")){Element...

mootools-core.js (line 343)
TypeError: $.ui is undefined
   

var proto = $.ui.autocomplete.prototype,

   
jquery....er=8996 (line 11, col 5)
Use of getPreventDefault() is deprecated. Use defaultPrevented instead.
   

...eturn t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=...

jquery.min.js (line 2)
GET http://www.**/anglia/carp/...-product-1-detail.html?tmpl=component&format=raw
   
200 OK
      592ms   
jquery.min.js (line 2)
GET http://***.co.uk/anglia/carp/tester?tmpl=component&format=raw
   
500 View not found [name, type, prefix]: category, raw, virtuemartView
      148ms
   
Title: Re: Children
Post by: GJC Web Design on November 30, 2015, 11:30:31 AM
have u updated to 3.0.12?
Title: Re: Children
Post by: Topknotch on November 30, 2015, 11:42:50 AM
Yes I have, sorry forgot to mention that.
Title: Re: Children
Post by: GJC Web Design on November 30, 2015, 11:50:20 AM
from the debug above it looks like a mootools/jquery conflict although may be only warnings

the problem is I assume this

http://***.co.uk/anglia/carp/tester?tmpl=component&format=raw

it gives a 500 server error

you need to find this error in the logs and solve
Title: Re: Children
Post by: Topknotch on December 05, 2015, 10:18:06 AM
The problem is the url's produced are incorrect , for example -
Main product page with the variants of different prices -
http://www.***.co.uk/anglia/shooting/rifles/accessories-1/bisley-dummy-detail.html
click on a variant and the url changes as it should -
http://www.***.co.uk/anglia/shooting/rifles/accessories-1/bisley-dummy-4-detail.html
price changes as it should as well, however then try another variant and the url becomes -
http://www.***.co.uk/anglia/shooting/rifles/accessories-1/1/2lb%20%20Green%20Puppy-detail.html

as you can see the url is completely wrong, it has insterted %'s and it actually should be -
http://www.***.co.uk/anglia/shooting/rifles/accessories-1/bisley-dummy-1-detail.html
Is no one else experiencing these issues ? ??
This is obviously really bad and any help would be greatly appreciated.
Thanks
Title: Re: Children
Post by: GJC Web Design on December 05, 2015, 12:28:40 PM
%20 html encode for a space

where or what is 2lb  Green Puppy  ?

it is very hard to help u without real urls

Are these simple customfield or children or variants?

what one on the VM demo site matches your set up?
Title: Re: Children
Post by: Topknotch on December 05, 2015, 13:31:20 PM
Hi, yes sorry I am setting up a test site now for you to view.
In the mean time -
Please see images attached, one for the custom field, the other showing the variants on the actual product page.
As you will see the 1/2lb green puppy is the name of one of the variants, which obviously shouldn't be in the url
I will send you links shortly to the test site.
Title: Re: Children
Post by: GJC Web Design on December 05, 2015, 13:52:44 PM
but your on VM3.0.9!  VM is regularly updated for a reason .. security and bug fixes..
If something doesn't work the first thing to check is on the latest stable release which is VM3.0.12!

This could easily have been fixed already...

I would never use forward slashes in any data input.. may be the problem
Title: Re: Children
Post by: Topknotch on December 05, 2015, 14:24:08 PM
wooooo there !! as I mentioned in the post above I have updated to the latest on the MAIN TEST site, those images were taken from the LIVE MAIN site.
I apologise for the confusion but I have updated and the problem still exists, the error exists whether there are /'s or not, so that is not the problem.
I will pass the NEW TEST SITE information on shortly, I cannot pass the current MAIN TEST site information on as it is currently being worked on.
Thanks
Title: Re: Children
Post by: Topknotch on December 05, 2015, 17:15:57 PM
ok , here is the NEW test site.
Running 3.0.12, showing same errors - http://topknotch-solutions.co.uk/testatandg/
You will see on the front page I have created a new product called - tester with variants, all the drop down variants are different prices.
As you will also see you can only change the price once, it wont change again after one change.
The URL problem dose appear to be linked to the /'s being used but that's odd as they shouldn't be in the url any way.
Hope that makes sense and I appreciate any help.
Title: Re: Children
Post by: Topknotch on December 06, 2015, 21:07:41 PM
any ideas on this ? anyone ?
Thanks
Title: Re: Children
Post by: GJC Web Design on December 06, 2015, 21:33:58 PM
why are u using multi-variants when you only have 1 level of choice?

do you need stocking?

Why not simple cart variants or simple parent/child?

u can see here all the possible permutations ->  http://test2.gjcwebdesign.com/joomla3/default-products

the only one using "C" variants is the  last multi variant and it works fine
Title: Re: Children
Post by: Topknotch on December 06, 2015, 23:22:50 PM
Hi,
Yes they need to be stockable.
Followed these rules http://virtuemart.net/news/latest-news/468-virtuemart-3-0-6-with-completely-redesigned-multi-variants
Thanks
Title: Re: Children
Post by: GJC Web Design on December 07, 2015, 12:28:13 PM
...  out of ideas.. they work for me.. the only dif I can see is there is no spaces etc in the test products

have u tried with just a word -- no spaces
Title: Re: Children
Post by: Topknotch on December 07, 2015, 13:40:42 PM
have now and still its the same, I cant work it out at all
Title: Re: Children
Post by: Topknotch on December 08, 2015, 20:00:44 PM
Ok I have paid someone to fix this issue.
Now, as we all know overides must always be used incase of upgrading.
However, this guy has only modified the core -
component/virtuemart/sublayout/customfield.php
The adapted file can be downloaded here - https://www.dropbox.com/s/kbcdi0vz3i3cz8w/customfield.php?dl=0
Obviously I pointed out that whenever an upgrade is done it will be overwritten and he just said 'yes'
Unfortuanately I am not a PHP wiz by a long way, so if someone has a few mins to scan through the attached coding they might see what has been altered and why the problem excisted in the first place, also if possible how I can create an over ride for it.
Many many thanks

Title: Re: Children
Post by: Milbo on December 10, 2015, 11:32:00 AM
 
Quote from: Topknotch on December 08, 2015, 20:00:44 PM
The adapted file can be downloaded here - https://www.dropbox.com/s/kbcdi0vz3i3cz8w/customfield.php?dl=0
Thank you, I take a look on what he did.

Quote from: Topknotch on December 08, 2015, 20:00:44 PM
Obviously I pointed out that whenever an upgrade is done it will be overwritten and he just said 'yes'
This is wrong, any files in the sublayouts folder are OVERRIDEABLE! http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
Title: Re: Children
Post by: Milbo on December 10, 2015, 11:41:15 AM
I cannot follow this fix. When I go on your test page to http://topknotch-solutions.co.uk/testatandg/home-image/tester-with-variants-detail.html

Then I get
Uncaught ReferenceError: mobilecheck is not defined

=> when the js is broken, the whole js stops,... old js rule
Title: Re: Children
Post by: Topknotch on December 10, 2015, 16:29:24 PM
Hi,
Yes that error was always there, it is quite strange as I believed it to be a JS error = vmprices.js, but the fix he provided didn't even touch that and he only altered the customfield.php , which I believe was only added in version 3.0.12 anyway ?
I have put the old customfield.php back on the test site so you can see what the error was originally doing.
Thanks
Title: Re: Children
Post by: Topknotch on December 13, 2015, 20:02:29 PM
can you help me understand what that error means and how to fix it please?
Thanks
Title: Re: Children
Post by: Milbo on December 16, 2015, 19:54:56 PM
" which I believe was only added in version 3.0.12 anyway ? "

it was before in the model and gives now the possibility to adjust it via override.
Title: Re: Children
Post by: Topknotch on December 16, 2015, 20:05:05 PM
QuoteThen I get
Uncaught ReferenceError: mobilecheck is not defined

=> when the js is broken, the whole js stops,... old js rule
It is that area i do not understand.
Thanks
Title: Re: Children
Post by: GJC Web Design on December 17, 2015, 00:04:49 AM
not saying that is the reason .. but as soon as JS hits an error it stops.. nothing after is run

so u must eliminate all JS errors

sometimes your lucky and they occur at the end of the page render and so effect very little.. but ...