| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
make send2friend a new form | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I am trying to create an enquiry form on each product on the product detail page; ie product.tpl I thought using send2friend as a base would be a good idea, as then it would include the productid each time, just need to change the send to email to send to me and add one text field. However, my new send2friend2.tpl seems to get confused with the original, I can't separate them out - keeps saying that I have missed out the recipients name, even though I have removed it from my template along with the checking scripts. While I know a bit about the templates, I don't think I know enough about the php files I have added this line to product.php include $xcart_dir.DIR_CUSTOMER."/send_to_friend.php"; include $xcart_dir.DIR_CUSTOMER."/send_to_friend2.php"; and then obviously duplicated one to the other. What else do I need to do - what variables would I change, Any pointers at all would be great, as I'm sure they would help me come up with the full solution.
__________________
Version 5.3 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() make sure the forms dont share the same name
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#3
|
|||||||
|
|||||||
![]() Hi,
Many thanks for taking the time to reply - I think it is getting somewhere - but at the moment that somewhere is an access denied - error ID:33 I think it may be something to do with my new php script that I am calling from product.php. This is just a duplicate of send2friend.php: Code:
It has references to Access denied (although one is ID:48 ) Is there anything else I should be changing here or adding somewhere? Thanks
__________________
Version 5.3 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Code:
notice there that it checks for active variables
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#5
|
|||||||
|
|||||||
![]() Thanks, do these need to match then with the ones in the duplicate template:
customer/main/send2friend.tpl perhaps in the Array at the top: Code:
I presume I need to remove the last one, as I am not asking for this to be inputted anymore? Further, I am presuming in: customer/home_main.tpl I need to make this: {elseif $main eq "send_to_friend2"} {include file="customer/main/send_to_friend2.tpl"} but am not sure how this ties in with the php, ie how is this $main variable defined?
__________________
Version 5.3 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() yeh,
remove anything that you dont need and make the change in home_main the main variable gets created by the php files and used by the tpl files
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#7
|
|||||||
|
|||||||
![]() this might help
http://forum.x-cart.com/viewtopic.php?t=27245
__________________
xcart 4.18 on linux |
|||||||
|
|||
X-Cart forums © 2001-2020
|