Contact form with extra fields issue

  • Posts: 382
  • Thank you received: 77
6 years 2 months ago #297250

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.11

Hi!

There is a feedback page on my site.
If it has extra fields (the type of 'contact') I get an empty h1 on this page.
If I unpublish these extra fields, then I get my title in the h1.

The problem is the variable ($this->product) in the view com_hikashop\product\contact.php

<h1><?php
if(!empty($this->product)) {
	$doc = JFactory::getDocument();
	$doc->setMetaData( 'robots', 'noindex' );
	if(!empty($this->product->images)) {
		$image = reset($this->product->images);
		$img = $this->imageHelper->getThumbnail($image->file_path, array(50,50), array('default' => true), true);
		if($img->success) {
			echo '<img src="'.$img->url.'" alt="" style="vertical-align:middle"/> ';
		}
	}
	echo @$this->product->product_name;
} else {
	echo @$this->title;
}
			?></h1>

$this->product is not empty in my case with extra fields and (!empty($this->product)) is true.
So I get not only an empty h1, but <meta name="robots" content="noindex" /> on my feedback page yet.

Best regards,

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

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

Hi,

Thank you for your feedback. Indeed there is a problem here.
I've made a few patches regarding the display of the title as I found other issues while testing.
So I've generated a new install package with the different patches so that you can easily get them. Download the install package on our website and install it on yours and you'll get them.
Note that if you've made a view override of the "contact" view file, you'll have to remove it and reapply your changes to the new version.

The following user(s) said Thank You: almika

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

  • Posts: 382
  • Thank you received: 77
6 years 2 months ago #297278

Thanks, Nicolas!
Best regards,

Last edit: 6 years 2 months ago by almika. Reason: Solved

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

Time to create page: 0.057 seconds
Powered by Kunena Forum