Product Images, Renaming Component & Invoice Files

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #290811

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.6
-- PHP version -- : 7.1.15
-- Browser(s) name and version -- : Firefox 59.0.2

Dear HikaShop team,

Thank you for your free HikaShop Starter e-commerce solution. I plan to upgrade to the Essential version of HikaShop, but I have three issues I hope can be resolved.

1. I have noticed that products that have a file attachment for download, in my case a PDF file, with a virtual product (no weight and quantity set to unlimited) does not have its product image displayed in the order e-mail notification (see the attached images numbers 1 and 2.) I thought this may be the result of the product being virtual, but a virtual product without a file attachment for download (which is the second product item shown in the order e-mail notification) has its image displayed. What is the problem here do you think?





2. As you know, it is possible to rename a component through the language file allowing the name to be displayed in a more relevant way. I Changed HikaShop to “Web Shop” and other names of components such ACY Mailing to “NewsMail” and JCE Editor to “Content Editor.” The name changes work fine when displayed in the drop down menu for components, in the backend of the site (see attached image number 3.) However, when selecting my Web Shop link to access HikaShop all the name changes I have made for various components, including HikaShop, return to the original component name when I am viewing or accessing all aspects of HikaShop in the backend (see attached image 4.) All the name changes I have made to the components keep their changes when I access all the other backend components and extensions. Only when I access HikaShop, the component name changes return to their original name. What could be the problem here?





3. I have two identical test sites with Hikashop installed, on two different servers; one is GoDaddy the other SiteGround. Periodically, I get an automated e-mail message from GoDaddy with a malware alert in relation to the attachinvoice plugin (see attached image number 5.) I do not get these alerts with SiteGround only on Godaddy. I have not updated the attachinvoice plugin, since buying it almost 3 years ago. Do I need to get an update? Alternatively, could it be that the malware alert is a false positive?



Thanks again for your e-commerce solution and I hope these issues can be resolved.

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #290814

Hi,

1. That's indeed a bug. I've added a patch on our end in order to fix that.
It apparently appears only when the images have images AND variants.
You can download the install package on our website and install it again on yours to get the patch added or wait for the next update of HikaShop.

2. So concretely, how do you translate them ? What do you add where ?

3. It's indeed false positives.
I suppose that these are flagged because they contain some complex regular expressions and/or code which the security algorithm has doubts about.

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #290958

Hello Nicolas,

Thanks for your reply. In relation to Issue 2, the language file edit is done through the language overrides in the backend, Extensions > Language(s) > Overrides and then: Filter: English (en-GB) –Administrator. I simply changed the Value for the Constant HIKASHOP from 'HikaShop' to 'Web Shop.' The same method was used for other components.

Could you tell me if the patch, for the image issue, is added to current HikaShop 3.4.0.? As HikaShop 3.3.0 version is not available from your site.

Thank you for your continuing support.

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #290977

Hi,

1. I don't see the issue on my end:
monosnap.com/file/pVXMVlPVVMTK32fzRHJ5RDLnJsKhaR
I'm able to translation acymailing to mail marketing and it keeps it like that even for HikaShop.
This probably indicates that you have some errors in your translation files.
Activate the "debug language" setting of the Joomla configuration and go to the HikaShop component in your backend. Then, look at the language files debug data at the bottom of the page to find out which lines of which files has an error.

2. Yes, it is in the 3.4.0. The auto update is not activated yet for it. We're still waiting for more feedbacks on it. We hope to activate the auto update for it next week.

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #291171

Hello Nicolas,

Thanks for your reply. The results of the language debug are shown below. I see that 2 hikashop language files have "not loaded" before them, which I think is normal for hikashop. 2 other hikashop language files are loaded but for some reason the only other "not loaded" file is acymailing.







Do you have a similar output when you "Debug Language"? Would there be solution to my problem? Thanks for your continuing support

Regards,

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291183

Hi,

It's normal that these files are not loaded.
The main import file to look at is the file \administrator\language\overrides\en-GB.override.ini
That's where the overrides are stored by Joomla for backend translations.

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #291268

Hello Nicolas,

