VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: chill_e_g on August 09, 2016, 13:15:57 PM

Title: Generic Child variant not redirecting
Post by: chill_e_g on August 09, 2016, 13:15:57 PM
Help with this please not sure where to start. VM 3.0.16

Please check this url : http://test.razostyle.co.za/wc/index.php/online-shop
Choose size and see the url changes correctly, but the page does not refresh. If you refresh the browser the details page loads correctly. Any ideas please, I am sure I saw this working and now it is not.
Title: Re: Generic Child variant not redirecting
Post by: Milbo on August 09, 2016, 22:49:13 PM
There is one wrong line in vm3.0.16 layout, which prevents this. The simpelst is to use the new vm3.0.17.4 http://dev.virtuemart.net/projects/virtuemart/files

or remove

vmJsApi::addJScript('ajaxContent',$j);

in FE/com_virtuemart/views/category/tmpl/default.php
Title: Re: Generic Child variant not redirecting
Post by: chill_e_g on August 10, 2016, 07:03:25 AM
Thanks for the reply, unfortunately the upgrade did not fix the issue.

Please confirm path to file to edit as suggested "in FE/com_virtuemart/views/category/tmpl/default.php" Where is "FE"?

I checked in MYTEMPLATE/com_virtuemart/views/category/tmpl/default.php but no code exists? Please assist. Thanks.
Title: Re: Generic Child variant not redirecting
Post by: GJC Web Design on August 10, 2016, 10:41:06 AM
FE means front end... 

ideally you copy components/com_virtuemart/views/category/tmpl/default.php to

templates/MYTEMPLATE/com_virtuemart/html/category/default.php and do your change there

note this path is totally different from yours below.. this is the correct over ride path
Title: Re: Generic Child variant not redirecting
Post by: chill_e_g on August 10, 2016, 11:34:41 AM
Thanks, but still have the problem with no redirect on Child Variant http://test.razostyle.co.za/wc/index.php/online-shop
I dont find the code referred to by Milbo
Title: Re: Generic Child variant not redirecting
Post by: GJC Web Design on August 10, 2016, 14:45:30 PM
as Max says..

QuoteThe simpelst is to use the new vm3.0.17.4 http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: Generic Child variant not redirecting
Post by: chill_e_g on August 10, 2016, 14:51:37 PM
Quote from: chill_e_g on August 10, 2016, 07:03:25 AM
Thanks for the reply, unfortunately the upgrade did not fix the issue.

I have fixed this by downgrading to 3.0.14

Title: Re: Generic Child variant not redirecting
Post by: Dragoner on August 12, 2016, 08:24:03 AM
Hi,

I try remove this code in VM 3.0.16.
vmJsApi::addJScript('ajaxContent',$j);
not working

Then i try upgrade to VM 3.0.17.4 and if i click on product variant ehop freeze and java script make error.

http://lepidla.esovicka.cz/index.php/e-shop/tmely-pro-opravy-kovu-1

Joomla version 3.5.1.

Thanks, David
Title: Re: Generic Child variant not redirecting
Post by: Dragoner on August 12, 2016, 09:18:31 AM
I found it!

I my template in category view. I paste this code to end of document


<?php 
$j 
'jQuery(document).ready(function($) {
Virtuemart.product(jQuery("form.product"));

$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length && !$(this).find(".no-vm-bind").length) {
var id= $(this).find(\'input[name="virtuemart_product_id[]"]\').val();
Virtuemart.setproducttype($(this),id);

}
});
});'
;

$j "Virtuemart.container = jQuery('.produkt');
Virtuemart.containerSelector = '.produkt';"
;

vmJsApi::addJScript('ajaxContent',$j);

echo 
vmJsApi::writeJS();
?>



And now, it working.
Title: Re: Generic Child variant not redirecting
Post by: fastpat27 on October 11, 2016, 18:35:50 PM
Hi

I seem to have the same problem after updating from 3.0.14 to 3.0.18. I tried deleting the Line Milbo suggested but made no difference. Tried installing .17 and then .16 but still no difference. I have to take it back to .14 to get it working again. Would it perhaps not be compatible with my template now after the updates?

Anyone any ideas.

Thanks
FP

Joomla 3.6.2
Title: Re: Generic Child variant not redirecting
Post by: fastpat27 on October 18, 2016, 22:08:21 PM
Quote from: jenkinhill on October 13, 2016, 00:15:55 AM
See the important information at the end of the news release:  http://virtuemart.net/news/latest-news/477-release-of-3-0-18-connecting-the-loose-ends