Jump to content



Photo
* * * * - 2 votes

2.3.1: A "How To..." Road Map...(NO QUESTIONS, JUST HOW TO'S PLEASE)


This topic has been archived. This means that you cannot reply to this topic.
52 replies to this topic

#21   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 07 January 2011 - 20:37

35. Add a image to your footer (image in #33 above).

I put a white layer in Illustrator (or Photoshop) over mine and turned the opacity of that layer down to expose the image below as you see it in #33 above because I didn't want to detract from the rest of the page...to make the image more subtle.

a. Add your image to the folder you want.
b. catalog/includes/languages/english.php
define('FOOTER_TEXT_BODY', '<a href="' . tep_href_link(FILENAME_DEFAULT) . '"></a><br/><font color=#C4BBA7>Powered by <a href="http://www.oscommerce.com" style="color:#C4BBA7" target="_blank">osCommerce</a><br><img src="images/footer/creditlogos_small_mtbthreads.png"><a href="http://mtbthreads.com/catalog/privacy.php"><img src="images/footer/comodoSSL.png"></a>');
I made the SSL image a link to my privacy page...you could do the same for the credit logos as well.

Edited by ErikMM, 07 January 2011 - 20:37.


#22   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 08 January 2011 - 22:00

36. Change "Categories" into a jpg or gif: http://forums.oscomm...o-a-jpg-or-gif/

37. Add login box in right column v2.3.1: http://forums.oscomm...ht-column-v231/ Personally, I don't see the point of this as the "Account" button will suffice, but to each their own...

#23   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 12 January 2011 - 08:56

38. 2.3.1 Add-ons: 2.3.1 Add-Ons

39. Templates can be a bad idea: link

There are some people you can trust not to hack, like perhaps Gary: Club OSC

The point of this thread is to help you make the changes so you know what you did, (and how) in case you want to undo what you did. If you get a template you are often walking in the dark. Pay close attention to some of the posts and problems on this site. Quite often it involves a template (and/or a contribution).

Add-Ons are safer. Here are two new Add-Ons for themes in lieu of themroller: 1) 1.8.6 jquery themes got oscv2.3.1, 2) Admin_theme_switcher v1.0

Note: if you made changes to Redmond/jQuery (as mentioned in this thread in one or more situations) save what you did as changing back and forth to different themes with the above add-ons, or themeroller, will not regenerate the changes you made to jQuery. On that note, it's better to make changes in catalog/stylesheet, but some jQuery/redmond stylesheet changes are needed depending on how you want to change the look of your site. I wouldn't recommend any jQuery changes beyond the stylesheet.

Edited by ErikMM, 12 January 2011 - 09:00.


#24   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 16 January 2011 - 18:14

40. If you have Comodo SSL and want one of these:
[img]http://www.trustlogo.com/images/cot.gif[/img] [img]http://www.trustlogo.com/images/tl_transp.gif[/img]

the site: http://www.trustlogo...ogo_choice.html

says http://www.trustlogo...rt/index2.html:

Copy/Paste the following piece of code and insert EXACTLY before your </HEAD> tag.

AND

Copy/Paste the following piece of code and insert EXACTLY before your </BODY> tag.


I wanted the red corner logo. In lieu of adding a head and body tag to a php page, I just put both snippets of code on all the SSL pages at the end after "?>" like so:
?>
<script language="javascript" type="text/javascript">
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<scr'   'ipt language="JavaScript" src="' cot_loc0 '" type="text\/javascript">'   '<\/scr'   'ipt>');
//]]>
</script>
<a href="http://www.instantssl.com" id="comodoTL">Comodo SSL Certificate</a>
<script language="JavaScript" type="text/javascript">
COT("http://mysite.com/catalog/images/home/cot.gif", "SC2", "none");
</script>

I added the code to the end of all the SSL pages: catalog/ all "account_", "checkout_", "address_", and "create_" files...also login, logoff, and password_forgotten

There is probably a faster way to get it it show on all SSL pages, but what I did will suffice.

41. I made my "privacy" page SSL as well, to show customers, as an example, what they will see on SSL pages....the http"s" and the logo etc.

To create a SSL page (in my case the privacy page), you need only modify the link to that page. The link was in the info box for me: catalog/includes/modules/boxes/bm_information

this:
'    <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . 
MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
was changed to this:
'    <a href="' . tep_href_link(FILENAME_PRIVACY, "", "SSL") . '">' . 
MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
simple

I wouldn't recommend making your entire site SSL, it is not necessary. 2.3.1 already has all the appropriate pages set-up for when you do get a certificate.

#25   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 18 January 2011 - 21:35

40. Modification to #40 above:

make sure "s" is added to the second script
COT("http://mysite.com/catalog/images/home/cot.gif", "SC2", "none");
like so
COT("https://mysite.com/catalog/images/home/cot.gif", "SC2", "none");

Otherwise you may lose your blue or green address bar.

Edited by ErikMM, 18 January 2011 - 21:36.


#26   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 19 January 2011 - 09:28

42. If you aren't doing menu sprites etc. you can (link):have a "horizontal drop-down or vertical fly-out menu, an expandable/collapsable tree menu, or even a plain vertical or horizontal menu"

Edited by ErikMM, 19 January 2011 - 09:32.


#27   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 21 January 2011 - 19:37

43. I wish I would have found this sooner, GREAT tips!

http://multimixer.gr...oscommerce-v23/

#28   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 24 January 2011 - 09:56

44. related to #27

Change left (or right) column width: http://forums.oscomm...14#entry1555914

#29   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 28 January 2011 - 05:45

45. Fancybox in the new 2.3.1 is a nightmare. Getting image captions to show seemed impossible, or a big pain in the butt, as the 2.3.1 stock set-up doesn't work, or work easily. Nevertheless, this fellow found one solution: http://forums.oscomm...1#entry1560697. Perhaps there are more, as the fancy box site shows, but for now I am happy with this version/solution of getting text to appear with a product image.

#30   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 31 January 2011 - 17:23

46. You really need to read this/do this: osCsid & why you SHOULD lose it (why forcing cookie usage is the ideal)

Edited by ErikMM, 31 January 2011 - 17:25.


#31   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 06 February 2011 - 18:05

47. How to ROUND BOX CORNERS in 2.3.1: http://forums.oscomm...ost__p__1564287

48. How change the BOX BORDER COLOR in 2.3.1: http://forums.oscomm...ost__p__1564292

#32   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 09 February 2011 - 05:16

49. Want to get rid of the blue and white stripes in the product view for 2.3.1?

[img]http://i288.photobucket.com/albums/ll171/murcalumis-space/osc/ActionosCommerceDemo_1297225786233.jpg[/img]

The entire product viewing box is actually clear/transparent (I think) and is coded for here:

catalog/stylesheet.css
.productListingData {
  table-layout: fixed;
background-color: #000000;
}
This had no color to begin with, the background-color, black (000000), was added. I believe it is transparent and shows the site's background if you do not add the background as I did above...that is, if you leave it alone, or stock/as originally coded for without the background: {table-layout: fixed;}.

The blue stripe is on top/above the background and can be changed here:
.productListTable tr.alt td {
  background-color: #000000;
}/*WAS ecf6fc*/
I changed it to black, it was originally ecf6fc as my note indicates.

Edited by ErikMM, 09 February 2011 - 05:24.


#33   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 09 February 2011 - 06:13

50. Within a month of the official 2.3.1 release the USPS pulled a fast one by making API changes, leaving a lot of people scrambling for a fix. I don't think the current 2.3.1 downloads have a working USPS module yet. No worries, luckily a few wonderful and savvy types figured it out, and this module is ten times better than the stock 2.3.1 USPS module anyway.

This is a WORKING USPS add-on for 2.3.1 (although it says 2.2): 5.2.1 File drop for fresh osc2.3.1 Install

support here: http://forums.oscomm...n-usps-methods/

Edited by ErikMM, 09 February 2011 - 06:15.


#34   germ

germ
  • Members
  • 13,921 posts

Posted 08 May 2011 - 20:40

51. By default the "Configuration" menu is expanded when you log into the Admin.

If you want it collapsed at login make this change:

/admin/includes/column_left.php

Find this code:

<script type="text/javascript">
$('#adminAppMenu').accordion({
  autoHeight: false,
  icons: {
    'header': 'ui-icon-plus',
    'headerSelected': 'ui-icon-minus'
  }
Change to this:

<script type="text/javascript">
$('#adminAppMenu').accordion({
  autoHeight: false,
  active: false,
  icons: {
    'header': 'ui-icon-plus',
    'headerSelected': 'ui-icon-minus'
  }
All I did was add this line:

active: false,

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#35   frankl

frankl
  • Community Sponsor
  • 88 posts

Posted 17 May 2011 - 02:12

Add the product model to the product_info.php title:

Open catalog/includes/modules/header_tags/ht_product_title.php

Find line (line 37 in original file)
$product_info_query = tep_db_query("select pd.products_name " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");


and change to
$product_info_query = tep_db_query("select pd.products_name, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");


Then find (line 40 in original)
$oscTemplate->setTitle($product_info['products_name'] . ', ' . $oscTemplate->getTitle());

and change to
$oscTemplate->setTitle($product_info['products_name'] . $product_info['products_model'] . ', ' . $oscTemplate->getTitle());

That's it!

#36   germ

germ
  • Members
  • 13,921 posts

Posted 29 May 2011 - 23:58

53. Focus on forms.

To keep your customers from having to click in the box of some of the most commonly used forms before they can start typing try applying focus to them.
 
In /catalog/login.php:

BEFORE this code:

<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
ADD this code:

<script language="JavaScript">
<!--
function BodyOnLoad()
{
  document.login.email_address.focus();
}
BodyOnLoad();
//-->
</script>
 
In /catalog/contact_us.php:

BEFORE this code:

<?php
  }

  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
ADD this code:

<script language="JavaScript">
<!--
function BodyOnLoad()
{
  document.contact_us.name.focus();
}
BodyOnLoad();
//-->
</script>
 
In /catalog/create_account.php:

BEFORE this code:

<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
ADD this code:

<script language="JavaScript">
<!--
function BodyOnLoad()
{
  document.create_account.firstname.focus();
}
BodyOnLoad();
//-->
</script>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#37   germ

germ
  • Members
  • 13,921 posts

Posted 30 May 2011 - 02:14

54. Accommodating a wide logo.

You make a store logo wide enough to span the entire usable width of the site, but upon implementation you find out that it pushes the "Cart Contents", "Checkout", and "My Account" buttons down the page wreaking havoc on the layout.

The solution:

In /includes/header.php find this line:

<div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>
In that code change this part:

<div id="storeLogo">
To this:

<div id="storeLogo" style="position:absolute;z-index:-1;">

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#38   germ

germ
  • Members
  • 13,921 posts

Posted 25 June 2011 - 13:23

55. Adding content to the left and right columns.

To add contents (images, SSL logos, etc.) to the end of the left or right colums follow these steps:

To add to the left column find this code in /catalog/includes/template_bottom.php:

<div id="columnLeft" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?> pull_<?php echo $oscTemplate->getGridContentWidth(); ?>">
  <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?>
</div>
Change it to this:

<div id="columnLeft" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?> pull_<?php echo $oscTemplate->getGridContentWidth(); ?>">
  <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?>

<!-- added content begin //-->
  <div style="align: center;">
<!-- DELETE THIS LINE AND INSERT THE ADDED CONTENT CODE HERE //-->
  </div>
<!-- added content end //-->

</div>
To add to the right column find this code in /catalog/includes/template_bottom.php:

<div id="columnRight" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?>">
  <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?>
</div>
Change it to this:

<div id="columnRight" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?>">
  <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?>

<!-- added content begin //-->
  <div style="align: center;">
<!-- DELETE THIS LINE AND INSERT THE ADDED CONTENT CODE HERE //-->
  </div>
<!-- added content end //-->

</div>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#39   pcsohio

pcsohio
  • Members
  • 20 posts

Posted 13 July 2011 - 16:26

5. Modify Welcome to STORE_NAME [enhancing previous instructions]

Backup and edit catalog/includes/languages/english/index.php
Edit line 17: define('HEADING_TITLE', 'Welcome to ' . STORE_NAME);

Append text after STORE_NAME
define('HEADING_TITLE', 'Welcome to ' . STORE_NAME . ' new text');
Sample output: Welcome to STORE_NAME new text

Move STORE_NAME to the beginning with appended text:
define('HEADING_TITLE', ' ' . STORE_NAME . '\'s Online Shopping');
Sample output: STORE_NAME's Online Shopping

NOTE: The '\'s is to allow the apostrophe at the end of STORE_NAME, if needed. Always insert a \ before an echoed '

Font tags may also be used:
define('HEADING_TITLE', '<font face="Trebuchet MS" font color="#FF0000" size="5">' . STORE_NAME . '\'s Online Shopping</font>');
Output: STORE_NAME's Online Shopping

Of course, you can always eliminate or change the 'Welcome to ' to whatever suits your style.
However, if you want to remove the Welcome to, ensure you leave the ' ' in place.
OSC v2.3.1 Proud user since sometime last week.

#40   ErikMM

ErikMM
  • Members
  • 314 posts

Posted 07 July 2012 - 15:46

57. If you know how to add boxes, you can add a nice and tidy "add this" box. outside link: addthis . com

I like it better than the stock social bookmarks: it has more links, plus its nice and tight/small (you can choose sizes at the addthis site-- free).

the top rectangle is the original size. it expands on hover
IMAGE LINK: http://howto.caspio....g.-06-09.08.gif

1. Add a new box (see earlier posts...#25)
2. After you add a new box...(I called mine addthis) modifications here: /includes/modules/boxes/bm_yournewboxname.php

I included a little code before and after the changes so you can see where it goes
$data = '<div class="ui-widget infoBoxContainer">' .
			  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_ADDTHIS_BOX_TITLE . '</div>' .
			
'  <div class="infoBoxContents">' .[/size]
[size="-1"]			  '<center> <br><!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4db12fa86ec881d8"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4db12fa86ec881d8"></script>
<!-- AddThis Button END --></center> ' .[/size]

[size="-1"]			  '  </div>' .
			  '</div>';[/size]
[size="-1"]	  $oscTemplate->addBlock($data, $this->group);
	}

Edited by ErikMM, 07 July 2012 - 15:49.