Thanks for your reply. You are partially right concerning the language overrides, but with some testing I discovered that the problem comes from when an override is added for the front end of the site from the back end: Extensions > Language(s) > Overrides - English (en-GB) –Site.

I thought specific overrides were causing this problem, but if even one override is added to the Site overrides then the original name, of a renamed component, is displayed on the component drop down menu, in the back end, when the HikaShop component is selected (as described in point 2 at the top of this thread).

Could you try again renaming a component and then adding any Site override at your end to see if the same problem happens? I have noticed this for some time as I have many site overrides. The possible reason for it not being noticed is that users of HikaShop perhaps don’t change the names of components through Administrator overrides along with having Site overrides.

Regards,

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291303

Hi,

That's because HikaShop only has a frontend language file and use it for both the backend and the frontend (so that it is easier for translators as they only have one file to translation and no duplicates around dozens of files).
Thus, when it loads the frontend language file on the backend it also loads the frontend overrides.
Apparently, Joomla remove the translation overrides from the backend override at that point.
So the easy solution is to add your backend overrides to the frontend override file as well.

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #291346

Hello Nicolas,

Thank you for your reply. The display of renamed components is now resolved when accessing HikaShop and thanks for the patch in HikaShop 3.4.0 for displaying a product image with variants and a file attachment in order notification e-mail. :)

One issue I forgot to include is related, again, to a variant product with a file attachment. I have a virtual product with 4 variants and all have file attachments, in the form of a PDF that can be downloaded. One of the virtual product’s file attachments is free (not subject to cost) and is displayed with the product description in the shop’s frontend (see image 002 below). As the other three products’ file attachments are available after an order is confirmed (payment is made) the files are not displayed with their product descriptions (see image 001 below).

When the product with the free file attachment is selected the link for the file to download is displayed, however, when selecting one of the other product’s variant, after the product with the free file attachment has been selected, the link for the free file attachment remains on the page with the other products’ description (see image 003 below).

I’m not sure if this is a bug with HikaShop or problem with my template. Could you see if you have a similar problem at your end? Thanks for the continuing support.

Regards,

Mr B

Attachments:
Last edit: 6 years 7 months ago by Jerome.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291362

Hi,

Well, it's half a bug. It's done like that on purpose so that there is no need to have too much HTML on the page as an optimization.
If you set a free file for each variant of the product, you should see that the file will switch correctly.
Only for the variants without files, it will keep what was displayed before.

To change that, you need to edit the file "show" of the view "product" via the menu Display->Views and change the code:

<?php
		}

		if(!empty($variant->files)) {
			$freeDownload = false;
			foreach($variant->files as $file) {
				if(!empty($file->file_free_download)) {
					$freeDownload = true;
					break;
				}
			}
			if($freeDownload) {
?>
	<div id="hikashop_product_files_<?php echo $variant_name; ?>" style="display:none;">
		<fieldset class="hikashop_product_files_fieldset">
			<legend><?php echo JText::_('DOWNLOADS'); ?></legend>
<?php
				foreach($variant->files as $file) {
					if(empty($file->file_free_download))
						continue;

					if(empty($file->file_name))
						$file->file_name = $file->file_path;
?>
			<a class="hikashop_product_file_link" href="<?php echo hikashop_completeLink('product&task=download&file_id=' . $file->file_id); ?>"><?php echo $file->file_name; ?></a><br/>
<?php
				}
?>
		</fieldset>
	</div>
<?php
			}
		}
to:
<?php
		}
?>
	<div id="hikashop_product_files_<?php echo $variant_name; ?>" style="display:none;">
<?php
		if(!empty($variant->files)) {
			$freeDownload = false;
			foreach($variant->files as $file) {
				if(!empty($file->file_free_download)) {
					$freeDownload = true;
					break;
				}
			}
			if($freeDownload) {
?>
		<fieldset class="hikashop_product_files_fieldset">
			<legend><?php echo JText::_('DOWNLOADS'); ?></legend>
<?php
				foreach($variant->files as $file) {
					if(empty($file->file_free_download))
						continue;

					if(empty($file->file_name))
						$file->file_name = $file->file_path;
?>
			<a class="hikashop_product_file_link" href="<?php echo hikashop_completeLink('product&task=download&file_id=' . $file->file_id); ?>"><?php echo $file->file_name; ?></a><br/>
<?php
				}
?>
		</fieldset>
<?php
			}
		}
