Hi, I search and don't find the same error that I have.
I see the demo of multi-variant and I download VirtueMart3.0.6.2_Joomla_2.5.28-Stable-Full_Package for test it in local. Later I update to virtuemart 3.0.6.2 in my web, with Joomla 3.4.0 (with the files of this version) but it don't work fine. I created the multi-variant like I created it in the local (very similar althought it is other version of Joomla) but when I am in my web, in a parent product, I don't go to a child when I select it, it don't do anything.
Is a bug of Joomla 3.4 or I maybe have a problem with jquery o something? Any idea for fix it?
Thanks
EDIT:
I see that the URL don't change when I select a child, if:
alias parent: sport
alias child: sport-1
url parent: myweb/index.php/sport-detail when I select a child not appear myweb/index.php/sport-1-detail int the URL (if I write it manually I access to the child product, but as don't work, don't return to parent)
I see the problem, I used a template and when I see a product, it load
.../templates/mytemplate/html/com_virtuemart/productdetails/default
In virtuemart 3.0.6.2 the file in /components/com_virtuemart/views/productdetails/tmpl/default has change for work this new action, if I use the file of my template, it don't work and if I used the file of virtuemart it work but I don't see it as I like, so I am try modify the file of the template for it work. If I do it, I put it here and If nobody say to me the code.
I solved it:
add this here:
<?php } // Product Packaging END
?>
<?php
//comment if there are something different to it, i add it:
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'onbot'));
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_categories','class'=> 'product-related-categories'));
?>
<?php // onContentAfterDisplay event
and it must at the end:
<?php
echo $this->loadTemplate('reviews');
//new here
// Show child categories
//if (VmConfig::get('showCategory', 1)) {
// echo $this->loadTemplate('showcategory');
//}
$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);
}
});
});';
//vmJsApi::addJScript('recalcReady',$j);
/** GALT
* Notice for Template Developers!
* Templates must set a Virtuemart.container variable as it takes part in
* dynamic content update.
* This variable points to a topmost element that holds other content.
*/
$j = "Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view';";
vmJsApi::addJScript('ajaxContent',$j);
echo vmJsApi::writeJS();
?>
</div>
EDIT: I put it in:
/templates/mytemplate/html/com_virtuemart/productdetails/default
Hello,
I have the same problem, but also the original file productdetails --> default.php doesn't work.
Can you explain to me, where you position the code in your post.
the code he is quoting above is the standard product details default.php
have you checked for JS errors etc?
OK, but the standard default.php doesn't work.
Yes, I checked JS-conflicts, because the Protostar and Beez Templates also doesn't work.
Well as your the only one reporting this what do u think are the chances that it doesn't work generally and all VM users have broken sites?
http://forum.virtuemart.net/index.php?topic=104795.0
http://forum.virtuemart.net/index.php?topic=79799.0