Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Generic Child Variant dropdown doesn't work
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Generic Child Variant dropdown doesn't work

Generic Child Variant dropdown doesn't work 7 years, 5 months ago #30073

Hello, i'm trying to use Generic Child Variant at a product but nothing loads in dropdown at product details page.

But if i use protostar it works
I cheched with chrome console and i get this error
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check ...
Last Edit: 7 years, 5 months ago by takis1984.

Re: Generic Child Variant dropdown doesn't work 7 years, 5 months ago #30110

  • usersmart1
  • OFFLINE
  • Moderator
  • Posts: 1364
  • Karma: 20
Hi Guys,

In the file /public_html/templates/sj_market/html/com_virtuemart/productdetails/default.php and changed:
1. in begin of file:
Please find:
<?php
defined('_JEXEC') or die('Restricted access');

$app = JFactory::getApplication('site');
$template = $app->getTemplate();

$assets_img = JURI::root().'templates/'.$template.'/images/rating';

$ratingModel = VmModel::getModel('ratings');

// addon for joomla modal Box
//JHTML::_('behavior.modal');

/* Let's see if we found the product */
if (empty($this->product)) {
echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '<br /><br /> ' . $this->continue_link_html;
return;
}
vmJsApi::jPrice();
vmJsApi::cssSite();
echo vmJsApi::writeJS();
?>
====> Edit to:
<?php
defined('_JEXEC') or die('Restricted access');

$app = JFactory::getApplication('site');
$template = $app->getTemplate();

$assets_img = JURI::root().'templates/'.$template.'/images/rating';

$ratingModel = VmModel::getModel('ratings');

/* Let's see if we found the product */
if (empty($this->product)) {
echo vmText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '<br /><br /> ' . $this->continue_link_html;
return;
}

echo shopFunctionsF::renderVmSubLayout('askrecomjs',array('product'=>$this->product));

// addon for joomla modal Box
//JHTML::_('behavior.modal');

vmJsApi::jDynUpdate();
vmJsApi::addJScript('updDynamicListeners',"
jQuery(document).ready(function() { // GALT: Start listening for dynamic content update.
// If template is aware of dynamic update and provided a variable let's
// set-up the event listeners.
if (Virtuemart.container)
Virtuemart.updateDynamicUpdateListeners();

}); ");

if(vRequest::getInt('print',false)){ ?>
<body onload="javascript:print();">
<?php } ?>

2. in bottom file, please find:
<?php // event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent; ?>

</div>

====> Edit to:

<?php // event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent; ?>

<div class="clear"></div>
<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;
echo vmJsApi::writeJS();
?>
</div>


<script>
// 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.
*/
// If this <script> block goes right after the element itself there is no
// need in ready() handler, which is much better.
//jQuery(document).ready(function() {
Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view';
//Virtuemart.container = jQuery('.main');
//Virtuemart.containerSelector = '.main';
//});
</script>

If you need to check directly, please provide us your FTP account.

Thanks & regards!

Re: Generic Child Variant dropdown doesn't work 7 years, 5 months ago #30118

Thanks for the answer but we don't see the same file.
My default.php is different. My template is sj_shoppyshop and your file is probably from sj_market

Thank you

Re: Generic Child Variant dropdown doesn't work 7 years, 5 months ago #30119

I sent my ftp account to access the website
Thank you

Re: Generic Child Variant dropdown doesn't work 7 years, 5 months ago #30220

  • usersmart1
  • OFFLINE
  • Moderator
  • Posts: 1364
  • Karma: 20
Hi Guy,

Please open file templates\sj_shoppystore\html\com_virtuemart\productdetails\default.php

find this line:

<div class="clear"></div>
</div>
<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;
echo vmJsApi::writeJS();
?>


edit to:

<div class="clear"></div>
<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;
echo vmJsApi::writeJS();
?>
</div>

Thanks & regards!
  • Page:
  • 1
Time to create page: 0.36 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes