Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC to CSS v2


npn2531

Recommended Posts

Your rewrite is fine, almost. I have it posted on the demo at www dot css-oscommerce dot com/ninesixty and it's good.

What I have done is taken your code with the ordered list, removed the <div class="clear"></div>, and most importantly put the back the -> new cssinfoBox($info_box_contents);<- back in. Here is what I have on the demo.

$info_box_contents = array();
if ($notification_exists == true) {
$info_box_contents[] = array('text' => '<ol><li><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a>
				<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></li></ol>');
} else {
$info_box_contents[] = array('text' => '<ol><li><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a><p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></p></li></ol>');
} 

   new cssinfoBox($info_box_contents);

 }
?>

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • Replies 152
  • Created
  • Last Reply

Top Posters In This Topic

I had overwritten it with the original from the contrib but I have just changed it divs and it appears ok. I dont know what I have done different but it is now ok. I do have a problem with the also purchased products on product info though. They are all on the left. Having just looked, the module is calling for the old css styles from v1

 

$info_box_contents = array();

if ($notification_exists == true) {

$info_box_contents[] = array('text' => '<div class="clear"></div><ol><li><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></li></ol>');

} else {

$info_box_contents[] = array('text' => '<div class="clear"></div><ol><li><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a><p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></p></li></ol>');

}

open includes/modules/also_purchased_products.php

find this:


       $info_box_contents[$row][$col] = array('params' => 'class="pl also-purchased-products"',

 

Note the class designation 'pl' paired with 'also-purchased-products'. In your source code you do not have the 'pl' class. Without that class the stuff will not float left. Just add type in the 'pl' and it should be fine.

 

I will check the download and see if it is missing from there. Your editing and proofing this is a big help btw.

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

I did not include the also_purchased_products.php module in V2 at all, in fact I did not even rewrite it from version 1. You must be upgrading from Version 1? Anyway, let me know if my fix works, I will check it on my end, and then post it as an update on the contribution.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Thanks. Adding the pl solved the problem for the also purchased and I learned something else. Here is an attempt at the manufacturers_info.php. I think what I have is version 1 with version 2 dropped on top, so if this is not in V2, it has been left over from V1

 

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURER_INFO);

 

new cssinfoBoxHeading($info_box_contents, false, false);

 

 

$manufacturer_info_string = '';

if (tep_not_null($manufacturer['manufacturers_image'])) $manufacturer_info_string .= '<class="pl-image">' . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']) . '';

if (tep_not_null($manufacturer['manufacturers_url'])) $manufacturer_info_string .= '<ol><li><a href="' . tep_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer['manufacturers_name']) . '</a></li>';

$manufacturer_info_string .= '<li><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a></li></ol>' .

'';

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $manufacturer_info_string);

 

new cssinfoBox($info_box_contents);

?>

Edited by pdcelec
Link to comment
Share on other sites

manufacturers_info looks good, I have it posted on the demo. The code is fine, the styling needs a bit of work on the margins and line height. Same box is also in the tabs on products_info.php. You can style the same box for each location i with these:

 

#column_right .infobox{
}

and this:

#tabs .infobox{}

 

I have these in the styles.css already. If you do work on the styling and get something nice, post it.

 

Actually they will need the ol and li in the above CSS as well. Styling ordered/unordered lists is not my strong point

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

I am struggling with order history. If I setup an ordered list, the number is always 1. If I change it around, the box goes completely wild. I am thinking that the line "order by products name" is the culprit but not experienced enough to say for sure

 

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CUSTOMER_ORDERS);

 

new cssinfoBoxHeading($info_box_contents, false, false);

 

$product_ids = '';

while ($orders = tep_db_fetch_array($orders_query)) {

$product_ids .= (int)$orders['products_id'] . ',';

}

$product_ids = substr($product_ids, 0, -1);

 

// $customer_orders_string = '<table class="infobox">';

// $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int)$languages_id . "' order by products_name");

$products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int)$languages_id . "' order by products_name");

while ($products = tep_db_fetch_array($products_query)) {

$customer_orders_string .= '<div class="clear"></div><ol>' .

' <li><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a>' .

' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '">' . tep_image(DIR_WS_ICONS . 'cart.gif','infobox cart','','',ICON_CART,'infobox-cart') . '</a></li></ol>' .

' ';

}

// $customer_orders_string .= '</table>';

$customer_orders_string .= '';

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $customer_orders_string);

 

new cssinfoBox($info_box_contents);

Link to comment
Share on other sites

Your html looks fine. ( but you don't need the <div class="clear"></div>). Explain 'wild'. You are not stuck with numbering. The ol can be anything. The php code 'order by products_name ' is not going to affect the CSS or html, how anything looks, only the order the products are listed in.

 

Try <br> after the </a> to stack up the name over the icon, maybe. You can also float the image to the left or right of the name with something like this in styles.css:

 

img.infobox-cart{

float:left;

}

 

 

Here an excellent tutotial on <ul> and <ol>'s. It even has 'try it yourself' screens to test stuff out

 

www dot w3schools dot com/css/css_list.asp

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

I have had a look at the tutorial and will get that done next (and I assume you mean <br /> for xhtml).

 

I am getting a couple of errors reported by FWR error reporting

 

1.) Error: Undefined property: cssinfoBoxHeading::$table_data_parameters

File: includes/classes/boxes.php

Line: 33

 

2.)

Error: Undefined index: text

