My OScommerce Notes
In 2007, I discovered "OScommerce" and designed to use it for my mobile unlocking web. I am attracted to oscommerce because it's FREE and it is very simple to setup and use. Also, their support forum is excellent, I can find 95% the answer of my questions from there without even need to make a post.
The software is very light weight compared to virtuemart / ubercart, so I found my web runs pretty fast with it.
However, there are some areas which oscommerce would improve. Wherever, I want it to change something in the layout, theme, add a function or even just an extra "info page". They all involved a lot of work (code hacking) which is pretty dangerous as if you do any step wrong, you may have a "dead" website. Therefore, I usually do the change in a localhost first before I apply it to the web.
Personally, I think Oscommerce is more people who need an ecommerce web in a low budget and don't require much change on their web in future. I am now in the process of moving my Oscommerce web to drupal - ubercart web.
Throughout the process of making the oscommerce web, I made some notes to myself so that I can refer to time to time if I forget anything. I hope it would be useful to someone
some tutorial videos
http://php.opensourcecms.com/free/videos.php
1) button design web
http://cooltext.com/Render-Result?RenderID=89230591
catalog icons - 200 x 50 - > 214 x 64 because of the special effect
text - 20pt
90 x 40 (94 x 44) for category photos
Hex 679AF1
2) Unlimited information page - I haven't tried
http://addons.oscommerce.com/info/1026
3) another kind of oscommerce
http://demo.magentocommerce.com/bed-and-bath/living-room/chair.html
4) Change the required information in registration page
include/language/english.php
5) Change the Box Width - Very useful
At catalog/includes/application_top.php (change Line 62)
// customization for the design layout
define('BOX_WIDTH', 180); // how wide the boxes should be in pixels (default: 125)
and Font Size - Stylesheet.css
6) Change HTML description into normal WORD format - Very useful
All_In_OneFCKeditor_V1.1
fixed the image upload bug
instructions_to_install_in_version_osC_Update_060817 + RC1+RC2+RC2a.txt
7) Remove notification
include / column_right.php
Add a double slash // to comment out the line. It should look like
//include(DIR_WS_BOXES . 'product_notifications.php');
8) Remove footer note etc
in include/footer.php
Remove Counter
<td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td>
to <td> </td>
Remove footer - copyright oscommerce etc
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
to <td> </td>
9) To remove new product of the week
<td><?php //include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
10) DELETE GREETING at the homepage
at the index.php
<td class="main"><?php echo tep_customer_greeting(); ?>
11) add note to contact us form
http://forums.oscommerce.com/index.php?showtopic=289680
define('ENTRY_NAME', 'Full Name:');
define('ENTRY_EMAIL', 'E-Mail Address:');
define('ENTRY_ENQUIRY', 'Enquiry:');
define('TEXT_MAIN', 'Put your text here.');
?>
Now, in /catalog/contact_us.php
Find this code:
CODE
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
Just after it, add this code:
CODE
<!-- added 01/16/08 //-->
<tr>
<td class="main"><?php echo TEXT_MAIN; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<!-- end of additions //-->
-------------
12) Server relocation - Very useful
download all php file on the server to c:
Method 1:
Download the backup database file and rename it to oscommerce.sql
copy all the "INSTALL" directory and put the oscommerce.sql file in the directory
do the install -> localhost/catalog/install
Host: Localhost
Username: root
password:
Server name: - created before
- DONE
Method 2:
Import the backup file from oscommerce to a new created database
amend the configure.php file at catalog/includes/configure.php the other is under admin/includes/configure.php
You will have to edit the database access information on your new server side:
Username, pasword, and database name and then you should be okay.
13) Additional pages
- add additional page or box in the information box etc
http://www.oscommerce.info/kb/osCommerce/Catalog_Area/Boxes/49
-------
14) Change the box information title
In catalog/includes/languages/english.php find this code:
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Terms & Conditions');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_SITEMAP', 'Sitemap');
15) Remove the "New Product for the month of *.*" and replace it with a HTML index of your choice..
Its great for all those who wish to have a flash home page or a HTML home page and still have all the header and info boxes as per the standard install
http://addons.oscommerce.com/info/4461
16) php editor FREE
17) Tutorials
http://oscart.seiretto.com/basic_oscommerce_tutorial.html
18) change homepage to catalog/index.php
Make an index.php page in the root and do this:
at the index.php
<?
Header("Location: catalog/index.php");
?>
--
or if you have access to your .htaccess file you would just change the DirectoryIndex to read
DirectoryIndex /catalog/index.php
19) video tutorial
http://info.template-help.com/after_sale_support/Demo_movies_database/OsCommerce/article21.html
20) Increase product ID length
Two database tables need to be modified when changing the length of the product model field: osc_products, and osc_orders_products.
Using phpMyAdmin
Using the Graphical Interface
The same steps need to be reproduced for the osc_orders_products table.
Using the SQL Text Tool
Paste the code below for each table into the sql query box in phpMyAdmin changing the number 12 to a new number and click save.
alter table osc_products change products_model products_model varchar(12);
alter table osc_orders_products change products_model products_model varchar(12);
21) Drop down search menu (search box everywhere)
<?php echo tep_draw_form('search',
tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') .
tep_draw_hidden_field('search_in_description','1') .
// catetgory box - I amended the code
tep_draw_pull_down_menu('categories_id', tep_get_top_categories(array(array('id' => '', 'text' => '-- Select--' )))) . ' ' .
// Box
tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' .
//checkbox
tep_draw_checkbox_field('inc_subcat', '1', true) .
// submit icon
tep_hide_session_id() . tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH, 'align="middle"') . '</form>'; ?></td>
21a) for showing category only (hide subcategories)
1. Simply open catalog/includes/functions/general.php
2. In it you will find a function called tep_get_categories() ,
3. select it all then copy it and paste it below the original function
4. Rename this pasted function to tep_get_top_categories(),
5. Find the follwoing lines in your newly created function tep_get_top_categories()
CODE
if ($categories['categories_id'] != $parent_id) {
$categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . ' ');
}
6. Comment them out or delete them
7. Open catalog/advanced_search.php
8. Replace
tep_get_categories()
with
tep_get_top_categories()
22) Product Descriptions to the title (important for SEO)
save in d:\web\header-tags-4-novices-v3.01
OR
http://www.gemrockweb.co.uk/header-tag-install.php
23) fix merchant address not correct problem
http://forums.oscommerce.com/index.php?showtopic=308645
24) Paypal IPN - script to send the login info automatically.
http://www.felgall.com/php6.htm
25) I want to change homepage with search
go to the home
index.php - page 302 (it used to be a greeting message and you change it to the search box you want)
D:\web\Search_Box_Anywhere_22_November_2005\Search_Box_Anywhere_22_November_2005\Search Box Anywhere.htm
26) remove OSCID section
define('HTTP_COOKIE_DOMAIN', 'http://www.futomart.com');
to
QUOTE
define('HTTP_COOKIE_DOMAIN', '.futomart.com');
---
define('HTTP_SERVER', 'http://www.yourweb.com');
define('HTTPS_SERVER', 'http://www.yourweb.com');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', '.yourweb.com');
define('HTTPS_COOKIE_DOMAIN', '.yourweb.com');
define('HTTP_COOKIE_PATH', '/shop/');
define('HTTPS_COOKIE_PATH', '/shop/');
define('DIR_WS_HTTP_CATALOG', '/shop/');
define('DIR_WS_HTTPS_CATALOG', '/shop/');
27) Paypal IPN - send digital goods
http://forums.oscommerce.com/index.php?showtopic=247742&st=0&p=1011795&#entry1011795
No comments available.
Post new comment