Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / terms and conditions in popup window

terms and conditions in popup window

Locked

Views: 3,858

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
6 Feb 2008, 5:23 PM
#1
sagivle1 avatar

sagivle1

New Zenner

Join Date:
Dec 2007
Posts:
31
Plugin Contributions:
0

terms and conditions in popup window

Hey guys ,
i want to to make the "here" link in terms and conditions section so that it will be opened in a popup window...
i have tried to make some modifications by myself in the /includes/languages/english/checkout_payment.php file ,
but im having difficulties because i need to use javascript for the popup and why i try it i am getting an error... :(

here is the place to be changed :

define('TEXT_CONDITIONS_DESCRIPTION', '<span class="termsdescription">Please acknowledge the terms and conditions bound to this order by ticking the following box. The terms and conditions can be read <a href="' . zen_href_link(FILENAME_CONDITIONS, '', 'SSL') . '"><span class="pseudolink">here</span></a>.');

does anyone knows what can i do?
tnx...

10 Feb 2008, 10:19 AM
#2
sagivle1 avatar

sagivle1

New Zenner

Join Date:
Dec 2007
Posts:
31
Plugin Contributions:
0

Re: terms and conditions in popup window

someone? please help...

17 Jun 2008, 4:53 PM
#3
sagivle1 avatar

sagivle1

New Zenner

Join Date:
Dec 2007
Posts:
31
Plugin Contributions:
0

Re: terms and conditions in popup window

since i got an email from a zen user that asked me if i have solved that issue, and i did , i will share my solutions with you guys...
and here it is :

to solve that issue go to your_shop_path\includes\templates\your template\templates

you will find there the file named "tpl_checkout_payment_default.php"

search for the row below

<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>

and change the row below that row so it will look like this row ...

<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?> <a href=javascript: popupWindow('index.php?main_page=conditions')>here</a></div>

hope it helped.

enjoy.

17 Jun 2008, 5:01 PM
#4
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: terms and conditions in popup window

Good tip.. thanks for sharing
:smile:

23 Mar 2009, 9:21 PM
#5
bennya avatar

bennya

New Zenner

Join Date:
Mar 2009
Location:
Worthington, MN
Posts:
4
Plugin Contributions:
0

Re: terms and conditions in popup window

Let's take this one step further...anyone know how to make the terms & conditions show up in a readonly text area, directly below the checkbox?

I got this far, but can't get the Conditions document to show up in the textarea:

<textarea readonly="readonly" style="height:250px; width:400px;"><?php echo TEXT_CONDITIONS; ?></textarea>
23 Mar 2009, 9:31 PM
#6
bennya avatar

bennya

New Zenner

Join Date:
Mar 2009
Location:
Worthington, MN
Posts:
4
Plugin Contributions:
0

Re: terms and conditions in popup window

I think maybe my issue is I do not have a definition for the actual conditions file...so I'm not sure what defined "token" to insert into the text area.

also, I know I'll have another issue with the html tags in my conditions document if/when i can get them to come into the textarea.

24 Mar 2009, 1:38 PM
#7
bennya avatar

bennya

New Zenner

Join Date:
Mar 2009
Location:
Worthington, MN
Posts:
4
Plugin Contributions:
0

Re: terms and conditions in popup window

Ok...well, I got the results I wanted...the code isn't very pretty, but it works. Here's how I did it:

first, in the checkout_payment.php file ([storeDir]\includes\languages\english\checkout_payment.php) i added this definition, and included the plain-text version of the content from define_conditions.php:

define('TEXT_CONDITIONS_DOCUMENT', '<textarea readonly="readonly" style="height:250px; width:650px;">
<!-- plain text from define_conditions.php goes here -->
</textarea>');

Note that I had to strip all html formatting to make this read properly.

Then, in tpl_checkout_payment_default.php ([storeDir]\includes\templates[templateDir]\templates\tpl_checkout_payment_default.php) I utilized the definition as follows. I also wanted a link to the printable version of the conditions, so here's how the entire section works:

<fieldset>
<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
<?php echo  zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
<label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label><br />
<?php echo TEXT_CONDITIONS_DOCUMENT; ?><br />
<span class="termsdescription"><a href="javascript:popup('index.php?main_page=conditions',800,600,0,0,true,'ConditionsPrint','yes','no','no','yes','no');">Printable View</span>
</fieldset>

If anyone wants to see this live I can give you the url and a demo login to the site; just message/email me.

These forums have been a GREAT help btw, and zenCart is freakin stellar. Great work team!

30 Mar 2009, 4:45 PM
#8
vianativa avatar

vianativa

New Zenner

Join Date:
Mar 2009
Posts:
1
Plugin Contributions:
0

Re: terms and conditions in popup window

Where can I modify the terms and conditions page?

Version: Zen Cart 1.3.8a