File: includes/classes/boxes.php

Line: 44

 

3.)

Error: Undefined variable: output

File: includes/boxes/ul_categories.php

Line: 117

 

 

4.)

Error: Undefined variable: output

File: includes/modules/cat_navbar.php

Line: 107

 

Also line 19 in reset.css says

background: transparent; (a missing #)( and for xhtml #fcfef5)

and a few "transparent" in styles.css(fcfef5)

Link to comment
Share on other sites

Very good work and I cant wait to see the fixes between you both uploaded, a nice minor feature would also be the "search for.." text to clear upon focus/click as seen here:

 

Example Code

 

 

Here is the code from that site, followed by the code lifted off includes/boxes/search.php. If you can meld the two, and get them working on your site, post it back and I will put it up on the demo and test it out. It looks quite do-able

from the site:

<form action="search.php" method="get"> 
<input type="text" name="q" size="40" class="q" id="q" value="Search..." onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" /> 
<input type="submit" value="Search"> 
</form>

 

from the search box:

tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'SSL', false), 'get').'<div class="search-box">'.tep_draw_input_field('keywords', '', 'size="10" maxlength="25" class="search-field" value="Search..." onFocus="clearDefault(this)" onBlur="Default(this)"').'<input type="hidden" name="search_in_description" value="1" /><input type="hidden" name="inc_subcat" value="1" />'.tep_hide_session_id() .'<input type="submit" name="search" value="" class="search-go" border="0" width="79" height="25"></div></form><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

On another site I had used this which works:

 

<table cellpadding="0" cellspacing="0" border="0">
							  <td width="100%" align="right"><b><?php echo IMAGE_BUTTON_SEARCH?>:</b><?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false),'get') ?><input type=text name="keywords" class="input" value="Search for..." onclick="this.value='';" onblur="if(!this.value) {this.value='Search for...'; }"><?php echo tep_image_submit('button_search_prod.gif','',' class="vam"')?></form></td>
								</table>

 

 

Ps I have a default review floating on the contact_us.php page on stock installation on internet explorer 8

Link to comment
Share on other sites

On another site I had used this which works:

 

<table cellpadding="0" cellspacing="0" border="0">
							  <td width="100%" align="right"><b><?php echo IMAGE_BUTTON_SEARCH?>:</b><?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false),'get') ?><input type=text name="keywords" class="input" value="Search for..." onclick="this.value='';" onblur="if(!this.value) {this.value='Search for...'; }"><?php echo tep_image_submit('button_search_prod.gif','',' class="vam"')?></form></td>
								</table>

 

 

Ps I have a default review floating on the contact_us.php page on stock installation on internet explorer 8

 

 

Here is the code and containing div for the searchbox used in the header of the contribution. How would you work it in to this. If you work on it and get it working, please post a link.

<!-- Search -->
<div class="search-box">
	<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'SSL', false), 'get'); ?>
	<?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="25" class="search-field" value="Search..." onFocus="clearDefault(this)" onBlur="Default(this)"');?>
	<input type="hidden" name="search_in_description" value="1" />
	<input type="hidden" name="inc_subcat" value="1" />
	<?php echo tep_hide_session_id() .'<input type="submit" name="search" value="" class="search-go" border="0" width="79" height="25">';?>	
	</form>
</div>	

 

Also, I'm not sure what you mean by a default review floating. Can you post a link to this?

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

No, I do know what you mean. The review box is there on purpose. It's there to demonstrate how flexible the infoboxes are in OSC to CSS v2.

 

Look at contact.php. You will see this about line 80:

<div class="grid_4 alpha">
<?php include(DIR_WS_BOXES . 'reviews.php'); ?>
</div>
<div class="clear"></div> 

 

You could insert any infobox there. The class="grid_4" lines it up in place. Note also that since it is in the #content section of the cart, you can style it differently than the same box in the #tabs, or in #column_right.

 

for example these two selectors shown below are in styles.css, and style it in the content but not in the side columns. I have infobox order_history.php on the account.php page, so the customer is sees their previous orders as soon as they are signed in. The infobox manufacturers_info.php is on product_info.php in the tabs section and well as in column right.

 

#content .infobox_heading{
background: none;
background: url(../images/onecol-body-bg.png) 0px 0px repeat-x;
font-weight: bold;
padding: 4px 10px 4px 5px;
width:286px;
}

#content .infobox{
text-align: left;
border-width:0px;
width:280px;
background-image: none;
}

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

This should do the trick... Please test it ;)

 

<!-- Search -->
<div class="search-box">
	<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'SSL', false), 'get'); ?>                                    
   <input type=text name="keywords" size="10" maxlength="25" class="search-field" value="Search..." onclick="this.value='';" onblur="if(!this.value) {this.value='Search...'; }">   
	<input type="hidden" name="search_in_description" value="1" />
	<input type="hidden" name="inc_subcat" value="1" />
	<?php echo tep_hide_session_id() .'<input type="submit" name="search" value="" class="search-go" border="0" width="79" height="25">';?>	
	</form>
</div>	

 

 

Also Ive noticed your advanced search result page aligns to the left and the search box height becomes smaller/ width is ok, also the floating review in internet explorer 8 is kinda over the contact us input box.

Edited by chrish
Link to comment
Share on other sites

The search box works great and is a definite improvement. Thanks! You can see it in the header and the footer on the demo.

 

