Jump to content
Sign in to follow this  
calicorp

How do you Install contributions when you have a osc psd template

Recommended Posts

Hi All ,

 

I have an oscommerce website installed that is from monster templates and I have noticed that there are quiet a few programming changes within the php files to accomodate the template integration into a vanila install of oscommerce.

 

Now my question is how do I go about install any contributions with out killing the look of the template ?

 

As an example my template has column_left.php which is totally different to the vanilia install column_left.php and I am not sure how I can install the contribution http://www.oscommerce.com/community/contri..._categories.php

---------------

Here is the code for column_left.php from a vanila install

 

<?php

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

 

require(DIR_WS_BOXES . 'whats_new.php');

require(DIR_WS_BOXES . 'search.php');

require(DIR_WS_BOXES . 'information.php');

?>

-------------------------------------

Here is the code for the column_left.php with a psd template

 

<?php

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

?>

<table border="0" cellspacing="0" cellpadding="0">

<tr><td width="52"><?php echo tep_draw_separator('spacer.gif', '52', '1'); ?></td>

<td width="158">

<table border="0" cellspacing="0" cellpadding="0" width="158">

<tr><td height="32" class="tx1" align="center" ><?=BOX_HEADING_CATEGORIES?></td></tr>

<tr><td height="1" width="158" bgcolor="#860030"></td></tr>

<tr><td height="14"></td></tr>

<tr><td><ul>

<?

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array, $ii;

 

$ii++;

if(!$tree[$counter]['level']){

$categories_string .= $categories_string ? '' : '';

$categories_string .= '<li><a href=';

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

// display categry name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></li>';

}else{ // SUBCATEGORY

$categories_string .= '';

for($i=0;$i<$tree[$counter]['le vel'];$i++)

$categories_string .= '';

$categories_string .= '<li><a href=';

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>-';

// display category name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></li>';

}

if ($tree[$counter]['next_id'] != false && $ii < 20) {

tep_show_category($tree[$counter]['next_id']);

}

}

define(TABLE_CATEGORIES, "categories");

define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");

$categories_string = '';

$tree = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

//------------------------

if ($cPath) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

$parent_id = $row['categories_id'];

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

$categories_string .= '';

tep_show_category($first_element);

$categories_string .= '';

echo $categories_string;

?>

</ul></td></tr>

</table>

</td>

<td width="12"><?php echo tep_draw_separator('spacer.gif', '12', '1'); ?></td></tr>

</table>

---------------------------------

 

Thanks to anyone that can help me out on this .

 

Calicorp :thumbsup:

Share this post


Link to post
Share on other sites

Unless you make your own templates, its very hard to add some contributions as code is either added to make the template or removed. I think in your case the contrib should still work, without seeing the template, it seems all they have done is moved the categories infobox into the colum_left.php file, the code seems untouched just moved around, but again without seeing what template you have its hard to say.


Stuart

Share this post


Link to post
Share on other sites
Unless you make your own templates, its very hard to add some contributions as code is either added to make the template or removed. I think in your case the contrib should still work, without seeing the template, it seems all they have done is moved the categories infobox into the colum_left.php file, the code seems untouched just moved around, but again without seeing what template you have its hard to say.

 

Thanks Stuart for the reply .

 

What files would you like to see in order to better understand this template .

Also can I get the same results as a PDF template if I use the STS (Standard Template System) ?

 

Thanks

Calicorp :thumbsup:

Share this post


Link to post
Share on other sites
Thanks Stuart for the reply .

 

What files would you like to see in order to better understand this template .

Also can I get the same results as a PDF template if I use the STS (Standard Template System) ?

 

Thanks

Calicorp :thumbsup:

David, it would be easier to implement a psd template using the Simple Template System v4.3. You would have to do some heavy changes in the stylesheet and either comment out some of the "out of the box" images or use transparent ones, such as is the case for the infoboxes.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
David, it would be easier to implement a psd template using the Simple Template System v4.3. You would have to do some heavy changes in the stylesheet and either comment out some of the "out of the box" images or use transparent ones, such as is the case for the infoboxes.

 

