Contact form on tabbed product page

  • Posts: 2
  • Thank you received: 0
6 years 4 months ago #284809

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.3
-- PHP version -- : 5.6.31

Hi guys,

I have a problem regarding contact form on product page. As you can see from the picture attached, I have my product page in tabular view and I can not figure out how to implement contact form on the third tab. The idea is to have two input fields for customers name and email and one text area where they can ask their question regarding the product. When they click on send button, the e-mail is sent to specific e-mail with subject being "inquiry from website - product XXX" or something similar and then the information from the sender in e-mail body.
If someone can give me any ideas or directions on how to implement that, I would be very grateful! :)

Many thanks in advance for the support!

Attachments:

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 4 months ago #284812

Hi,

There are three parts to that:

1. You can add a new tab like explained in the "How to add a tab in the tabular view ?" section of our FAQ:
www.hikashop.com/support/documentation/106-faq.html

2. You can add a module anywhere (and so in your tab) with the Modules anywhere extension:
www.regularlabs.com/extensions/modulesanywhere

3. You can use such form module extension to display a contact form through a module:
extensions.joomla.org/extension/super-simple-contact-form/

The following user(s) said Thank You: sulinho

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

  • Posts: 2
  • Thank you received: 0
6 years 4 months ago #284904

Hi nicolas,

Thanks for your support. It works perfect! Do you happen to know how can I edit the subject so it will set automatically to"inquiry from website - product XXX" or something similar? See attached (highlighted in yellow).
Do I have to modify the code in show_tabular.php?

<div class="hikashop_tabs_content" id="hikashop_show_tabular_ask_a_question">
	{module 128}
</div>

Attachments:
Last edit: 6 years 4 months ago by sulinho.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 4 months ago #284906

Hi,

No, you would have to modify the code of the contact form module you're using for that. I'm afraid you'll have to ask the developer of your module where that should be done.
Regarding the code to use to get the product name, it's quite easy:

<?php $class = hikashop_get('class.product');
$product = $class->get($_REQUEST['cid']);
echo $product->product_name; ?>

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

Time to create page: 0.059 seconds
Powered by Kunena Forum