I have not converted the advanced search result page for this mod, I just kind of ran out of steam before I got to that page.

 

That's disappointing about the IE and the floating infoboxes. The fix might be to use something like a conditional CSS rule for IE, like is discussed on this site:

www dot positioniseverything.net/articles/cc-plus dot html

 

If you work on that and come up with a fix, I would very much like to see it.

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

I'm looking to convert my existing site with this conversion but have so many mods installed it's a daunting task. It's mention in the install instructions that the conversion has been tested with a number of mods, cheeky I know, but do you have any instructions covering the conversion of these mods to fit with this?

 

Also, I've been trying to convert SEO Sitemap to fit with this without much success. Anyone else tried this one yet?

Link to comment
Share on other sites

I'm looking to convert my existing site with this conversion but have so many mods installed it's a daunting task. It's mention in the install instructions that the conversion has been tested with a number of mods, cheeky I know, but do you have any instructions covering the conversion of these mods to fit with this?

 

Also, I've been trying to convert SEO Sitemap to fit with this without much success. Anyone else tried this one yet?

 

I have just installed Sams anti-hacker to this (it wasnt easy but I learnt alot). I have installed the FWR sitemap without too much problem. I will have a go at installing the one you mentioned. If I get good results, I will post them. I have also found that the Tell a Friend box has the text from the search box. Not a difficult fix but just thought that I would mention it

Link to comment
Share on other sites

I have just installed Sams anti-hacker to this (it wasnt easy but I learnt alot). I have installed the FWR sitemap without too much problem. I will have a go at installing the one you mentioned. If I get good results, I will post them. I have also found that the Tell a Friend box has the text from the search box. Not a difficult fix but just thought that I would mention it

 

I took a look at Sitemap SEO last night and have some fairly useful initial results with the following code changes:

catalog/sitemap.php

<?php
/*
 $Id: sitemap_seo.php 1739 2007-12-20 00:52:16Z hpdl $
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License
 OSC to CSS v2.0 http://www.niora.com/css-oscommerce.php
*/

 require('includes/application_top.php');

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

 require(DIR_WS_MODULES . FILENAME_SITEMAP_SEO);
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);

 /****************** DISPLAY ARTICLES MANAGER LINKS *********************/           
 $showArticlesManager = '';
 if (count($articlesManagerLinksArray) > 0) 
 {  
   if (tep_not_null($settings['heading_articles_manager'])) { 
     $showArticlesManager .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_articles_manager'] . '</span></div>';
   }                          
   $showArticlesManager .= '<div class="grid_4 alpha"><span class="sitemap"><ul class="sitemap">';
   $pageCount = count($articlesManagerLinksArray);
   for ($i = 0; $i < $pageCount; ++$i) 
     $showArticlesManager .= '<li><a class="sitemap" href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articlesManagerLinksArray[$i]['link']) .'" title="' . $articlesManagerLinksArray[$i]['anchor_text'] . '">' . $articlesManagerLinksArray[$i]['text'] . '</a></li>';
   $showArticlesManager .= '</ul></span></div>';
 }    

 /****************** DISPLAY CATEGORIES *********************/
 $showCategories = '';
 if (tep_not_null($settings['heading_categories'])) { 
   $showCategories .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_categories'] . '</span></div>';
 }
 $showCategories .= '<div class="grid_4 apha"><span class="sitemap">';
 $class = (SITEMAP_SEO_DISPLAY_PRODUCTS_CATEGORIES == 'true') ? 'category_tree.php' : 'category_tree_no_products.php';
 require DIR_WS_CLASSES . $class;
 $osC_CategoryTree = new osC_CategoryTree(); 
 $showCategories .= $osC_CategoryTree->buildTree();                
 $showCategories .= '</span></div>';

 /****************** DISPLAY INFOPAGES LINKS *********************/           
 $showInfoPages = '';
 if (count($infoPagesArray) > 0) 
 {  
   if (tep_not_null($settings['heading_infopages'])) { 
     $showInfoPages .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_infopages'] . '</span></div>';
   }                         
   $showInfoPages .= '<div class="grid_4 apha"><span class="sitemap"><ul class="sitemap">';
   $pageCount = count($infoPagesArray);
   for ($i = 0; $i < $pageCount; ++$i) 
			$showInfoPages .= '<li><a class="sitemap" href="' . tep_href_link(FILENAME_INFORMATION, 'info_id='. $infoPagesArray[$i]['link']) .'" title="' . $infoPagesArray[$i]['anchor_text'] . '">' . $infoPagesArray[$i]['text'] . '</a></li>';
   $showInfoPages .= '</ul></span></div>';
 }    

 /****************** DISPLAY MANUFACTURERS *********************/
 $showManufacturers = '';
 if (count($manufacturersArray) > 0) 
 {
   if (tep_not_null($settings['heading_manufacturers'])) { 
     $showManufacturers .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_manufacturers'] . '</span></div>';
   }  
   $showManufacturers .= '<div class="grid_4 apha"><span class="sitemap"><ul class="sitemap">';
   $pageCount = count($manufacturersArray);
   for ($i = 0; $i < $pageCount; ++$i)
   { 
 		$showManufacturers .= '<li><a class="sitemap" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturersArray[$i]['link']) .'" title="' . $manufacturersArray[$i]['anchor_text'] . '">' . $manufacturersArray[$i]['text'] . '</a></li>';
     $cnt = count($manufacturersArray[$i]['productArray']);

     if ($cnt > 0)
     {
       $showManufacturers .= '<ul>';
       for ($p = 0; $p < $cnt; ++$p)
       {
         $pA = $manufacturersArray[$i]['productArray'][$p]; //makes it more readable
    		 $showManufacturers .= '<li><a class="sitemapProducts" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $pA['link']) .'" title="' . $pA['anchor_text'] . '">' . $pA['text'] . '</a></li>';
       }
       $showManufacturers .= '</ul>';
     } 
   }  
   $showManufacturers .= '</ul></span></div>';
 }

 /****************** DISPLAY PAGEMANAGER LINKS *********************/           
 $showPageManager = '';
 if (count($pageManagerLinksArray) > 0) 
 {  
   if (tep_not_null($settings['heading_page_manager'])) { 
     $showPageManager .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_page_manager'] . '</span></div>';
   }                         
   $showPageManager .= '<div class="grid_4 apha"><span class="sitemap"><ul class="sitemap">';
   $pageCount = count($pageManagerLinksArray);
   for ($i = 0; $i < $pageCount; ++$i) 
			$showPageManager .= '<li><a class="sitemap" href="' . tep_href_link(FILENAME_PAGES, 'page=' . $pageManagerLinksArray[$i]['link']) .'" title="' . $pageManagerLinksArray[$i]['anchor_text'] . '">' . $pageManagerLinksArray[$i]['text'] . '</a></li>';
   $showPageManager .= '</ul></span></div>';
 }    

 /****************** DISPLAY STANDARD INFOBOXES LINKS *********************/
 $showInfoBoxes = '';    
 if (count($boxDataArray) > 0) 
 {  
   if (tep_not_null($settings['heading_standard_boxes'])) { 
     $showInfoBoxes .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_standard_boxes'] . '</span></div>';
   }                          
   $showInfoBoxes .= '<div class="grid_4 apha"><span class="sitemap"><ul class="sitemap">';
		$showInfoBoxes .= '<li>'.$boxDataArray[0]['heading'].'</li><ul>'; 
   $pageCount = count($boxDataArray);
   for ($i = 0; $i < $pageCount; ++$i) 
			$showInfoBoxes .= '<li><a class="sitemap" href="' . tep_href_link($boxDataArray[$i]['link']) .'" title="' . $boxDataArray[$i]['anchor_text'] . '">' . $boxDataArray[$i]['text'] . '</a></li>';
   $showInfoBoxes .= '</ul></ul></span></div>';
 }   

 /****************** DISPLAY STANDARD PAGES *********************/
 $showPages = '';
 if (count($pagesArray) > 0)
 {
   if (tep_not_null($settings['heading_standard_pages'])) { 
     $showPages .= '<div class="grid_4 apha"><span class="sitemapHeading" align="' . SITEMAP_SEO_HEADING_ALIGNMENT . '">' . $settings['heading_standard_pages'] . '</span></div>';
   }                         
   $showPages .= '<div class="grid_4 apha"><span class="sitemap"><ul class="sitemap">';
   $pageCount = count($pagesArray); 
   if ($pageCount > 0)  
     for ($b = 0; $b < $pageCount; ++$B)  
       $showPages .= '<li><a class="sitemap" title="'. $pagesArray[$b]['anchor_text'] .'" href="' . tep_href_link($pagesArray[$b]['link']) . '">' . $pagesArray[$b]['text'] . '</a></li>';
   $showPages .= '</ul></span></div>';
 }


 /****************** BUILT THE DISPLAY  *********************/
 $leftColDisplay = array();
 $rightColDisplay = array();
 $sortOrderArray = array(array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_ARTICLES_MANAGER, 'sortkey' => SITEMAP_SEO_SORTORDER_ARTICLES_MANAGER, 'module' => $showArticlesManager),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_CATEGORIES, 'sortkey' => SITEMAP_SEO_SORTORDER_CATEGORIES, 'module' => $showCategories),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_INFOPAGES, 'sortkey' => SITEMAP_SEO_SORTORDER_INFOPAGES, 'module' => $showInfoPages),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_MANUFACTURERS, 'sortkey' => SITEMAP_SEO_SORTORDER_MANUFACTURERS, 'module' => $showManufacturers),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_PAGE_MANAGER, 'sortkey' => SITEMAP_SEO_SORTORDER_PAGE_MANAGER, 'module' => $showPageManager),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_STANDARD_BOXES, 'sortkey' => SITEMAP_SEO_SORTORDER_STANDARD_BOXES, 'module' => $showInfoBoxes),
                         array('placement' => SITEMAP_SEO_MODULE_PLACEMENT_STANDARD_PAGES, 'sortkey' => SITEMAP_SEO_SORTORDER_STANDARD_PAGES, 'module' => $showPages));

 foreach($sortOrderArray as $key)
 {
   if (tep_not_null($key['module']))
   {
     if ($key['placement'] == 'left')                 
       $leftColDisplay[] = $key;  
     else                          
       $rightColDisplay[] = $key;  
   }
 }

 usort($leftColDisplay, "SortOnKeys"); 
 usort($rightColDisplay, "SortOnKeys");
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SITEMAP_SEO));
echo $doctype;
?>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<?php echo $stylesheet; ?>

<?php require(DIR_WS_INCLUDES . 'template-top.php'); ?>

