Override w/ Associated Module+Related Products+Options Stopped Working-No Stock?

  • Posts: 5
  • Thank you received: 3
8 years 5 months ago #258489

-- url of the page with the problem -- : www.thevelvetcactus.com/baton-rouge/cate...ate-your-own-package
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5
-- Browser(s) name and version -- : Chrome 55.0.2883.95

Hello,

I updated my client's site a few months back and made several customizations to the display views and created a template override for one of the products (Create Your Own Package) so that a set of related products would show above a set of Add On Options. The customer could enter a quantity for the related products & add to cart, stay on the page and then select their add on options below and add all of those options to the cart at once. The base product is free, and the price would calculate starting from $0.00 based on the options selected. I recently updated Joomla from 3.2 to 3.3.6 because of an error with an outdated plugin (nothing to do with Hikashop). After this update, "No Stock" began to appear in place of product options across the site, while products without options were working just fine. If I disable the "related products" module under Configuration->Product->Modules under product page, then all of the product options show up again on all products on the site, except I then lose those related products I need on the "Build Your Own Package" product. I have no idea what is causing this. Any help is appreciated.

-Jennifer

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
8 years 5 months ago #258507

Hi,

As we don't have that problem by default, it must be related to the way the customizations have been done to the view files of the product view.
I would recommend to rename the files in the folder templates/YOUR_TEMPLATE/html/com_hikashop/product one by one in order to identify which one is causing the problem.
Then, compare that file with the original file of HikaShop in order to see what are the customizations in it.
That will give a better understanding of what's going on.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 3
8 years 5 months ago #258548

Nicolas,
Thank you so much for your quick reply! Per your instructions, I narrowed it down to the show.php file and was able to fix the issue. In the rare case anyone else has this same issue, I'm sharing my solution. In the show.php file I had originally moved the code for the Related Products Module to the very top of the page.

<div class="hikashop_submodules" id="hikashop_submodules" style="clear:both">
<?php
	if(!empty ($this->modules) && is_array($this->modules)) {
		jimport('joomla.application.module.helper');
		foreach($this->modules as $module) {
			echo JModuleHelper::renderModule($module);
		}
	}
?>
	</div>
While this previously worked fine, it caused a no stock error when I updated Joomla to 3.3.6. I reverted back to the original show.php and added the following code to my template.css to move the related products above the options.
div#hikashop_product_create_your_own_page {
    display: flex;
    flex-direction: column-reverse;
}
Note to anyone following this: This code is specific to a single product on my site. You'll need to replace the hikashop id above with the one your product uses ie. #hikashop_product_YOUR PRODUCT CODE_page

Hope this helps anyone else who wants to display the related products above options on a single product page.

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum