- Posts: 382
- Thank you received: 77
Contact form with extra fields issue
8 years 1 month ago #297250
by almika
Contact form with extra fields issue was created by almika
-- 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
$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,
-- 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
Code:
<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.
8 years 1 month ago #297259
by nicolas
Replied by nicolas on topic Contact form with extra fields issue
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.
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.
8 years 1 month ago - 8 years 4 weeks ago #297278
by almika
Replied by almika on topic Contact form with extra fields issue
Thanks, Nicolas!
Best regards,
Best regards,
Last edit: 8 years 4 weeks ago by almika. Reason: Solved
Please Log in or Create an account to join the conversation.
Time to create page: 0.175 seconds