avgear Posted June 20, 2023 Share Posted June 20, 2023 (edited) 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 June 20, 2023 by avgear (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted June 21, 2023 Share Posted June 21, 2023 If you use it in module code editor probably you don't have access to variables value like {$token} Link to comment Share on other sites More sharing options...
avgear Posted June 21, 2023 Author Share Posted June 21, 2023 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 More sharing options...
endriu107 Posted June 21, 2023 Share Posted June 21, 2023 You can add this tab without module by editing template. Link to comment Share on other sites More sharing options...
avgear Posted June 21, 2023 Author Share Posted June 21, 2023 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 More sharing options...
avgear Posted June 22, 2023 Author Share Posted June 22, 2023 13 hours ago, avgear said: Can this be circumvented somehow? I would like the contact form to be in the tab. It works in this code the value {name} inserting the product name Link to comment Share on other sites More sharing options...
avgear Posted June 27, 2023 Author Share Posted June 27, 2023 On 6/21/2023 at 9:20 PM, endriu107 said: You can add this tab without module by editing template. How can I add this? Link to comment Share on other sites More sharing options...
ps8modules Posted June 29, 2023 Share Posted June 29, 2023 (edited) 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. result: Edited June 30, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
avgear Posted July 4, 2023 Author Share Posted July 4, 2023 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. result: 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. Link to comment Share on other sites More sharing options...
ps8modules Posted July 4, 2023 Share Posted July 4, 2023 You have a clue how to do it. You can't give the exact code if you don't have a default template. Link to comment Share on other sites More sharing options...
avgear Posted July 4, 2023 Author Share Posted July 4, 2023 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 More sharing options...
ps8modules Posted July 4, 2023 Share Posted July 4, 2023 Your template is not original. You're only using the hook you provided. Link to comment Share on other sites More sharing options...
avgear Posted July 4, 2023 Author Share Posted July 4, 2023 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 More sharing options...
Nickz Posted July 4, 2023 Share Posted July 4, 2023 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 More sharing options...
avgear Posted July 4, 2023 Author Share Posted July 4, 2023 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 More sharing options...
ps8modules Posted July 4, 2023 Share Posted July 4, 2023 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. Link to comment Share on other sites More sharing options...
avgear Posted July 5, 2023 Author Share Posted July 5, 2023 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 More sharing options...
ps8modules Posted July 5, 2023 Share Posted July 5, 2023 (edited) 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 July 5, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
avgear Posted July 5, 2023 Author Share Posted July 5, 2023 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 Link to comment Share on other sites More sharing options...
avgear Posted July 7, 2023 Author Share Posted July 7, 2023 I was able to add this form and it works. All I had to do was paste the code in the additional blank tab {hook h='displayContactForm'} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now