<div class="grid_8 alpha">
<div class="grid_4 alpha"><h1><?php echo HEADING_TITLE; ?></h1></div>
<div class="grid_4 alpha"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT,'','stock-image'); ?></div><p>
</div>
<div class="clear"></div>

<div class="grid_8 alpha">
<div class="grid_4 alpha">
<!-- DISPALY THE LEFT COLUMN -->

            <?php
             for ($i = 0; $i < count($leftColDisplay); ++$i)
              echo $leftColDisplay[$i]['module'];
             ?>
</div>
<div class="grid_4 alpha">
<!-- DISPALY THE RIGHT COLUMN -->

            <?php
             for ($i = 0; $i < count($rightColDisplay); ++$i)
              echo $rightColDisplay[$i]['module'];
             ?>
</div>
</div>
<div class="clear spacer-tall"></div>
<div class="grid_8 alpha">
<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?>
</div>
<!--close grid_8-->

<div class="clear spacer-tall"></div>

<?php 
require(DIR_WS_INCLUDES . 'template-bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php'); 
?>

 

includes/modules/sitemap_category.php

<?php
/*
 $Id: sitemap_seo.php,v 1.0 2008/12/29
 written by Jack_mcs at www.osocmmerce-solution.com

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

 Copyright (c) 2008 osocmmerce-solution.com
 Portions Copyright 2009 oscommerce-solution.com

 Released under the GNU General Public License
*/
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);

 $registeredOnly = tep_session_is_registered('customer_id') ? 1 : 0;
 $settings_query = tep_db_query("select * from " . TABLE_SITEMAP_SEO_SETTINGS . " where language_id = '" . (int)$languages_id . "' LIMIT 1");
 $settings = tep_db_fetch_array($settings_query);


 if (basename($_SERVER['PHP_SELF']) == FILENAME_PRODUCT_INFO)  
     $cpPath = tep_get_product_path($_GET['products_id']); 
 else
     $cpPath = $cPath; 

 if (strpos($cpPath, "_") !== FALSE) 
 {
     $parts = explode("_", $cpPath); 
     $cID = $parts[0]; 
 }
 else 
     $cID = $cpPath;

 $catname_query = tep_db_query("select categories_name as cname from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cID . "' and language_id = '" . (int)$languages_id . "' limit 1");
 $catname =  tep_db_fetch_array($catname_query);

 $showCategories = '';
 $showCategories .= '<div class="grid_4 alpha"><span class="sitemap">';
 $class = (SITEMAP_SEO_DISPLAY_PRODUCTS_CATEGORIES == 'true') ? 'category_tree.php' : 'category_tree_no_products.php';
 require DIR_WS_CLASSES . $class;
 $osC_CategoryTree = new osC_CategoryTree($cID); 
 $showCategories .= $osC_CategoryTree->buildTree();                
 $showCategories .= '</span></div>';

?>
  <div class="clear"></div>
        <span class="sitemap_indvidual"><?php echo $catname['cname']; ?></span>
      </div>

  <?php
    echo $showCategories;
  ?>

 

includes/modules/sitemap_products.php

<?php
/*
 $Id: sitemap_seo.php,v 1.0 2008/12/29
 written by Jack_mcs at www.osocmmerce-solution.com

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

 Copyright (c) 2008 osocmmerce-solution.com
 Portions Copyright 2009 oscommerce-solution.com

 Released under the GNU General Public License
*/
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);

 $pPath = tep_get_product_path($_GET['products_id']); 
 if (strpos($pPath, "_") !== FALSE) 
 {
$parts = explode("_", $pPath); 
$cID = $parts[count($parts) - 1]; 
 }
 else 
   $cID = $pPath;

 $category_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c inner join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id where c.categories_id = '" . (int)$cID . "' and cd.language_id = '" . (int)$languages_id . "' LIMIT 1");
 $category = tep_db_fetch_array($category_query); 

 $products_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p inner join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_id != '" . $_GET['products_id'] . "' and p2c.categories_id = '" . (int)$cID . "' and pd.language_id = '" . (int)$languages_id . "'");

 if (tep_db_num_rows($products_query))
 {  
    $catLink = '<a class="sitemap_indvidual_hdg" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['categories_id']) . '">' . $category['categories_name'] . '</a>';

    echo '<div class="grid_4 alpha">
<span>
<div class="grid_4 alpha">';
    echo '<div class="grid_4 alpha"><span class="sitemap_indvidual_hdg">'.sprintf(TEXT_CATEGORY_NAME, $catLink) . '</span></div>';
    while ($prods = tep_db_fetch_array($products_query))
    {
      echo '<div class="grid_4 alpha"><div class="clear spacer-tall"></div><span class="sitemap_indvidual"><a class="sitemap_indvidual" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prods['products_id']) . '">' . $prods['products_name'] . '</a></span></div>';
    }
    echo '</div></span></div>';
 }

?>

 

I'm sure there are some erroneous div's in there somewhere, so if anyone can simplify :) but it works thus far

Link to comment
Share on other sites

I have just installed Sams anti-hacker to this (it wasnt easy but I learnt alot). I have installed the FWR sitemap without too much problem. I will have a go at installing the one you mentioned. If I get good results, I will post them. I have also found that the Tell a Friend box has the text from the search box. Not a difficult fix but just thought that I would mention it

 

I've been looking at Sams Anti Hacker mod too and have most of it complete but create_account is proving difficult. have you been able to convert this page?

Link to comment
Share on other sites

