Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: Ajax load of child product breaks template

Ajax load of child product breaks template 10 years 6 months ago #6585

I have installed cleanmart 1.1 and I am finding that the ajax loading of the child product breaks the template.

I am not sure if it is jquery related but it is worth knowing that I found that the zoom function and some other jquery functions were not working because of a conflict and I installed Jquery easy plugin to resolve that (which worked)

The site is offline but you can access frontend with user:shop and pass:shop

amosunglasses.com/

Only one product in the shop is using child product ajax call, it is here:

amosunglasses.com/index.php/shop/sunglasses/create-your-own-detail#.UkVIRYZkN8E

Any help appreciated.
The administrator has disabled public write access.

Ajax load of child product breaks template 10 years 6 months ago #6589

Hi,

It is sad to hear that Ajax loading is creating this problem in your joomla framework.

Some joomla template are doing more than they are supposed to.
Looks like; either your joomla template or a plugin (i can't be sure who is guilty), is using a function something like:
jQuery(document).ajaxStop(function(){

to define a function after an AJAX request is completed. In the new jQuery versions, the ajaxStart and ajaxStop functions are attached the "document".. Therefore, they are valid for all AJAX loadings. It is kind of hard to explain this to you.
But there are 2 possible solution:

1- Find the way to disable the AJAX loading functionality that comes with your joomla template (i hope will also eliminate the ajaxStop function, which is the main reason that breaks the layout within our VM template after the AJAX loading is completed.)

2- Eliminate the AJAX loading within our VM Template, therefore; there will be no AJAX loading, so there will be no broken layout.


To disable AJAX loading within our VM Template.
A - open this PHP file:
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php

find and delete these lines:
$doc = JFactory::getDocument();
$doc->addScriptDeclaration('
	jQuery(document).ready(function(){
		jQuery.fn.FlexiblNeighborsdAjax();	
	});  
');

B- Open this PHP file:
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default_addtocart.php

find and delete these lines:
$doc = JFactory::getDocument();
$doc->addScriptDeclaration('
	jQuery(document).ready(function(){
		jQuery.fn.FlexibleChildAjax();	
	});  
');


The AJAX loading will be disabled and you will be good to go.

After your inquiry, i decided to create a new plugin parameter to disable the AJAX loading easily through "Flexible VM2 Template" plugin. This patch will be available in CleanMart v1.2

Regards
Support & Development
Last Edit: 10 years 6 months ago by Support.
The administrator has disabled public write access.

Ajax load of child product breaks template 10 years 5 months ago #6609

Thanks very much for your help.

I disabled the Jquery easy plugin and the ajax no longer breaks the template. However there must be a jquery conflict somewhere as the jquery/ajax does not work at all.

You are right, my template is using a lot of Jquery as it's based on the T3 system by joomlart.
I'll have to look to see what is causing this jquery conflict. Thanks

Quick Update: by enabling JqueryEasy plugin again and then selecting "Disable Mootools where possible" in the settings, the site seems to work ok now. The Ajax loading animation does not seem to work but it does look like the child products are being loaded by ajax.

So I'm happy with that.
Last Edit: 10 years 5 months ago by Rupert Griffiths.
The administrator has disabled public write access.

Ajax load of child product breaks template 10 years 5 months ago #6610

Further Update : still trying to resolve this as the previous solution seems to have some negative effects.

IT seems to be a jquery conflict.

1) If I run the cleanmart template on this joomlart template the zoom does not work, or the picture enlarge, or the ajax. It works fine on my other templates.

2) If I run cleanmart template with jquery easy (v1.8) then the zoom works and the photo enlarge, but the ajax reload breaks template.

3) If I run cleanmart template with jqueryeasy (v1.8) AND mootools disabled in shop then the zoom works (but not shown in "inner"), the enlarge photo does not work, but the Ajax does NOT break the template - it works!

I guess the only solution for now is option 2 and disable the ajax as you suggest, but I really like this function. Maybe this additional information about jquery and mootools gives you an idea.

Thanks
Last Edit: 10 years 5 months ago by Rupert Griffiths.
The administrator has disabled public write access.

Ajax load of child product breaks template 10 years 5 months ago #6623

Hi,

Have you tried to drop the jQuery version down to jQuery1.6?
Enable the EasyJquery and drop the jQuery version. What happens if you select 1.6?

Our Template has been designed to work with jQuery1.6 (which is the official jquery version what Virtuemart Component requires ).

Regards.
The administrator has disabled public write access.
Time to create page: 0.135 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo