Jump to content

Contact form in the product tab presta 8.0.2


Recommended Posts

I use the mypresta extra product tab module.
I add the contact form as a tab using the code

<form action="__url contact page___" method="post" class="contact-form-box" enctype="multipart/form-data"><input type="hidden" name="id_contact" value="2" /><fieldset><strong>wyślij wiadomość</strong>
<div class="clearfix">
<div class="col-xs-12 col-md-3">
<div class="form-group selector1"><label for="email">adres e-mail</label> <input class="form-control grey validate" type="text" id="email" name="from" data-validate="isEmail" value="" /></div>
<div class="submit"><style>
input[name=url] {
display: none !important;
}
</style>
<input type="text" name="url" value="" class="hidden"> 
<input type="hidden" name="token" value="{$token}"><button type="submit" name="submitMessage" id="submitMessage" class="button btn btn-default button-medium"><span>Wyślij<i class="icon-chevron-right right"></i></span></button></div>
</div>
<div class="col-xs-12 col-md-9">
<div class="form-group"><label for="message">Wiadomość</label> <textarea style="min-height: 100px;" class="form-control" id="message" name="message">Wiadomość dotycząca: {name}</textarea></div>
</div>
</div>
</fieldset></form>

__url contact page__ - I change to a link to the shop's contact page

An error appears when trying to send "An error occurred while sending the message, please try again."

On the contact page, the contact form works and emails arrive and get sent. What could this be due to?

Edited by avgear (see edit history)
Link to comment
Share on other sites

4 hours ago, endriu107 said:

If you use it in module code editor probably you don't have access to variables value like {$token}

Can this be circumvented somehow? I would like the contact form to be in the tab.

Link to comment
Share on other sites

The template has an edited layout via a separate module and I am unlikely to be able to do this easily in tpl. Is there any other way to put a working contact form through the code editor in the mypresta extra tabs pro module?

Link to comment
Share on other sites

On 6/30/2023 at 1:53 AM, ps8moduly.cz said:

Hi.

The contactform module is a widget, so you can attach it to any hook. In Administration => Design => Positions, add a contactform to the displayProductAdditionalInfo hook.

obrazek.thumb.png.fd1ffae8af0ba8266ae37914e88a57d4.png

 

result:

obrazek.thumb.png.90de7c6073437b5b17a8842b58775a4d.png

No, I mean put in the next tab, like in the tabs there is a description, a specification, a video, and in the next one there is supposed to be a contact form.
Placing the module via Administration => Design => Positions throws the form below this tab section.

 

 

Bez tytułu.jpg

Link to comment
Share on other sites

2 hours ago, ps8moduly.cz said:

You have a clue how to do it.

You can't give the exact code if you don't have a default template.

I don't quite understand your answer. I am using the default contact form module, from a different template. That's why I'm looking for an answer, is it a matter of modifying the code, adding other hooks etc ? How can this module be added to the tab.

Link to comment
Share on other sites

15 minutes ago, ps8moduly.cz said:

Your template is not original. You're only using the hook you provided.

I was able to add the youtube video products module to the tab in the product description, although it's a non-original shalbon and I'm looking for a way to add a contact form like this. Do I need to edit the .tpl of the module ?

Link to comment
Share on other sites

You are doing a lot of effort just to deliver your users to youtube?
Youtube in my eyes, is the spiderweb most users end up in. Shared hosts usually don't have the power to play videos effortlessly. 

Link to comment
Share on other sites

2 minutes ago, Nickz said:

You are doing a lot of effort just to deliver your users to youtube?
Youtube in my eyes, is the spiderweb most users end up in. Shared hosts usually don't have the power to play videos effortlessly. 

It's about a product video that easily displays on a product page.

Why are you surprised by the placement of media on the shop's product page ?

Link to comment
Share on other sites

19 hours ago, ps8moduly.cz said:

You ask on the contact form and mess with YouTube. Be humble, polite, ask, thank and you will receive help. You can add your own hook to your ptoduct tpl template and connect the contactform module to it.

Perhaps we have misunderstood each other. The point is that the Youtube module works in a tab on the product page.

Mess on Youtube and a somewhat rude response from Nickz seems to me

20 hours ago, Nickz said:

You are doing a lot of effort just to deliver your users to youtube?
Youtube in my eyes, is the spiderweb most users end up in. Shared hosts usually don't have the power to play videos effortlessly. 

 

Link to comment
Share on other sites

Yes, probably misunderstood.

Yes, I also agree that the response from @Nickz  is inappropriate.

It's everyone's business how they do their marketing.

Can you ask the question again please? I'm happy to help.

It is definitely better than a YouTube video, for example, to have mp4 on the server and run from you. There is no need to use third parties to communicate to users.

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

32 minutes ago, ps8moduly.cz said:

Yes, probably misunderstood.

Yes, I also agree that the response from @Nickz  is inappropriate.

It's everyone's business how they do their marketing.

Can you ask the question again please? I'm happy to help.

It is definitely better than a YouTube video, for example, to have mp4 on the server and run from you. There is no need to use third parties to communicate to users.

I agree that it's better to have video on your own server, however, ultimately there will probably be around 1000 products in the shop and even 200 or 300 videos is rather too much. I want to post official material from the manufacturers' channels.

 

Back to the main topic. I would like to put a working contact form in the product tab. As in the screenshot below, but for my template. This is Leo Auros https://themeforest.net/item/auros-furniture-home-decor/24398375

Bez tytułu.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...