Displaying a contact form on a product page

  • Posts: 159
  • Thank you received: 12
  • Hikashop Business
2 years 11 months ago #340128

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 7.4.27
-- Browser(s) name and version -- : Firefox Developer 99.0b3

Hello,

Me again... I would need to display a contact form on each product page.
I know that it's possible to have the "contact" button on product pages, but the brand I'm working with requires to display a specific contact form.

I tried with RS Forms, the form is displayed but doesn't work. Do you know how I can make it work?

Thanks in advance for your help

Sandra

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 11 months ago #340130

Hi,

The main issue you'll have with this is that in the file product / show (that you can edit via the menu Display>Views), the whole product page layout is inside an HTML "form" element which is used for the add to cart button.
So I you try to add another form inside that product page layout without touching the HTML form tag there, you'll end up with the contact form inside the add to cart form. And in HTML, you can't have a form inside a form:
stackoverflow.com/questions/555928/is-it...de-another-html-form
So a solution would be to add your contact form outside of the form tags already in product / show.
Another would be to move these tags and the input fields inside it in product / show to the product / show_default view file to have them only around the add to cart button (and maybe the options/characteristics/custom item fields areas if you use them).

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

  • Posts: 159
  • Thank you received: 12
  • Hikashop Business
2 years 11 months ago #340161

Merci Nicolas. je t'avoue que je n'ai pas tout compris...
J'utilise effectivement des custom fields pour le module de recherche.

Pour info, je suis en mode catalogue. Je dois impérativement afficher un formulaire de contact en bas de la page (pas le choix avec Rolex, ils sont super stricts).

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 11 months ago #340162

Bonjour,

En clair, pour un non développeur, je vous recommande de passer par quelque chose comme ceci:
dj-extensions.com/dj-easycontact
Et configurez le module pour s'afficher dans une position du template en bas des pages sur les pages produits.
Vous aurez probablement aussi besoin d'Avanced Modules Manager Pro pour restreindre l'affichage du module aux pages de type détails produit.

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

  • Posts: 2143
  • Thank you received: 747
2 years 11 months ago #340180

nicolas wrote: Bonjour,

En clair, pour un non développeur, je vous recommande de passer par quelque chose comme ceci:
dj-extensions.com/dj-easycontact
Et configurez le module pour s'afficher dans une position du template en bas des pages sur les pages produits.
Vous aurez probablement aussi besoin d'Avanced Modules Manager Pro pour restreindre l'affichage du module aux pages de type détails produit.


Hi,

You can do the same with RSForm Pro as well if you have it already, plus -- if needed/wanted -- add some hidden fields and auto-fill those with Javascript or PHP with some product data.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: nicolas

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

  • Posts: 159
  • Thank you received: 12
  • Hikashop Business
2 years 11 months ago #340187

Thank you so much Nicolas.

It works perfectly like that.

Sandra

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

Time to create page: 0.072 seconds
Powered by Kunena Forum