Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

which contribution do i need ?


sunbonnetsue

Recommended Posts

I think i read someone where where a contribution was recomended to make changing the headers on pages easier , ie removing oscommerce, replace with store name, having looked in contributions, there are so many that ref to headers, does anyone know which one i need ??

 

cant script in graphical content yet, thats another challange for another year lol

 

thanks

Link to comment
Share on other sites

Please don't be offended at this, but given all of the posts you've made, and your confessed lack of knowledge about even basic html I would hold off on installing any 'contributions' at the moment. They nearly always need adapting in some way, or involve (in some cases) quite a complicated installation procedure.

 

Vger

Link to comment
Share on other sites

Please don't be offended at this, but given all of the posts you've made, and your confessed lack of knowledge about even basic html I would hold off on installing any 'contributions' at the moment.  They nearly always need adapting in some way, or involve (in some cases) quite a complicated installation procedure.

 

Vger

 

 

Ill take your advice on that vger, if you say its complicated then it must be.

 

is there an easier way to get the oscommerce logo off the top bar and lower down the Heading_title and change both to something that suits me ?

 

Ive pulled the file to my pc , but there is no much text in there i dont know what to remove and what to leave. Im happy to go with no graphic content while i learn the in's and outs of php, just changing these 2 headers means i can load products and go live while i work on improving everything localy first. (safest i think)

 

Thanks

Angela

 

Ps, could i give a huge thanks also for your perseverance with me, but i promise, i will get this into my head , bit by bit its happening.

Link to comment
Share on other sites

Simple template system is one of the easiest contributions to add to osc with very minor changes no deletes just 1 add, very simple and the benefits of this mod will out weight the negatives for any newcomer.

Link to comment
Share on other sites

That is only for a standard shop. If you need to edit the files, then there are many more changes to be made. They are not difficult, but they are there.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That is only for a standard shop.  If you need to edit the files, then there are many more changes to be made.  They are not difficult, but they are there.

 

Jack

 

 

 

i just want to edit and change those 2 headers and replace them with my own, im still searching for something that tells me what text to remove and what to leave, dont want to try anything until i know what im supposed to be doing.

Link to comment
Share on other sites

In the file includes/header.php, look for code similar to this

 

<img src="images/oscommerce.gif" width=204 height=50 border=0 align=left alt="Home">

 

change it to your own image, and image size, and if you want it centred then use <center> and </center> before and after.

 

Not sure what you mean by the 'other header', as there is only one header file.

 

Vger

Link to comment
Share on other sites

In the file includes/header.php, look for code similar to this

 

<img src="images/oscommerce.gif" width=204 height=50 border=0 align=left alt="Home">

 

change it to your own image, and image size, and if you want it centred then use <center> and </center> before and after.

 

Not sure what you mean by the 'other header', as there is only one header file.

 

Vger

 

 

ehh ill try explaine better..

 

top right corner.. oscommerce logo....under that the blue line across the page.. under that the words HEADER_TITLE .. those are what i want to change..

 

I just tried making a logo in dreamweaver but couldnt get it to save as a gif file.

 

learning curve hehe. maby i can make one in word and eddit in in photoshop or summit, wont know till i try .

Link to comment
Share on other sites

ehh ill try explaine better..

 

top right corner.. oscommerce logo....under that the blue line across the page.. under that the words HEADER_TITLE .. those are what i want to change..

 

I just tried making a logo in dreamweaver but couldnt get it to save as a gif file. 

 

learning curve hehe.  maby i can make one in word and eddit in in photoshop or summit, wont know till i try .

 

 

this will let you see what i mean, why i didnt do this in the first place... having a senior moment i think...

 

http://thepatchworkquilt.co.uk/oscommerce/...2410b6464f079b3

 

 

Sun

Link to comment
Share on other sites

Yes, changing that piece of code, as per my post, will replace the oscommerce.gif with your own image.

 

You can make an image in the Windows 'Paint' programme and save it as a gif, but if you have Photoshop all the better.

 

