osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Problem with new box

This is a discussion on Problem with new box within the osCMax v1.7 General Mods Discussion forums, part of the osCMax v1.7 Forums category; Hi at the moment I am trying to add a mod which can be found here, http://www.oscommerce.com/community/contributions,2899 Switch between Displaying ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 General Mods Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-17-2005, 06:13 AM
New Member
 
Join Date: Feb 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hedro
Default Problem with new box

Hi
at the moment I am trying to add a mod which can be found here,
http://www.oscommerce.com/community/contributions,2899

Switch between Displaying Prices Inc./Ex. VAT

it uses a box to enable the user to switch between prices including/excluding tax

the box code supplied is as follows

Code:
	<!-- ==== START CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT" ===================================-->  
	<tr>
	    <td colspan="2" class="boxText" align="left" colspan="2">    
	        <?php if ($vat_disp == '1') { ?>
		All prices displayed:<br><b>Inc. VAT</b>
		<?php } else {  ?>
		All prices displayed:<br><b>Ex. VAT</b>
		<?php } ?>
	    </td>
	</tr>
	
	<tr>
 	    <td colspan="2" align="right" valign="bottom">    
		<?php if ($vat_disp == '1') {
		echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=0') . '">' . tep_image_button('button_inc_ex_vat.gif', To_Prices_Ex_VAT) . '</a>';   
		} else {
		echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=1') . '">' . tep_image_button('button_inc_ex_vat.gif', To_Prices_Inc_VAT) . '</a>';   	
		}
		?>
	    </td>
	</tr>	
	<!-- ==== FINISH CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT" ===================================-->
I have tried to fix it to work with BTS
using this
Code:
<?php
/*
  $Id: languages.php,v 1.1.1.1 2005/01/15 06:43:51 Michael Sasek Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- languages //-->
<?php
 
  $boxHeading = BOX_HEADING_VAT;
  $corner_left = 'square';
  $corner_right = 'square';
  $boxContent_attributes = ' align="center"';
  $box_base_name = 'displayvat'; // for easy unique box template setup (added BTSv1.2)
  $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
// START CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT for BTS / osCMax"
		$boxContent = '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">
				<tr><td  class="infoBoxContents" align="right" valign="bottom">'     
	         if ($vat_disp == '1') { 
		$boxContent = 'All prices displayed:<br><b>Inc. VAT</b>'
		} else {
		$boxContent = 'All prices displayed:<br><b>Ex. VAT</b>'
		} 
 		$boxContent = '</td></tr><tr><td  class="infoBoxContents" align="right" valign="bottom">'    
		if ($vat_disp == '1') {
		$boxContent = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=0') . '">' . tep_image_button('button_inc_ex_vat.gif', To_Prices_Ex_VAT) . '</a>';   
		} else {
		$boxContent = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=1') . '">' . tep_image_button('button_inc_ex_vat.gif', To_Prices_Inc_VAT) . '</a>';   	
		}
		$boxContent = '</td></tr></table>'
// FINISH CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT for BTS / osCMax" 
// bof BTSv1.2
  if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) {
  // if exists, load unique box template for this box from templates/boxes/
      require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php');
  }
  else {
  // load default box template: templates/boxes/box.tpl.php
      require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX);
  }
// eof BTSv1.2
  $boxContent_attributes = '';
?>
But no luck, can anyone more experienced than me with php guide me down the correct path as I am about ready to jump off a very tall building.

I have modified my column_right file to place this box at the top of the column above the shopping cart box but now all it does is display an empty right column.

the site can be seen on my dev server (unreliable linux ppc sitting under my desk, read slow if working ) http://oksports.sytes.net

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Email problem on webmail n aslo cupons problem jikey osCMax v2 Installation issues 0 10-26-2006 12:43 AM


All times are GMT -8. The time now is 03:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax