how to add a linked image to an infobox

You want to advertise a new product or special shipping offer with an image in one of the side columns of your store. And you would like to make it a clickable link to another page. Here’s how:

1. First prepare the image. Consider the width of the column it is going to be inserted into. If the image is wider than the column, it’ll push out into the mainpage area. Upload the image to the folder /images.
2. Open up the example.php infobox file. In Cre Loaded you can find this in /templates/default/boxes. The code looks like this:

                               'text'  => '' . BOX_HEADING_EXAMPLE . '');
  // Change BOX_HEADING_EXAMPLE to a name of your choice. Use the same in Infobox Admin to configure the infobox title.
  new $infobox_template_heading($info_box_contents, '', ((isset($column_location) && $column_location !='') ? $column_location : '') ); 
  $info_box_contents = array();
  // add your infobox content to the text variable below  
  $info_box_contents[] = array('align' => 'center',
                               'text'  => '' . tep_image(DIR_WS_IMAGES . 'Book-4_mockup.jpg', 'my image', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '');
  new $infobox_template($info_box_contents, true, true, ((isset($column_location) && $column_location !='') ? $column_location : '') );
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'left',
                                 'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
    new $infobox_template_footer($info_box_contents, ((isset($column_location) && $column_location !='') ? $column_location : '') );

3. Edit the content line. Find in the code the comment // add your infobox content to the text variable below and below this edit the ‘text’ as shown in the following example, replacing the image link, name and title with your details:

$info_box_contents[] = array('align' => 'left',
'text'  => '' . tep_image(DIR_WS_IMAGES . 'name_of_my_image.jpg', 'my image title', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '');

4. Save the example.php file and add the infobox to the template in the usual way.

cre loaded – how to use shipping zones for free shipping

If you want to restrict the conditions of a shipping module to a specific state or county then you can do this by creating a Shipping Zone and attaching this to the shipping module.

Step 1: create a Zone

Go to the Admin panel >> Locations/Taxes >> Zones … New Zone button (bottom)
This example shows the entry for the state of Victoria in Australia.

Cre Loaded has Zones set up for several countries already, including the US, Canada, Austria, Switzerland, Germany and Spain.

If your region doesn’t use 2 or 3-letter codes, just retype the Zone name again.

Click Insert when completed.

The sql statements for automatically setting up Zones for Australia are available here

Step 2: create a Tax Zone

Go to the Admin panel >> Locations/Taxes >> Tax Zones … Insert button (on right)
This is where the label for the Shipping Zone is created. You don’t have to use a geographic location as the Tax Zone title – for instance you could create a Tax Zone called ‘Free Shipping Regions.’ All of the applicable regions could be added to this label.

Complete and click Insert.

Step 3: add the Country & Region to the Tax Zone

With the Tax Zone selected (yellow) click the Details button on right.
Next, click insert and choose the Country, then from the dropdown below it, choose the region (in this case, Victoria.)

Click Insert again.

(Repeat Step 3 for each region you want to add to ‘Free Shipping Regions.’ When done continue to Step 4.)

Step 4: attach Shipping Zone to the shipping module

Go to the Admin panel >> Modules >> Shipping >> and the shipping module you want to add the Shipping Zone to.

In the example I’ve used the Free Shipper shipping module and chosen ‘Free Shipping Regions’ from the Shipping Zone dropdown.

Click Update to finish.

Result – when a customer with a Delivery Address State/County of ‘Victoria’ makes a purchase, the shipping module settings (in this case free shipping over $50) will be applied.

how to rename your admin folder

One recommended security step to take with any oscommerce-based e-commerce store is to rename the admin folder so it is harder for the uninvited to drop in.

Steps to take:

  • Choose new name
    Or don’t and use a randomiser like the PCTools Password Generator to make a new admin folder name of 8 or more characters for you. Use a mix of letters, cases, numbers and some symbols (avoid \ | / ‘ and ” however.) Copy it to the Clipboard so you can paste it in the next steps.
  • Although a 'hard-to-guess' admin name is good, 24-characters seems excessive.

  • Make the change
    Access your Store through your control panel or an (s)ftp connection, click the Rename button (or use right click ‘rename’) and paste in the new name.
    Refresh the display (or close and reopen the (s)ftp connection) to see the change take effect.
  • Update your ‘admin’/includes/configure.php file
    You may have to change the permission settings to be able to make the following change – ’666′ or ‘Read/Write all groups’ is usually enough.
    Check the file for entries with /admin/ in the paths. Use Find and Replace to change all of these /admin/ entries to /new name/.
    Save the file and change permissions back to ’444′ or ‘Read only all groups.’
  • Update any ‘admin’ bookmarks
    If you have the old admin panel bookmark in your browser(s) now’s the time to update these to reflect the new ‘admin’ folder name.
  • Don’t include references to the new ‘admin’ folder in the robots.txt file
    The /catalog/robots.txt file is a popular reference for would-be hackers to see which parts of your store you don’t want the bots to visit. Avoid mentioning the new ‘admin’ folder in this file. There are other ways of diverting bots attention away from areas of your store you may want to keep better hidden than others.

There’s more here about securing your admin – and although these steps do not guarantee 100% certain defence against the determined hacker, they will raise the bar out of the reach of ‘script kiddies’ and others who are looking for easy targets. 7JP9H7JXBRDZ

oscommerce – how to upgrade from v2.2 to v2.3.x

Oscommerce version 2.3 has finally been released, and the improvements over the tired old version 2.2 are good. The main advance is how it looks and handles – there aren’t many new features in the frontend. On the admin side, security improvements have been the focus, with a couple of new features added in.

screenshot of osCommerce version 2.3 frontend

  • Looks cleaner, loads faster.
  • Reviews system is tidied up.
  • Includes social bookmark links.
  • Version Tracker – easy to check if you’ve got the latest version.
  • Security improvements, additions
    Password protection of admin folder; timeout and restricted login attempts if incorrect login details used.
    Action Recorder – keeps a log of details of 3 different areas of the Store: Admin login attempts; Contact Us emails; and Tell A Friend emails.
    Folder Permissions checker – with recommendations of what permission settings should be for each folder.
    Various improvements to session and form handling, password encryption, url cleaning, htaccess implementations etc.

If you’re upgrading from an old oCommerce version 2.2 Store, the steps are simple:

  1. Download a copy of the Upgrade Guide from osCommerce
  2. Update your osCommerce v2.2 database by running the several groups of mySQL statements
    These include statements that change field lengths to existing tables, plus the installation of new tables for the Action Recorder, Directory Permissions checker and Password encryption.
  3. Install the latest osCommerce 2.3.x version as a new Store
    The download is available from the osCommerce Download page.

Before upgrading … please consider the template(s) and other modifications you are currently running. There is a chance they might break in a new osCommerce v2.3.x store.

cre loaded – how to reset your admin password, email address

Forgetting or losing a password can be a real nuisance. Email accounts can also be closed over time, which makes it tricky if its your login email address.
If you find yourself locked out of your Cre Loaded admin panel, it can mean problems for your business. Here are several ways to get back into your admin:

1. Use the ‘Password forgotten’ link from the Login screen (most obvious)
Click the ‘Forgotten Password’ link:
screenshot of the cre loaded 6.4.1a login screen

… and you’ll be asked for an Admin email address:
screenshot of cre loaded 6.4.1a admin email address request

A generated password will be sent the email address entered above. Change this to your new password once you login.

2. Contact Cre Loaded Support (most expensive)
If you have a valid order for support with them (included free for one year after purchase of the Pro or B2B cart software) you can contact them for assistance in resetting your email address and / or password. You’d need to –

  1. Email support @ your order number, hosting control panel access and the email address or username and password you want your store reset to and they will do this.
  2. If you don’t have support remaining, or you are using the free CE version, you can purchase support from them – at the time of writing this, options were priced from USD50 for one week or from USD99 for one year depending on your version and requirements.

3. Dead email address & forgotten password: time to edit the database (most hands-on)
If you’re not happy about editing your database then Contact Me and I can help.

If you have an inactive email address as a login, then you need to access the database (through your control panel or mysql utility like phpMyAdmin):

  • Access the database and edit the ‘Admin’ table
  • Replace the admin_email_address field with a new active email address
  • Save and use the ‘Forgotten Password’ step #1 above to login to your Admin.

If you want to replace your password at the same time (you must have an md5 encrypted password to enter here – if not, forget it!):

  • Access the database and edit the ‘Admin’ table
  • Replace the admin_password field with an encrypted password that you know the decryption of
  • Save and login to Admin panel to test

screenshot of encrypted admin password field in Cre Loaded database

Make sure that you replace the temporary password with your own. Ideally your password should contain at least one uppercase letter, at least one lowercase letter and numbers and be at least 8 characters long. If you want to use a secure password generator for this then I’d recommend the PCTools Secure Password Generator.

If you’re unsure about doing this yourself then Contact Me and I can complete this for you in a few minutes.

ideas and help with oscommerce-based shopping carts