?>
	</div>
<?php
That way, it will be a bit less optimized but it will hide the area when the variant has no free downloads.

Last edit: 6 years 6 months ago by nicolas.

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #291423

Hello Nicolas,

Thanks for your reply. I have applied the code edit you have posted above for View (product) and File (show), but this does not produce the expected result, meaning the free file for download is shown with ALL the variants and puts the web page’s content in all one column, in the centre of the page.

Could you recheck the code you have provided? I applied the edit by replacing the code you suggested from line 344 to line 376 in the View & File : product / show.php. I expected that all the download files for the products would be displayed correctly, if all the file attachments for the product variants were free, as you have stated.

Regards,

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291424

Hi,

The modification is correct as far as I can see. Could you provide a link to such page on your website so that we could have a link at the situation there and analyze it ?

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

  • Posts: 20
  • Thank you received: 1
6 years 7 months ago #291542

Hello Nicolas,

Thanks for your reply. I have sent an e-mail tilted – “Admin Access - Product Images, Renaming Component & Invoice Files Thread” to you ( This email address is being protected from spambots. You need JavaScript enabled to view it.) with administrator access to the backend of the site. I have provided further info in the e-mail.

Regards,

Mr B

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

  • Posts: 12953
  • Thank you received: 1778
6 years 7 months ago #291607

Hello,

I just tested it on my end and it worked fine.

I also tried to add that customization through your website and it seems like your template is preventing that customization from applying correctly.
Can you test it with one of Joomla's default front-end template ?

Thank you.

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

  • Posts: 20
  • Thank you received: 1
6 years 6 months ago #291767

Hi Nicolas/Mohamed,

Thanks for your reply. I tried the Joomla! native template (protostar) and the same problem happens:



Therefore it must be related to something other than my template. Do you have any other thoughts as to what could be causing the problem?

Regards,

Mr B

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 6 months ago #291885

Hi,

There was a typo in the code change I proposed.
I've fixed it in my message and in your website and it's working fine as far as I can see.

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

  • Posts: 20
  • Thank you received: 1
6 years 6 months ago #292164

Hello Nicolas,

Thanks for your reply and the fix for displaying products with a free PDF file variant that also has paid PDF file variants. :) One unintended issue with this, I see, is the status of the file that is for download. In the back end of the site (also if a customer views their order status in the front end) a free and paid file have the same status for download. I would assume a free file for download would not have/display a restriction “Your order status does not permit downloads”.



Even though the free file is displayed for download on the product details page in the front end, this description could cause some confusion when an order is made. Do you think there is a way to remove the “Your order status does not permit downloads” description from a free file download?

Thanks again for your great product and support.

Regards,

Mr B

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 6 months ago #292171

Hi,

A free download is not supposed to be displayed in the order at all.
In the order, you should only see the paid downloads. The free downloads are only on the product page.
Do either there is some customization to change that, or there is a bug.
Could you provide the order number of the order where you have that issue ?

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

  • Posts: 20
  • Thank you received: 1
6 years 6 months ago #292427

Hello Nicolas,

Thanks for your reply. The order reference is J8 and the product is Event/Seminar, both of which you can be found in the back end of my site. The example order details above (#292164) is from a different test site.

You can still gain Admin access to the original test site, with order reference is J8, using the username and password I sent to you via the hikashop forum e-mail address, on 19.04.18, with the title: “Admin Access - Product Images, Renaming Component & Invoice Files Thread.” You could also create and order, through the shop, for the Event/Seminar variant products, which have free and paid downloads, if this helps with finding the problem.

Regards,

Mr B

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 6 months ago #292663

Hi,

We've found out why the free downloads were displayed on orders.
We've added a patch for that on our end.
You can download again the install package on our website and install it on yours and you'll get the patch for that.

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

Time to create page: 0.151 seconds
Powered by Kunena Forum