2009/10/14

Overcoming magic_quotes_gpc

Filed under: osCommerce Coding — Tags: , — eCartz @ 16:02  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

PHP offers a feature called magic_quotes_gpc.  What this does is it takes all GET, POST, and COOKIE variables and applies a partial escaping to them.  Unfortunately, the escaping that it does is not good enough to pass the result directly to MySQL.  Further, when you run mysql_real_escape_string on the values, it will redo the escaping [...]

2009/10/02

Email templates for osCommerce 3

Filed under: osCommerce — Tags: , — eCartz @ 15:55  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

I was browsing the osCommerce issue tracker recently and came across a request for an email templating system.  This is an interesting concept.  I looked at it a bit, and noticed that there were two issues.  The first issue is that the email layout is currently hard coded in includes/classes/order.php (as reported in that feature [...]

2009/09/17

Checkout Redux

Filed under: osCommerce Coding — Tags: , , , , — eCartz @ 05:57  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

I’m releasing a new osCommerce add on, Checkout Redux.  Checkout Redux is a play on the phrases “checkout redone” and “checkout reduced”.  I started with the desire to do something that I meant to do five years ago, which is write a PayPal IPN contribution that worked for me.  The problem that I have with [...]

2009/09/10

Preserve Image Ratio in osCommerce

Filed under: osCommerce Coding — Tags: , — eCartz @ 00:31  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

By default, if you configure osCommerce to use a particular image size in admin >> Configuration >> Images, it will rescale the image to fit that size.  If the image had a different aspect ratio, it will then appear smushed or distorted.  It’s possible to set up osCommerce such that this does not happen.  You can do so by setting admin >> Configuration >> Images >> Calculate Image Size to true and then change the tep_image function in includes/functions/html_output.php (more…)

2009/09/05

PHP/HTML Input Name Limit

Filed under: osCommerce Coding — Tags: , , — eCartz @ 15:25  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

Worked through a weird bug the other day.  A gaming computer store has products with lots of attributes — as many as fifty.  Since osCommerce stores the attributes with the product ID, the result is to make the id array that holds the attributes on the shopping cart page have exceptionally large input names.  If the name gets too large (I didn’t test it exactly, but more than two hundred characters was all right and three hundred some broke it), it gets silently dropped.  (more…)

2009/09/02

Product Listing on Front Page

Filed under: osCommerce Coding — Tags: , , , — eCartz @ 14:41  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

I released a new osCommerce contribution yesterday:  Product Listing on Front Page
(more…)

2009/08/31

Check Referrer Sessions Option

Filed under: osCommerce Coding,osCommerce Community — Tags: , , , — eCartz @ 20:16  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

A situation that was mentioned on the osCommerce forums recently started me thinking.  Currently, if someone has cookies disabled, then the osCsid (the osCommerce session ID) appears in the URL.  If such a person logs in and then emails a link to someone else, the osCsid will be included in that URL (unless they remove [...]

2009/08/27

DHTML State Selection

Filed under: osCommerce Coding — Tags: , , — eCartz @ 15:15  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

In response to a request on the osCommerce forums, I wrote up a method for changing automatically among drop downs for the various zones and the text input.  The request was made to get it bundled into a contribution, and since there was unfinished work, I went ahead and did it.  The DHTML State Selection [...]

2009/08/21

osCommerce Image Uploads

Filed under: osCommerce Coding — Tags: , , , — eCartz @ 16:16  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

Recently, someone posted in the osCommerce forums looking for a way to upload product images into folders.  I found a post that I made six years ago:  Setting upload image destination in categories.php, Admin change.  Surprisingly, the post was remarkably accurate with the more modern osCommerce RC2a, even the line numbers were only a couple [...]

2009/08/19

Zip after State in Create Account

Filed under: osCommerce Coding — Tags: , , , — eCartz @ 22:56  Share/Bookmark  Delicious  StumbleUpon  WordPress  Twitter  LinkedIn

For those in the UK, Gary Burton’s osCommerce for the UK provides instructions for how to move the post code after county.  Since the position of the zip code is just as inappropriate in the US as in the UK, I’m posting the equivalent instructions here.  First, make a backup copy of create_account.php.  Since you [...]

Older Posts »

Powered by WordPress