| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Custom templates | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi I've looked high and low (Search) for a thread on the ability to add additional templates such as the contact us form, but with different variables. I want to make it into a quote request form for different products. Can anyone guide me on how to do this, as I think that it would be a useful guide for many people.
Many thanks Paul
__________________
X-Cart Gold V 4.4.1 |
|||||||
#2
|
|||||||
|
|||||||
![]() Unfortunately it isn't as easy as just adding another template, you will have to write some PHP as well. You could just add a third party form (check hotscripts.com), but you won't be able to administer it via the admin panel like you can with the contact and register scripts.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() You can copy the section of code in include/help.php
The section begins with... Code:
Copy the whole section down to the next comment, change $action=="contactus" to the name of your form. You then want to change the parameters for sending the email. It is the line: Quote:
Make new templates (copy the existing ones, and change the names to whatever template names you give them). When editing the templates you will need to remove the if statements as appropriate (since the fields required/showing are the ones you set up in the config for the conact form). You also may need to adjust the javascript validation and other parts of the php section you copied as appropriate for your particular form. If you want to email the results to an additional email address not already setup in your config, you can add value(s) to the xcart_config table using SQL and the field will appaear on the admin side (category = Company). Use the existing values as an example. Finally access your new form by linking to "/help.tpl?section=yourform" where yourform is the title you gave your form. If you want to get fancy you can pass through the item they came from... make your link "/help.tpl?section=yourform&item={$product.product}" then add to include/help.php Code:
You can then include {$item} on your new contact template as a hidden field to pass the value through. It is a little involed, but the advantage of this method is that users who are registered and logged in won't have to fill out their contact info each time they use the form. |
|||||||
#4
|
|||||||
|
|||||||
![]() WOW,
Thanks guys that info was really useful. I will have a go here and if it works i'll post the script in completed mods. Many thanks
__________________
X-Cart Gold V 4.4.1 |
|||||||
#5
|
|||||||
|
|||||||
![]() I am trying to get this to work in x-cart version 4.1.8. I have created the mail/rigging_contactus_subj.tpl and mail/rigging_contactus.tpl, and help/rigging.tpl (copy of contactus.tpl). I have also copied the code in include/help.php and pasted the following,
Code:
I cant seem to get it to take me to this new page no matter what I do. If anyone can shed some light on this, I would greatly appreciate it.
__________________
x-cart - 4.1.8 [linux] |
|||||||
#6
|
|||||||
|
|||||||
![]() Well, I contacted X-cart and they wanted $300 to get this figured out. Thats more than I wanted to spend, so I dove back in and now have it working. Seems to work really well. I will post more details later.
__________________
x-cart - 4.1.8 [linux] |
|||||||
#7
|
|||||||
|
|||||||
![]() I'm having the same problem with 4.1.7. Sure would like to know how you got it to work.
__________________
Version 4.6.1 Gold [unix] |
|||||||
|
|||
X-Cart forums © 2001-2020
|