With regards to the header title you have to make several alterations to the root level index.php page, removing all references in tables to HEADER_TITLE (I believe there are two or three of them, not just one). It's ages since I did that, as I automatically set up pages to my own basic template.

 

This is the template (root level), with all HEAD_TITLE references removed, but also all left and right columns removed (as I don't use them). It goes after the </head> tag. It centers the page, and is a fixed size.

 

<body bgcolor="#ffffff">
<center><table width="738" border="0">
<tr>
<td><?php require(DIR_WS_INCLUDES . 'header.php'); ?></td>
</tr>
</table>
</center>
<center><table dir="ltr" width="738" border="0">
   <tr>
       <td valign="top" width="100%" class=main>
       <?php echo TEXT_MAIN; ?>
       </td>
           </tr>
       </table></center>

<center><table width="738" border="0"><tr><td><?php require(DIR_WS_INCLUDES . 'footer.php'); ?></td></tr></table>

</center>
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

Vger

ehh ill try explaine better..

 

top right corner.. oscommerce logo....under that the blue line across the page.. under that the words HEADER_TITLE .. those are what i want to change..

 

I just tried making a logo in dreamweaver but couldnt get it to save as a gif file. 

 

learning curve hehe.  maby i can make one in word and eddit in in photoshop or summit, wont know till i try .

Link to comment
Share on other sites

Vger

 

 

Thanks Vger !!

 

Im getting someplace, designed a very simple text only logo using paint and managed to use that to replace the oscommerce logo, tonight ill remove the HEADER_TITLE bit then get to work on the rest of my static pages.

 

Many many thanks

Sun

Link to comment
Share on other sites

If you use the basic template I posted above, and use the code below at the includes/languages/english/ level for the html part of the page then your new 'static pages' will be (provided the html code validates) W3C compliant. What this means is that your website will look the same no matter which browser people are using to view it.

 

define('NAVBAR_TITLE', 'The text you put here will appear on the navbar.  navbar=breadcrumb');

define('TEXT_MAIN', 'Put all of your html code in here');
?>

 

Hope this helps - Vger

Link to comment
Share on other sites

This is my index.php file, could you help me out finding the bits i need to change, i prob cant find it for looking to hard, and the odd bit where i think ,wow i understood that bit !

 

 

0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

 

>

 

 

 

 

 

 

 

 

 

 

 

 

PRODUCT_LIST_MODEL,

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

asort($define_list);

 

$column_list = array();

reset($define_list);

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

if ($value > 0) $column_list[] = $key;

}

 

$select_column_list = '';

 

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

switch ($column_list[$i]) {

case 'PRODUCT_LIST_MODEL':

$select_column_list .= 'p.products_model, ';

break;

case 'PRODUCT_LIST_NAME':

$select_column_list .= 'pd.products_name, ';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$select_column_list .= 'm.manufacturers_name, ';

break;

case 'PRODUCT_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity, ';

break;

case 'PRODUCT_LIST_IMAGE':

$select_column_list .= 'p.products_image, ';

break;

case 'PRODUCT_LIST_WEIGHT':

$select_column_list .= 'p.products_weight, ';

break;

}

}

 

// show the products of a specified manufacturer

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only a specific category

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

}

} else {

// show the products in a given categorie

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only specific catgeory

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$listing_sql .= " order by pd.products_name";

break;

}

}

} else {

$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);

$sort_order = substr($HTTP_GET_VARS['sort'], 1);

$listing_sql .= ' order by ';

switch ($column_list[$sort_col-1]) {

case 'PRODUCT_LIST_MODEL':

$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_NAME':

$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

break;

case 'PRODUCT_LIST_MANUFACTURER':

$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_QUANTITY':

$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_IMAGE':

$listing_sql .= "pd.products_name";

break;

case 'PRODUCT_LIST_WEIGHT':

$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_PRICE':

$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

?>

0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' ' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo ' ' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...