I have now installed the STS 4.3 that was suggested but now I face the following problems.

 

(1) How do you add a background image to the Categories info box

(2) If I want to have a place holder over a graphic so that the place holder item will apear ontop of an image below(is this possible.

(3) Does STS only change the first page (index) of a site

 

Also where could I get the information on how the Adobe osc templates are built in regards to oscommerce and what files and code are changed to make it work.

 

Cheers to everyone for all the help thus far.

Antony

Share this post


Link to post
Share on other sites
Unless you make your own templates, its very hard to add some contributions as code is either added to make the template or removed. I think in your case the contrib should still work, without seeing the template, it seems all they have done is moved the categories infobox into the colum_left.php file, the code seems untouched just moved around, but again without seeing what template you have its hard to say.

Thanks for the info stu.

 

I have managed to get the psd template working with the contribution http://www.oscommerce.com/community/contri...categories+v1.0

 

so I am now able to show only the top levels of a categories but I am now having an issue where the Internet Explorer browser shows a white box around my categories box yet other browsers don't display this.

If you go to the website www.pickmeforit.com.au and try different broswers you will see the results.

 

I have looked in the stylesheet and i have made sure that the infobox background is off .

 

Not sure if you are anyone can shed some light on this but I am at a loss to resolve this issue.

Also am I right in saying most of the way a psd template is integrated into an oscommerce site is done in the stylesheet.css file ?

 

Here is my current stylesheet

 

/*

$Id: stylesheet.css,v 1.56 2003/06/30 20:04:02 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }

.errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; }

.stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; }

.productsNotifications { background: #f2fff7; }

.orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; }

 

FORM {

display: inline;

}

 

//.infoBox {

//background: #b6b7cb;

//border:0px solid #000000;

//}

 

.infoBoxContents {

// background: #f8f8f9;

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

 

 

 

TR.headerNavigation {

background: #bbc3d3;

}

 

TD.headerNavigation {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

background: #bbc3d3;

color: #ffffff;

font-weight : bold;

}

 

A.headerNavigation {

color: #FFFFFF;

}

 

A.headerNavigation:hover {

color: #ffffff;

}

 

TR.headerError {

background: #ff0000;

}

 

TD.headerError {

font-family: Tahoma, Verdana, Arial, sans-serif;

font-size: 12px;

background: #ff0000;

color: #ffffff;

font-weight : bold;

text-align : center;

}

 

TR.headerInfo {

background: #00ff00;

}

 

TD.headerInfo {

font-family: Tahoma, Verdana, Arial, sans-serif;

font-size: 12px;

background: #00ff00;

color: #ffffff;

font-weight: bold;

text-align: center;

}

 

 

 

.infoBoxNotice {

background: #FF8E90;

}

 

.infoBoxNoticeContents {

background: #FFE6E6;

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

TD.infoBoxHeading {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

background: #bbc3d3;

color: #000000;

}

 

TD.infoBox, SPAN.infoBox {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {

background: #f8f8f9;

}

 

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {

background: #f8f8f9;

}

 

TABLE.productListing {

border: 1px;

border-style: solid;

border-color: #b6b7cb;

border-spacing: 1px;

}

 

.productListing-heading {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

background: #b6b7cb;

color: #FFFFFF;

font-weight: bold;

}

 

TD.productListing-data {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

A.pageResults {

color: #0000FF;

}

 

A.pageResults:hover {

color: #0000FF;

background: #FFFF33;

}

 

TD.pageHeading, DIV.pageHeading {

font-family: Verdana, Arial, sans-serif;

font-size: 20px;

font-weight: bold;

color: #9a9a9a;

}

 

TR.subBar {

background: #f4f7fd;

}

 

TD.subBar {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

color: #000000;

}

 

TD.main, P.main {

font-family: Verdana, Arial, sans-serif;

font-size: 11px;

line-height: 1.5;

}

 

TD.smallText, SPAN.smallText, P.smallText {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

TD.accountCategory {

font-family: Verdana, Arial, sans-serif;

font-size: 13px;

color: #aabbdd;

}

 

TD.fieldKey {

font-family: Verdana, Arial, sans-serif;

font-size: 12px;

font-weight: bold;

}

 

TD.fieldValue {

font-family: Verdana, Arial, sans-serif;

font-size: 12px;

}

 

TD.tableHeading {

font-family: Verdana, Arial, sans-serif;

font-size: 12px;

font-weight: bold;

}

 

SPAN.newItemInCart {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

color: #ff0000;

}

 

CHECKBOX, INPUT, RADIO, SELECT {

font-family: Verdana, Arial, sans-serif;

font-size: 11px;

}

 

TEXTAREA {

width: 100%;

font-family: Verdana, Arial, sans-serif;

font-size: 11px;

}

 

SPAN.greetUser {

font-family: Verdana, Arial, sans-serif;

font-size: 12px;

color: #f0a480;

font-weight: bold;

}

 

TABLE.formArea {

background: #f1f9fe;

border-color: #7b9ebd;

border-style: solid;

border-width: 1px;

}

 

TD.formAreaTitle {

font-family: Tahoma, Verdana, Arial, sans-serif;

font-size: 12px;

font-weight: bold;

}

 

SPAN.markProductOutOfStock {

font-family: Tahoma, Verdana, Arial, sans-serif;

font-size: 12px;

color: #c76170;

font-weight: bold;

}

 

SPAN.productSpecialPrice {

font-family: Verdana, Arial, sans-serif;

color: #ff0000;

}

 

SPAN.errorText {

font-family: Verdana, Arial, sans-serif;

color: #ff0000;

}

 

.moduleRow { }

.moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: hand; }

.moduleRowSelected { background-color: #E9F4FC; }

 

.checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; }

.checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

 

/* message box */

 

.messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; }

.messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; }

.messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; }

 

/* input requirement */

#manu * {background:none;border:none;}

#manu select {background-color:#fff;border:1px solid #4a4a4a;}

.inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }

 

body {padding:0; margin:0; background-color:#ac9cad;}

body, td {font-family:Tahoma,verdana,arial; font-size:11px; color: #262520;}

 

.bg {background:url(images/bg.gif); background-repeat: repeat-x; background-position:top; background-color:#cacaca;}<br>

.bg1 {background:url(images/bg1.gif); background-repeat: repeat-x; background-position:top;}

.bg2 {background:url(images/m01.jpg); background-repeat: no-repeat; background-position:top right;}

.bg3 {background:url(images/m02.gif); background-repeat: no-repeat; background-position:top right;}

.bg4 {background:url(images/m04.gif); background-repeat: no-repeat; background-position:bottom right;}

.bg5 {background:url(images/bg2.gif); background-repeat: no-repeat; background-position:top left;}

.bg6 {background:url(images/bg3.gif); background-repeat: no-repeat; background-position:bottom left;}

.bg7 {background:url(images/m03.gif); background-repeat: no-repeat; background-position:top left;}

.bg8 {background:url(images/m21.gif); background-repeat: no-repeat; background-position:bottom left;}

.bg9 {background:url(images/m20.gif); background-repeat: no-repeat; background-position:bottom left}

.bg10 {background:url(images/bg4.gif);}

.bg11 {background:url(images/bg5.gif); background-repeat: repeat-x;}

.bg12 {background:url(images/bg6.gif); background-repeat: repeat-y;}

.bg13 {background:url(images/m05.gif); background-repeat: no-repeat; background-position:bottom left; background-color:#745985}

.bg14 {background:url(images/m36.gif); background-repeat: no-repeat; background-position:top;}

.bg15 {background:url(images/m37.gif); background-repeat: no-repeat; background-position:top;}

.bg16 {background:url(images/m38.jpg); background-repeat: repeat-y; background-position: left top;}

 

ul{

margin:0px;

padding:0px;

list-style:none;

}

ul li{

background:url(images/m19.gif) center left no-repeat; margin: 0 0 0 31px;

padding:0 0 0 18px;

}

ul a{

color:#EEF7A4;

text-decoration:none;

font-size:11px;

line-height:24px;

}

ul a:hover{

color:#FFF300;

}

.al{

background:url(images/m20.gif) center left no-repeat; margin:0 0 0 22px;

padding:0 0 0 17px;

}

 

ol{

margin:0px;

padding:0px;

list-style:none;

 

}

ol li{

background:url(images/m21.gif) center left no-repeat; margin: 0 0 0 22;

padding:0 0 0 17px;

}

ol a{

color:#0E0E0E;

text-decoration:none;

font-size:11px;

line-height:19px;

}

ol a:hover{

color:#A80B1C;

}

 

.se {width:83px; height:17px; font-family:tahoma,verdana,arial; color:#103553; font-size:10px; padding-left:2px;}

.go {height:17px; width:103px; font-family:tahoma,verdana,arial; font-size:10px; color:#103553; padding-left:2px; border:1px solid #50001A;}

.go1 {height:19px; width:42px; font-family:tahoma,verdana,arial; font-size:11px; color:#373737; text-align:center; font-weight:bold; line-height:11px;}

.ab { vertical-align: middle;}

 

.tx {font-size:11px; color:#FFFFFF;}

.tx1 {font-size:12px; color:#FFFFFF; font-family:arial; font-weight:bold; text-transform:uppercase;}

.tx2 {font-size:15px; color:#424242; font-weight:bold;}

.tx3 {font-size:15px; color:#FF0000; font-weight:bold;}

.tx4 {font-size:11px; color:#EEF7A4;}

.tx5 {font-size:12px; color:#9F1E47; font-family:arial; font-weight:bold; text-transform:uppercase;}

.tx5 a {font-size:12px; color:#9F1E47; font-family:arial; font-weight:bold; text-transform:uppercase;text-decoration:none;}

.tx6 {font-size:13px; color:#BA4909; font-weight:bold;}

.tx7 {font-size:11px; color:#BA4909; font-weight:bold;}

.tx8 {font-size:11px; color:#3B3B3B;}

 

 

.ml {color:#FFF300; font-size:11px; text-decoration:none; font-weight:bold;}

.ml:hover {text-decoration:underline;}

.ml1 {color:#860030; font-size:11px; text-decoration:none; font-weight:bold; line-height:14px;}

.ml1:hover {text-decoration:underline;}

.ml2 {color:#EEF7A4; font-size:11px; text-decoration:none;}

.ml2:hover {text-decoration:underline;}

.ml3 {color:#000000; font-size:11px; text-decoration:underline;}

.ml3:hover {text-decoration:none;}

.ml4_1 {color:#860030; font-size:11px; text-decoration:none; font-weight:bold; line-height:14px;}

.ml4 {color:#860030; font-size:11px; text-decoration:underline; font-weight:bold; line-height:14px;}

.ml4:hover {text-decoration:none;}

.ml5 {color:#860030; font-size:11px; text-decoration:none;}

.ml5:hover {text-decoration:underline;}

.ml6 {color:#FFFFFF; font-size:11px; text-decoration:none;}

.ml6:hover {text-decoration:underline;}

 

.smallText a, .orderEdit {color:#880032;text-decoration:underline;}

.smallText a:hover, .orderEdit:hover {color:#880032;text-decoration:none;}

 

.main a {color:#880032;text-decoration:none;}

.main a:hover {color:#880032;text-decoration:underline;}

 

#zxc2 ol li {background:none;}

 

 

Thanks to anyone that can help.

 

Antony

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×