osCommerceCoders.com

Affordable end to end oscommerce solutions with
Search Engine Optimization

Email : osCommerceCoders@gmail.com
Call : +1 818-574-3596 (USA) / +44 (020) 8123-6463 (UK)

Archive for the ‘osCommerce Tips’ Category

If you use more than one payment module, you can have one of them pre-selected for use when the customer goes through checkout.  This may be advantageous in ‘steering’ customers to use the payment method that you would prefer they use.  And, if your buyers typically use this method of payment the most anyway, they’ll never have to select it again.

Firstly, login to the Admin side of your website and look at your Payment Modules.  Select the one you would like to use as the default method and set the sort order of it to zero.  Set the other payment modules in use to higher values.

Now…go to catalog>checkout_payment.php

Find this piece of code:

<?php
        if (sizeof($selection) > 1) {
          echo tep_draw_radio_field('payment', $selection[$i]['id']);
        } else {
          echo tep_draw_hidden_field('payment', $selection[$i]['id']);
        }
?>

Replace it with this:

<?php
          if (sizeof($selection) > 1) {
          if ($i == 0) { 
                $checked = true;          
                } else {  
           $checked = false;      
           }     
                echo tep_draw_radio_field('payment', $selection[$i]['id'], $checked);
           } else { 
                echo tep_draw_hidden_field('payment', $selection[$i]['id']);
           }
?>

 

Just replace these lines

$this->enabled = ((MODULE_PAYMENT_PAYPAL_STANDARD_STATUS == ‘True’) ? true : false);

with

if ($order->info[‘total’] < 150)

{

$this->enabled = ((MODULE_PAYMENT_PAYPAL_STANDARD_STATUS == ‘True’) ? true : false);

}

If order is more than 150 then the paypal payment module is disabled and status is false.

 

http://addons.oscommerce.com/info/487

This is a fix for the XML returned by USPS, simply replace the /includes/modules/shipping/usps.php from the latest 7.1.0 USPS module with this one.

This causes the characters were showing in the XML response from USPS before and after the “RateV4Response” tags; Numbers were showing inside the “Price” tags

these changes are required in the usps.php file

// Fix for characters before and after the ‘RateV4Response’ tag…
$body = substr($body, strpos($body, ‘‘)+15);

// Fix for malformed ‘Price’ tags…
$body = preg_replace(‘/Price(s+)(d+)(s+)>/’,’Price>’,$body);

// Fix for characters before and after the ‘IntlRateV2Request’ tag…
$body = substr($body, strpos($body, ‘‘)+19);

If you have any issues you can use the contact us page to get support. we charge nominal rates for USPS upgrades.

http://addons.oscommerce.com/info/7845

This changes oscommerce to UK country format from USA.

Changes currency to GBP
UK date Format
Setup Tax and VAT for Europe
County instead of state
Postcode above country in Address pages

You can use the contact us form if you want support in setting up a UK based oscommerce store.

If you need to reset a oscommerce store database to empty (no products but keeping the configuration settings), then take the following and paste it into a PHPMyAdmin sql window and you should be good to go.

DELETE FROM `address_book`; 

DELETE FROM `banners`; 

DELETE FROM `banners_history`; 

DELETE FROM `categories`; 

DELETE FROM `categories_description`; 

DELETE FROM `counter`; 

DELETE FROM `customers`; 

DELETE FROM `customers_basket`; 

DELETE FROM `customers_info`; 

DELETE FROM `manufacturers`; 

DELETE FROM `manufacturers_info`; 

DELETE FROM `orders`; 

DELETE FROM `orders_products`; 

DELETE FROM `orders_status_history`; 

DELETE FROM `orders_total`; 

DELETE FROM `products`; 

DELETE FROM `products_attributes`; 

DELETE FROM `products_attributes_download`; 

DELETE FROM `products_description`; 

DELETE FROM `products_notifications`; 

DELETE FROM `products_options`; 

DELETE FROM `products_options_values`; 

DELETE FROM `products_options_values_to_products_options`; 

DELETE FROM `products_to_categories`; 

DELETE FROM `reviews`; 