I'm looking to convert my existing site with this conversion but have so many mods installed it's a daunting task. It's mention in the install instructions that the conversion has been tested with a number of mods, cheeky I know, but do you have any instructions covering the conversion of these mods to fit with this?

 

Also, I've been trying to convert SEO Sitemap to fit with this without much success. Anyone else tried this one yet?

Mods are so hard to install. If you have what you need working, then I would try and convert what you have. To convert to OSC to CSS you essentially are going to be doing the same thing over and over to each page. For starters, I would upload everything in OCS to CSS that doesn't overwrite what any existing pages, with the exception of includes/functions/html_output.php. It has the programming for old and new. Then put in the references to the stylesheets in application_top. Then overwrite any catalog page that you has no alterations from any of your contributions. Before you do that, take one simple page, like any of the information pages. Compare old and new. Then go through the old, say cookies usage page blindly delete any table, td, tr. Now go back and compare old and new. Look and see what is different. The problem pages are product_info.php and index.php. But again, you can get 90% of the way there by blindly deleting all the tables, td and tr. Then it is easier to see where to go back and place the div. Be sure you are using OSC to CSS v2, is much easier.

 

It is really more tedium than rocket science

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

I've been looking at Sams Anti Hacker mod too and have most of it complete but create_account is proving difficult. have you been able to convert this page?

Yes, here it is. Please note that I have altered the input boxes to align with the name but that can easily be altered. Also note that I use KISS meta tags, so that line will need to be altered to whatever header tags contrib you have

<?php

/*

$Id: create_account.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

OSC to CSS v2.0 http://www.niora.com/css-oscommerce.php

*/

// anti-hacker account

$no_pword = true; // set to true to disable password requirement & enable 'remember me' check box.

$login_box = true; // set to true to show login box above create account box

$top_phone = false; // set to true to show phone fields with personal details

$no_fax = false; // set to true to disable fax fields

require('includes/functions/account_secure.php');

$password = tep_to_hex($_POST['password']);

$pw_size = strlen($_POST['password']);

$pw_match = ($_POST['confirmation'] == $_POST['password']);

$strong_pw = tep_strong_password($_POST["password"]);

unset($_POST['password']);unset($_POST['confirmation']);

$email_address = '';

clean_post ();

// EOF anti-hacker account

require('includes/application_top.php');

// ajax

require(DIR_WS_FUNCTIONS . 'ajax.php');

if (isset($_POST['action']) && $_POST['action'] == 'getStates' && isset($_POST['country'])) {

ajax_get_zones_html(tep_db_prepare_input($_POST['country']));

} else {

$nocart = ($cart->count_contents() < 1);

if ($nocart) $no_pword = false;

if ($no_pword) $pw_match = true;

$country = STORE_COUNTRY;

// EOF ajax

// needs to be included earlier to set the success message in the messageStack

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

$process = false;

if (isset($_POST['action']) && ($_POST['action'] == 'process')) {

$process = true;

// anti-hacker account

$_POST['dob'] = $_POST['dob_ind'].'/'.$_POST['dob_inm'].'/'.$_POST['dob_in'];

// EOF anti-hacker account

if (ACCOUNT_GENDER == 'true') {

if (isset($_POST['gender'])) {

$gender = tep_db_prepare_input($_POST['gender']);

} else {

$gender = false;

}

}

$firstname = tep_db_prepare_input($_POST['firstname']);

$lastname = tep_db_prepare_input($_POST['lastname']);

if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);

$email_address = tep_db_prepare_input($_POST['email_address']);

if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);

$street_address = tep_db_prepare_input($_POST['street_address']);

if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);

$postcode = tep_db_prepare_input($_POST['postcode']);

$city = tep_db_prepare_input($_POST['city']);

if (ACCOUNT_STATE == 'true') {

$state = isset($_POST['state']) ? tep_db_prepare_input($_POST['state']) : '';

if (isset($_POST['zone_id'])) {

$zone_id = tep_db_prepare_input($_POST['zone_id']);

} else {

$zone_id = false;

}

}

$country = tep_db_prepare_input($_POST['country']);

$telephone = tep_db_prepare_input($_POST['telephone']);

$fax = tep_db_prepare_input($_POST['fax']);

if (isset($_POST['newsletter'])) {

$newsletter = tep_db_prepare_input($_POST['newsletter']);

} else {

$newsletter = false;

}

// $password = tep_db_prepare_input($_POST['password']);

// $confirmation = tep_db_prepare_input($_POST['confirmation']);

// anti-hacker account start

$details = isset($_POST['details']) ? $_POST['details'] : false;

if ($no_pword) {

$password = '';

while (!tep_strong_password($password) || !tep_not_null($password)) $password = tep_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);

$crypted_password = tep_to_hex($password);

$pw_size = ENTRY_PASSWORD_MIN_LENGTH;

}

// anti-hacker account end

$messagePage = 'create_account';

$error = false;

// anti-hacker account start

$short_check = false;

include(DIR_WS_MODULES . 'validate_name_fields.php');

include(DIR_WS_MODULES . 'validate_address_fields.php');

// if ($pw_size < ENTRY_PASSWORD_MIN_LENGTH) {

// anti-hacker account end

