PDA

View Full Version : question on the PGM template.



2001kx
04-17-2011, 12:03 PM
im trying to figure out how (prob. easy but i cant figure it out) on the pgm template the center (store part) is all white but you have the gray color on just the sides.
any help on what i need to do to accomplish this on my site?
i have been playing with the code from the pgm template stylesheet (copy / paste) on to my site but cant get it right.
everytime i try something the whole background turns gray...i cant get the box (white part) around my store.

thanks.

pgmarshall
04-17-2011, 01:05 PM
As the author I can tell you that it basically splits the whole page into 3 columns and put the "grey" bits down either side then loads the store in the middle.

PGM is a hack template for v2.0.25 and will not be in v2.5 ... although I hope to release a new version to the community prior to the final stable release.

Regards,

2001kx
04-17-2011, 01:08 PM
any info on how to do this?
thanks


it basically splits the whole page into 3 columns and put the "grey" bits down either side then loads the store in the middle.

pgmarshall
04-17-2011, 02:52 PM
<table>
<tr>
<td>left grey bit</td>
<td>Store content</td>
<td>right grey bit</td>
</tr>
</table>

I know the above sounds simplistic but that is all it is ... just wrap the whole site inside a table and background the td's with a grey background ...

Regards,

2001kx
04-17-2011, 03:47 PM
<table>
<tr>
<td>left grey bit</td>
<td>Store content</td>
<td>right grey bit</td>
</tr>
</table>

I know the above sounds simplistic but that is all it is ... just wrap the whole site inside a table and background the td's with a grey background ...

Regards,

ok i think im getting somewhere now with the tables but i still cant get the center (store part) to be white.
im using the code(below) you have in PGM for the <td>right / left grey bit</td>

<td width="8" style="background-color:white">&nbsp;&nbsp;</td>


563

pgmarshall
04-17-2011, 11:24 PM
Use firefox with Firebug installed then you can click on any element in the screen and it will show you the css element that controls it ... I think there is a element called content or similar ...

Firebug is an invaluable tool when developing a new site ...

Regards,

2001kx
04-18-2011, 12:44 PM
Use firefox with Firebug installed then you can click on any element in the screen and it will show you the css element that controls it ... I think there is a element called content or similar ...

Firebug is an invaluable tool when developing a new site ...

Regards,

this is what i found for the center store...
the stylesheet shows black but it controls the text?
wow this gets frustrating at times...i have 6 hours into this and im still lost.

i cant find content in there but maybe im not doing it right?
this content you mentioned i assume is the make up of my store which should be in a table?



565

pgmarshall
04-18-2011, 01:35 PM
Look for this:
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="maincontent">

Check this css for maincontent having a background-color:white

Regards,

2001kx
04-18-2011, 03:30 PM
Look for this:
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="maincontent">

Check this css for maincontent having a background-color:white

Regards,

i dont think i have <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maincontent"> or anything similar in my site?
i looked for anything with "main" in it

i took a look at your cottonbarn and i found it in there (mainarea) but nothing like that on my site

does that mean i did the tables wrong? or should that be there regardless?

2001kx
04-18-2011, 03:41 PM
here is the code from main_page.tpl.php where i added the table code.
when you get a chance can you look at it and see if i put the tables in the right place..if not no big deal.
i highlighted the code i added in red bold.