DELETE FROM `reviews_description`; 

DELETE FROM `sessions`; 

DELETE FROM `specials`; 

DELETE FROM `whos_online`; 



ALTER TABLE banners AUTO_INCREMENT = 1; 

ALTER TABLE banners_history AUTO_INCREMENT = 1; 

ALTER TABLE categories AUTO_INCREMENT = 1; 

ALTER TABLE customers AUTO_INCREMENT = 1; 

ALTER TABLE customers_basket AUTO_INCREMENT = 1; 

ALTER TABLE customers_basket_attributes AUTO_INCREMENT = 1; 

ALTER TABLE manufacturers AUTO_INCREMENT = 1; 

ALTER TABLE manufacturers_info AUTO_INCREMENT = 1; 

ALTER TABLE orders AUTO_INCREMENT = 1; 

ALTER TABLE orders_products AUTO_INCREMENT = 1; 

ALTER TABLE orders_status_history AUTO_INCREMENT = 1; 

ALTER TABLE orders_total AUTO_INCREMENT = 1; 

ALTER TABLE products AUTO_INCREMENT = 1; 

ALTER TABLE products_attributes AUTO_INCREMENT = 1; 

ALTER TABLE products_description AUTO_INCREMENT = 1; 

ALTER TABLE products_options_values_to_products_options AUTO_INCREMENT = 1; 

ALTER TABLE reviews AUTO_INCREMENT = 1; 

ALTER TABLE specials AUTO_INCREMENT = 1;

In order to improve the performance of your osCommerce-based website, you can make these changes:

Reduce the number of products shown on your main page.
Optimize your osCommerce database.
Keep the number of additional contributions as low as possible and  install only the most necessary ones.
Disable all default osCommerce features you are not using.
Keep the number of external links as low as possible.

 

you can then go to

https://developers.google.com/speed/pagespeed/ and do the required optimization.

Use Content Delivery Network – CDN,  for 1000 gb cost is only 40 usd. site loads 4-5 times faster then.

Contact us to configure your store to use a CDN and site speed improvements

Optimization packages starts from 300 USD and includes custom addons for site speed and other configurations including speed and site loading reports.

The U.S. Postal Service has changed their APIs for rate calculation from 1st April 2012.  Web sites have to be updated prior to March 31 to continue working.

So if  you customers are getting rate calculations errors in USPS in oscommerce stores then the update has to be installed.

Contribution can be found here:

http://addons.oscommerce.com/info/8327

 

This module will need json and simplexml functions of php which are inbuilt in php 5.3.  for it to work.

 

If  you need support in updating your USPS module you can use the contact us form to get in touch with us. We charge a nominal rate of  150 USD. 

Due to many requests for support we are reducing the price by 50% to 75 USD  for a limited time offer.

75 USD

This is for stores using currencies which is not USD. then follow the steps below

modify the catalog/ext/modules/payment/paypal/express.php file.

Find:

$params = array();
$params[‘AMT’] = $paypal_express->format_raw($order->info[‘total’], ”, 1);

Replace with:

$params = array(‘CURRENCYCODE’ => $order->info[‘currency’]); $params[‘AMT’] = $paypal_express->format_raw($order->info[‘total’]);

 

Then discount code works perfect for currencies like GBP, AUD etc which is not the default USD

in usps.php

Locate

list($type, $cost) = each($uspsQuote[$i]);

Add these lines after it

$type = str_replace(‘&lt;sup&gt;&amp;reg;&lt;/sup&gt;’, ”, $type);
$type = str_replace(‘&lt;sup&gt;&amp;trade;&lt;/sup&gt;’, ”, $type);
$type = str_replace(‘**’, ”, $type);

This removes the everything that was added by USPS that was causing errors on the site. It also fixes the international issue (response had added a ** to the end of the title).

thanks

http://www.oscommerce.com/community/contributions,487

If you need paid support you can use the contact us in the site

osCommerce V&TS is designed to run on your web server and scan your public web files for malicious code. It is small, portable and efficient, uses minimal server resources, and provides a full report on what has been discovered.

It is a great contribution to protect your store.

Sponsors