/*

if (ACCOUNT_GENDER == 'true') {

if ( ($gender != 'm') && ($gender != 'f') ) {

$error = true;

$messageStack->add('create_account', ENTRY_GENDER_ERROR);

}

}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);

}

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);

}

if (ACCOUNT_DOB == 'true') {

if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {

$error = true;

$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);

}

}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);

} elseif (tep_validate_email($email_address) == false) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);

} else {

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

$check_email = tep_db_fetch_array($check_email_query);

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

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

}

if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);

}

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_POST_CODE_ERROR);

}

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_CITY_ERROR);

}

if (is_numeric($country) == false) {

$error = true;

$messageStack->add('create_account', ENTRY_COUNTRY_ERROR);

}

if (ACCOUNT_STATE == 'true') {

$zone_id = 0;

$check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");

$check = tep_db_fetch_array($check_query);

$entry_state_has_zones = ($check['total'] > 0);

if ($entry_state_has_zones == true) {

$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name = '" . tep_db_input($state) . "' or zone_code = '" . tep_db_input($state) . "')");

if (tep_db_num_rows($zone_query) == 1) {

$zone = tep_db_fetch_array($zone_query);

$zone_id = $zone['zone_id'];

} else {

$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);

}

} else {

if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR);

}

}

}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);

}

if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {

*/

if ($pw_size < ENTRY_PASSWORD_MIN_LENGTH) {

$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);

// } elseif ($password != $confirmation) {

} elseif (!$pw_match) {

$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);

}

if (!$strong_pw) {

$messageStack->add('create_account', ENTRY_PASSWORD_STRONG_ERROR);

$error = true;

}

// EOF anti-hacker account

if ($error == false) {

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

// 'customers_password' => tep_encrypt_password($password));

// anti-hacker account

'customers_password' => tep_encrypt_password($no_pword ? $crypted_password : $password));

// EOF anti-hacker account

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

$customer_id = tep_db_insert_id();

$sql_data_array = array('customers_id' => $customer_id,

'entry_firstname' => $firstname,

'entry_lastname' => $lastname,

'entry_street_address' => $street_address,

'entry_postcode' => $postcode,

'entry_city' => $city,

'entry_country_id' => $country);

if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;

if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;

if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;

if (ACCOUNT_STATE == 'true') {

if ($zone_id > 0) {

$sql_data_array['entry_zone_id'] = $zone_id;

$sql_data_array['entry_state'] = '';

} else {

$sql_data_array['entry_zone_id'] = '0';

$sql_data_array['entry_state'] = $state;

}

}

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

if (SESSION_RECREATE == 'true') {

tep_session_recreate();

}

$customer_first_name = $firstname;

$customer_default_address_id = $address_id;

$customer_country_id = $country;

$customer_zone_id = $zone_id;

tep_session_register('customer_id');

tep_session_register('customer_first_name');

tep_session_register('customer_default_address_id');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

// restore cart contents

$cart->restore_contents();

// build the message content

$name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {

if ($gender == 'm') {

$email_text = sprintf(EMAIL_GREET_MR, $lastname);

} else {

$email_text = sprintf(EMAIL_GREET_MS, $lastname);

}

} else {

$email_text = sprintf(EMAIL_GREET_NONE, $firstname);

}

// anti-hacker account

if (!$no_pword) $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

else $email_text .= EMAIL_WELCOME . EMAIL_CONTACT . EMAIL_WARNING;

if ($no_pword && $details) { $email_text .= EMAIL_PASSWORD . $password; }

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

if (!$no_pword || $nocart) { tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

} else {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'info_message=' . TEXT_ACCOUNT_CREATED, 'SSL'));

}

// EOF anti-hacker account

// $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

// tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

}

}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

echo $doctype;

?><html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />

<?php include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; ?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />

<?php echo $stylesheet; ?>

<?php require('includes/form_check.js.php'); ?>

<?php require(DIR_WS_INCLUDES . 'template-top.php'); ?>

<?php// echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>

<!-- anti-hacker account -->

<h1><?php echo HEADING_TITLE; ?></h1>

<?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT,'','stock-image'); ?>

<div class="clear"></div>

<p class="smallText"><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></p>

<!-- anti-hacker account -->

<?php if (!$login_box) { ?>

<br /><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?>

<?php } elseif (!$process) { ?>

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo HEADING_RETURNING_CUSTOMER; ?>

</div>

<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>

<p class="spacer-forms"><?php echo ENTRY_EMAIL_ADDRESS; ?>

<?php echo tep_draw_input_field('email_address', '', 'size="28"'); ?></p>

<p class="spacer-forms"><?php echo ENTRY_PASSWORD; ?>

<?php echo tep_draw_password_field('password', '', 'size="16" maxlength="22"'); ?></p>

<p class="smallText"><?php echo 'Forgotten Your Password? ' . '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, 'email_address=' . $email_address, 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></p>

<?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?>

<?php// echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>

<?php } ?>

</div>

<!-- EOF anti-hacker account -->

<?php

if ($messageStack->size('create_account') > 0) {

echo $messageStack->output('create_account');

}

?>

<!-- anti-hacker account -->

<?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><!-- ajax --><div class="indicator"></div><!-- eof ajax -->

<!-- EOF anti-hacker account -->

<!--<div class="right-align inputrequirement"><?php// echo FORM_REQUIRED_INFORMATION; ?></div>-->

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo CATEGORY_PERSONAL; ?>

</div>

<div class="clear"></div>

<?php// echo $colpos; ?>

<?php