<?php
/*
$Id: main_page.tpl.php 1313 2011-04-04 00:58:20Z michael.oscmax@gmail.com $

osCmax e-Commerce
osCMax - osCommerce Maximized | osCmax shopping cart software (http://www.osCmax.com)

Copyright 2000 - 2011 osCmax

Released under the GNU General Public License
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS;
// BOF Separate Pricing Per Customer
if(!tep_session_is_registered('sppc_customer_group _id')) {
$customer_group_id = '0';
} else {
$customer_group_id = $sppc_customer_group_id;
}
// EOF Separate Pricing Per Customer

?>>

<head>

<?php require(DIR_WS_INCLUDES . 'meta_tags.php');

//Page Name variable - places current php file name into a variable
$page = $_SERVER["SCRIPT_NAME"];
$break = Explode('/', $page);
$pfile = $break[count($break) - 1];
//echo $pfile; //debug code - displays current page name.

// BOF: Remove & Prevent duplicate content with the canonical tag V1.3.2
CanonicalLink( $xhtml = false, 'SSL' );
// EOF: Remove & Prevent duplicate content with the canonical tag V1.3.2
?>
<title><?php echo META_TAG_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>">
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<?php if (bts_select('stylesheets', $PHP_SELF)) { // if a specific stylesheet exists for this page it will be loaded ?>
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheets', $PHP_SELF)); // BTSv1.5 ?>">

<?php
} else { ?>
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','stylesheet.css')); // BTSv1.5 ?>">
<?php }

if ( defined('FWR_SUCKERTREE_MENU_ON') && FWR_SUCKERTREE_MENU_ON === 'true' )
echo '<link rel="stylesheet" type="text/css" href="' . (bts_select('stylesheet', 'fwr_suckertree_css_menu.css')) . '" />';
?>

</head>
<body>

<!-- warnings //-->
<?php require(DIR_WS_INCLUDES . 'warnings.php'); ?>
<!-- warning_eof //-->


<?php
// include i.e. template switcher in every template
if(bts_select('common', 'common_top.php')) include (bts_select('common', 'common_top.php')); // BTSv1.5
// BOF Added: Down for Maintenance Hide header if not to show
if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') {

?>

<!-- Store width controller -->
<table width="<?php echo STORE_WIDTH; ?>" cellspacing="0" cellpadding="0" align="<?php echo STORE_ALIGN; ?>">
<tr><td>

<table>
<tr>
<td width="8" style="background-color:white">&nbsp;&nbsp;</td>
<td>

<!-- header //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME) . '</a>'; ?></td>
<td class="nav_tabs">
<?php if ((tep_session_is_registered('customer_id')) && (!tep_session_is_registered('noaccount'))) { ?>
<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo tep_image_button('log_off.png', HEADER_TITLE_LOGOFF);?></a>
<?php } ?>
<?php echo '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image_button('contact.png', HEADER_TITLE_CONTACT_US) . '</a> <a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('account.png', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">'; ?><?php if (BASKET_CART =='cart') { echo tep_image_button('cart_contents.png', HEADER_TITLE_CART_CONTENTS); } else { echo tep_image_button('contents.png', HEADER_TITLE_BASKET_CONTENTS); } ?> <?php echo '</a> <a href="' . tep_href_link(FILENAME_WISHLIST, '', 'SSL') . '">' . tep_image_button('wishlist.png', HEADER_TITLE_WISHLIST) . '</a>'; ?>
<?php
if ($cart->count_contents() > 0) {
echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('checkout.png', HEADER_TITLE_CHECKOUT) . '</a>'; ?>
<?php } ?>
&nbsp;&nbsp;</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="headerNavigation">
<td class="breadcrumb_left" width="5"><?php echo tep_draw_separator('pixel_trans.gif', '1', '24'); ?></td>
<td class="breadcrumb">&nbsp;&nbsp;<?php echo $breadcrumb->trail(' &raquo; '); ?></td>
<td class="breadcrumb_right" width="5">&nbsp;</td>
</tr>
</table>
<!-- header_eof //-->
<?php
}
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<?php
// Hide Left Column if not to show
// BOF One Page Checkout custom column code
if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {
if (LEFT_COLUMN_SHOW != 'false' and $pfile != 'checkout.php') { ?>
<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">
<tr>
<td class="leftcol" width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<?php
} //End Show/Hide left column
// One Page Checkout - Left Column display
if ($pfile == 'checkout.php') {
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true') {
?>
<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">
<tr>
<td class="leftcol" width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
<!-- left_navigation_eof //-->
</table></td>
</table>
</td>
<?php
}
}
}
// EOF One Page Checkout custom column code
?>
<!-- content //-->
<td width="100%" valign="top">
<?php
require (bts_select ('content')); // BTSv1.5
?>
</td>
<!-- content_eof //-->
<?php // Show/Hide Right Column

if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF =='false') {

//only show right column if triggered in admin and only show right column if not on the checkout page
if (RIGHT_COLUMN_SHOW != 'false' and $pfile != 'checkout.php' ) { ?>
<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<tr>
<td class="rightcol" width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table></td>
<?php
} // end Show/Hide Right Column
?>
<?php
//if on the checkout page decide which right column to show if applicable
if ($pfile == 'checkout.php') {

if (ONEPAGE_SHOW_OSC_COLUMNS == 'true') {?>
<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<tr>
<td class="rightcol" width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table></td>
<?php
} elseif (ONEPAGE_SHOW_CUSTOM_COLUMN == 'true'){
?>
<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'checkout/column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</table></td>
<?php
}

}
} else { ?>
<td>&nbsp;</td>
<?php
}
// EOF One Page Checkout custom column code
?>
</tr>
<!-- body_eof //-->

<!-- footer //-->
<?php
// BOF Added: Down for Maintenance Hide footer.php if not to show
if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_FOOTER_OFF =='false') {
?>
<tr>
<td colspan="3">
<!-- Page Module Controller -->
<?php include (DIR_WS_MODULES . FILENAME_COMMON_PAGE_MODULES); ?>
<!-- Page Module Controller -->
</td>
</tr>
</table>

</td>
<td width="8" style="background-color:white">&nbsp;&nbsp;</td>
</tr>
</table>

<!-- footer_eof //-->
<?php
}
?>
</td></tr>
</table>

<!-- Store width controller -->

<?php if (bts_select('javascript', $PHP_SELF)) { // if a specific javscript file exists for this page it will be loaded
require(bts_select('javascript', $PHP_SELF));
} else {
if (isset($javascript) && file_exists(DIR_WS_JAVASCRIPT . basename($javascript))) { require(DIR_WS_JAVASCRIPT . basename($javascript)); }

}

if ($pfile == 'index.php') {
if (isset($LoadSlideshowJS) && $LoadSlideshowJS == true) {
if (DISPLAY_SLIDESHOW == true) {
echo '<script type="text/javascript" src="http://www.google.com/jsapi"></script>';
echo '<script type="text/javascript">' . "\n";
echo '// Load jQuery' . "\n";
echo 'google.load("jquery", "1.4.0");' . "\n";
echo '</script>' . "\n";
echo '<script type="text/javascript" src="' . DIR_WS_JAVASCRIPT . 'showcase.2.0.js"></script>';
require (DIR_WS_JAVASCRIPT . 'slideshow_init.js.php');
}
}
}

if (GOOGLE_ANALYTICS_STATUS == 'true') { ?>
<!-- BOF: Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("<?php echo GOOGLE_UA_CODE; ?>");
pageTracker._initData();
<?php
if (GOOGLE_SUBDOMAIN != 'none') {
echo 'pageTracker._setDomainName("' . GOOGLE_SUBDOMAIN . '"); ';
}
if ($pfile == 'checkout_success.php') {
include(DIR_WS_MODULES . 'analytics.php');
}
?>
pageTracker._trackPageview();
</script>
<!-- EOF: Google Analytics Code -->';

<?php } ?>
<script type="text/javascript"><!--
function couponpopupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location =no,directories=no,status=no,menubar=no,scrollbars =yes,resizable=yes,copyhistory=no,width=450,height =280,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</body>
</html>

pgmarshall
04-19-2011, 12:05 AM
This template was design for the last version of osCmax ... if you have used the pgm template you should have this line - if not you need to add some styling to the main content area to stop it being grey.


Try changing to this:


<!-- content //-->
<td width="100%" valign="top" style="background-color: white;">
<?php
require (bts_select ('content')); // BTSv1.5
?>
</td>
<!-- content_eof //-->


You also need to proceed with caution - the pgm template has quite a lot of hard coded functionality in it which has now been merged into the v2.5 core ...

Regards,

2001kx
04-19-2011, 12:55 PM
This template was design for the last version of osCmax ... if you have used the pgm template you should have this line - if not you need to add some styling to the main content area to stop it being grey.


Try changing to this:


<!-- content //-->
<td width="100%" valign="top" style="background-color: white;">
<?php
require (bts_select ('content')); // BTSv1.5
?>
</td>
<!-- content_eof //-->


You also need to proceed with caution - the pgm template has quite a lot of hard coded functionality in it which has now been merged into the v2.5 core ...

Regards,

im using a copy of fallback not the pgm template.

i played around with that code but it blows everything out of order on my site.
i really dont know where i should put this new code?

2001kx
04-19-2011, 01:03 PM
http://www.youtube.com/watch?v=CkaBRZVzlWY

pgmarshall
04-19-2011, 01:23 PM
You can only use that code change if you were using the old pgm template - since you are not please ignore it.

The only file you need to edit is main_page.tpl.php and you simply need to put a couple of extra <td>s around the store ...

I have zipped you up a version that should do what you want ... 566

However, this is where the hand holding ends ... I have quite a few bugs in the core to fix ... If this still all seems like gibberish then I suggest you hire a designer to build your template for you.

Regards,

2001kx
04-19-2011, 01:32 PM
You can only use that code change if you were using the old pgm template - since you are not please ignore it.

The only file you need to edit is main_page.tpl.php and you simply need to put a couple of extra <td>s around the store ...

I have zipped you up a version that should do what you want ... 566

However, this is where the hand holding ends ... I have quite a few bugs in the core to fix ... If this still all seems like gibberish then I suggest you hire a designer to build your template for you.

Regards,

fair enough and thank you!!!