Relocate free download files

  • Posts: 228
  • Thank you received: 8
11 years 1 month ago #164236

-- url of the page with the problem -- : gurtech.guywalderonline.com/index.php/%D...%99%D7%9D/product/3-
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi guys,

I'm trying for some time now to relocate the free download files that are located at the bottom of the product description to a tab of its own. I've successfully created the tab and found the php code for the files at the bottom of show.php file but when I copy the code the site crashes.

This is the code I'm trying to relocate:

<?php

			}
			if (!empty ($variant->files)) {
				$skip = true;
				foreach ($variant->files as $file) {
					if ($file->file_free_download)
						$skip = false;
				}
				if (!$skip) {
	?>
					<div id="hikashop_product_files_<?php echo $variant_name;?>" style="display:none;">
						<fieldset class="hikashop_product_files_fieldset">
							<?php

					$html = array ();
					echo '<legend>' . JText :: _('DOWNLOADS') . '</legend>';
					foreach ($variant->files as $file) {
						if (empty ($file->file_name)) {
							$file->file_name = $file->file_path;
						}
						$fileHtml = '';
						if (!empty ($file->file_free_download)) {
							$fileHtml = '<a class="hikashop_product_file_link" href="' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id) . '">' . $file->file_name . '</a><br/>';
						}
						$html[] = $fileHtml;
					}
					echo implode('<br/>', $html);
	?>
						</fieldset>
					</div>
			<?php

				}
			}

I know people had thought about this and probably made this work but for some reason I can't manage it.
Can someone please help me here?

Thanks in advance,

Guy.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #164237

Hi,

That's potentially because you have an error, thanks to set the Joomla error reporting level to "Maximum".
This will display what is the error, and will allow you to correct it, or at least give us more informations.

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

  • Posts: 228
  • Thank you received: 8
11 years 1 month ago #164328

Hi Xavier,

I've bought the essential package as I saw there's support for additional product fields which will be added as tabs to the page. I've added a field named "advantages" and it did appear in the product page in the backend but on the front end the fields did not appear in a tab but at the top of the page (see attached image).

Is that a bug?

Product page URL: gurtech.guywalderonline.com/index.php/%D...90%D7%99%D7%99%D7%A8

Guy.

Attachments:
Last edit: 11 years 1 month ago by theguy.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #164334

Hi,

So as I can see you are using the show_tabular view of HikaShop.
By default the "specifications" so custom fields, should be displayed in a specific tab.

This is not the case potentially because the view "product / show_tabular" has been edited, or because you are not using our tabs for your display.

Just to be sure you have created your custom fields in the table "product", right ?

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

  • Posts: 228
  • Thank you received: 8
11 years 1 month ago #164467

Hi,

I'm sure I created the custom field as "product" and it does show up on the product page but not in the right place.
I'm using a payed template and from what I've seen there are template overrides for show_tabular.php to show.php and to other files as well. If you wish I can send you the files you need. In addition, I'll contact the template developer and ask him for a solution as well.

What files will you need to inspect this issue?

Guy.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 1 month ago #164474

Hello,
You should probably :
- Save the "show_tabular" file of the "product" view, of your front-end template via "Hikashop->Display->Views" through a "txt" file.
- Remove your customization by using the "delete" button
And test it again.

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

  • Posts: 228
  • Thank you received: 8
11 years 1 month ago #164736

Hi,

Thank you very much for your help. It seems it was indeed a template override and it was solved by the template developer.

Regards,

Guy.

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

Time to create page: 0.090 seconds
Powered by Kunena Forum