if (ACCOUNT_GENDER == 'true') {

?>

<p class="spacer-forms">

<?php echo ENTRY_GENDER; ?>

<?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>

</p>

<?php

}

?>

<p class="spacer-forms"><?php echo ENTRY_FIRST_NAME; ?>

<?php echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>

</p>

<p class="spacer-forms"><?php echo ENTRY_LAST_NAME; ?>

<?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>

</p>

<?php

if (ACCOUNT_DOB == 'true') {

// anti-hacker account

$def_year = isset($_POST['dob_in']) ? $_POST['dob_in'] : 1980;

$day = isset($_POST['dob_ind']) ? $_POST['dob_ind'] : '00';

$month = isset($_POST['dob_inm']) ? $_POST['dob_inm'] : '00';

?>

<p class="spacer-forms"><?php echo ENTRY_DATE_OF_BIRTH; ?>

<?php echo tep_pull_down_date('dob_in', $day, $month, $def_year, true, 1900) . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>

</p>

<?php

}

?>

<p class="spacer-forms"><?php echo ENTRY_EMAIL_ADDRESS; ?>

<?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>

</p>

<?php if ($top_phone) { ?>

<p class="spacer-forms"><?php echo ENTRY_TELEPHONE_NUMBER; ?>

<?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>

</p>

<?php if (!$no_fax) { ?>

<p class="spacer-forms"><?php echo ENTRY_FAX_NUMBER; ?>

<?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>

</p>

<?php

} }

?>

</div>

<!-- EOF anti-hacker account -->

<?php

if (ACCOUNT_COMPANY == 'true') {

?>

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo CATEGORY_COMPANY; ?>

</div>

<p class="spacer-forms"><?php echo ENTRY_COMPANY; ?>

<?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>

</p>

</div>

<?php

}

?>

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo CATEGORY_ADDRESS; ?>

</div>

<!-- anti-hacker account -->

<?php

include(DIR_WS_MODULES . 'address_fields.php');

?>

</div>

<?php if (!$top_phone) { ?>

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo CATEGORY_CONTACT; ?>

</div>

<p class="spacer-forms"><?php echo ENTRY_TELEPHONE_NUMBER; ?>

<?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>

</p>

<?php if (!$no_fax) { ?>

<p class="spacer-forms"><?php echo ENTRY_FAX_NUMBER; ?>

<?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>

</p>

<?php } ?>

</div>

<?php

}

?>

<!-- EOF anti-hacker account -->

<div class="grid_4 alpha">

<div class="account-heading">

<?php echo CATEGORY_OPTIONS; ?>

</div>

<p class="spacer-forms"><?php echo ENTRY_NEWSLETTER; ?>

<?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>

</p>

</div>

<div class="grid_4 alpha">

<div class="account-heading">

<b><?php echo $no_pword ? CATEGORY_DETAILS : CATEGORY_PASSWORD; ?></b>

</div>

<?php if (!$no_pword) {

// echo $colpos; ?>

<p class="spacer-forms"><?php echo ENTRY_PASSWORD; ?>

<?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>

</p>

<p class="spacer-forms"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?>

<?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>

</p>

<?php } else { ?>

<?php

/* if ($process == true) {

if ($entry_state_has_zones == true) {

$zones_array = array();

$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");

while ($zones_values = tep_db_fetch_array($zones_query)) {

$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

}

echo tep_draw_pull_down_menu('state', $zones_array);

} else {

echo tep_draw_input_field('state');

}

} else {

echo tep_draw_input_field('state');

}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

}*/

?>

<div class="spacer-tall"></div>

<p class="spacer-forms"><?php echo ENTRY_SAVE_DETAIL ; ?>

<?php echo tep_draw_checkbox_field('details', '1'); ?>

</p>

</div>

</div>

<?php } ?>

<!--<div class="spacer-tall"></div>

<div class="spacer-tall"></div> -->

<div class="clear spacer-tall"></div>

<div class="grid_8 right-align"></div>

<?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>

<?php echo FORM_REQUIRED_INFORMATION; ?>

</form>

</div>

<div class="clear spacer-tall"></div>

<?php

require(DIR_WS_INCLUDES . 'template-bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

// ajax

}

// EOF ajax

?>

<?php

?>

Edited by pdcelec
Link to comment
Share on other sites

I have a daft question.

 

How do I get a background image at the bottom of the site 100% width. I have an image but it is currently filling the footer. I have tried various methods but it always ends up at the top.

 

Sorry for asking a basic question

Link to comment
Share on other sites

I have a daft question.

 

How do I get a background image at the bottom of the site 100% width. I have an image but it is currently filling the footer. I have tried various methods but it always ends up at the top.

 

Sorry for asking a basic question

Using a bit of CSS you should be able to walk the image all over the page.

 

For example:

 

body{
background: url(images/my-image.gif) no-repeat 0 100%;
}

 

Should peg your image on the lower left of your body

 

 

body{
background: url(images/my-image.gif) no-repeat 100% 100%;
}

 

pegs it lower right

 

body{
background: url(images/my-image.gif) no-repeat 50% 50%;
}

 

starts the image in the center of the page.

 

You can also use px

 

.content{
background: url(images/my-image.gif) no-repeat 10px 20px;
}

 

places the image 10 pixels across the x axis and 20 pixels down the y axis in any div with a class of 'content'. BTW basic questions are more fun to answer. Also visit www.w3schools.com for great tutorials on this, I use it all the time.

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...