Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modding-Up a new 2.3.3.4 Install - Documented


Mort-lemur

Recommended Posts

A file on my server kept dissapearing includes/classes/seo_class.php which caused my site to white page.

Thanks for mentioning this Heather. The problem came up in the Ultimate SEO thread recently so I'll post a link to this fix there.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 203
  • Created
  • Last Reply

@@Mort-lemur & @@14steve14

 

Thank you for the help. It seems that my host (1&1) does not log PHP errors. At least, not that I can find.

 

I made the change steve recommended on my localhost test site and, of course, found errors that had no clue were present. The don't seem to be critical errors so, for the time being, I am going to ignore them. We are at the height of our selling season and do not wish to take the site down for maintenance.

 

My test site and my live site are in two different environments. I test on XAMPP but my live site is hosted on on a shared Linux server. This leads me to another question: Does anyone know of a mod that will log PHP errors?

 

Mort-lemur, I'm not trying to hijack your thread. If you would like me to take my questions elsewhere please, let me know. Thank you for your time.

 

Create a file in a text editor and save as ALL FILES name it

 

error_log

 

upload to your public_html/ .... where your index.php is and see if the server writes to it

 

there is no risk here the server will either write or not

 

of course if there are no errors nothing to write hard to believe that 1& 1 does not support an error log ???

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

The KISS Error Handling & Debugging addon lets you view errors and database query response times. You can even view errors on a live site without your customers ever seeing the error codes. I find it very useful.

 

Regards

Jim

This seems to be just the thing I have been looking for. Thank you.

Link to comment
Share on other sites

Carried out another change, this one is the mod to exclude items from free shipping

 

Link: http://addons.oscommerce.com/info/6906

 

Needed a bit of adjustment to make the traffic light buttons show up as they should - simply move a <tr> tag from above the code to bellow the code in admin/categories.php.

 

Also I have added some code to call up an image on the product page if that item is excluded from free shipping, the code can be found in this post: http://www.oscommerce.com/forums/topic/378676-how-can-i-do-this-is-it-even-possible/ you will have to make your own image and upoad it to the correct location.

 

Maybe eventually I will update the mod when I have time.

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Image automatically added to excluded products as per this:

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Sudenly noticed that installing Header Tags SEO uninstalled part of one of the changes I made in an earlier post about CKEditor in admin/categories.php - so this is the change required to get it working again:

 

find:

if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'false')
			    echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])));

and change to:

 

if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'false')
			    echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])), 'class="ckeditor"');

 

Ensure that the config of Header Tags is set to Off for using a HTML Editor

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Found another depreciated function caused by the exclude from free shipping mod - in includes/classes/order.php find

	   $string_idArray = split('{',$string_id);

and change to:

	   $string_idArray = preg_split('{',$string_id);

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Come across a problem on the Fancier Invoive and packing slip mod - when I log in as a customer - view one of my previous orders then go to the Print My Invoice screen (which is account_history_info.php) there is a large white space above the invoice and the page is narrowed - any Ideas? Maybe something to do with grid settings?

 

A screenshot of the problem is attached.

 

Many Thanks for any help

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Examine that area using Firebug. It will show you what is filling up that whitespace. Then you get to figure out what's causing that in the code.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

@@kymation Thanks Jim, I think its more fundimental than that - The original mod was for a table based system (2.2) so i think its simply not compatible with 2.3.3.4 the way its written - so I have reverted back to the stock 2.3.3.4 account_history_info.php file for now.

 

When I examined it with firebug it showed me thet there was a <div> header filling the space - but that does not appear in the code anywhere.

 

If I remove the Application_top require from the file it 1/2 solves the problem - but the invoice now fills the entire screen with the only way out being if you notice the Print or Back buttons at the bottom of the invoice - not Ideal...

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Now I have another problem with the same page (this time using the clean 2.3.3.4 account_history_info.php file) - the Order number is not diaplayed (as you can see on the screenshot). Is the code that drives this correct? it is:

<h1><?php echo HEADING_TITLE; ?></h1>
<div class="contentContainer">
<h2><?php echo sprintf(HEADING_ORDER_NUMBER, $HTTP_GET_VARS['order_id']) . ' <span class="contentText">(' . $order->info['orders_status'] . ')</span>'; ?></h2>

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Look in the language file for the define of HEADING_ORDER_NUMBER -- is there a %s in there? That's required to echo the number. Otherwise, look at the address bar to see if order_id= is followed by a number.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

@@kymation Thanks Jim, the language filewas missing the %s - thats something else I have learnt now :)

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

A couple more code changes needed in the modules I have installed:

 

Firstly in the Telephone with card Payment mod. - there was a missmatch between the module file and the language file causing text to not be displayed. So in includes/languages/english/modules/telephone.php find

Our opening hours : <b>' . MODULE_PAYMENT_TELEPHONE_OUVERTURE_EN . '</b><br />
 Number phone : <b>' . MODULE_PAYMENT_TELEPHONE_NUM . '</b><br />
 More information : <b>' . MODULE_PAYMENT_TELEPHONE_PRECISION_EN . '</b>
 <br />Your order will not ship until we receive payment.');
 define('MODULE_PAYMENT_TELEPHONE_TEXT_EMAIL_FOOTER', "Use the following information to contact us and finalize your order :\nYou can contact us " . MODULE_PAYMENT_TELEPHONE_OUVERTURE_EN . " following number : " . MODULE_PAYMENT_TELEPHONE_NUM . ".\nRemember : " . MODULE_PAYMENT_TELEPHONE_PRECISION_EN . "\n\nYour order will not ship until we receive payment.");

and replace with:

Our opening hours : <b>' . MODULE_PAYMENT_TELEPHONE_OUVERTURE_ . '</b><br />
 Number phone : <b>' . MODULE_PAYMENT_TELEPHONE_NUM . '</b><br />
 More information : <b>' . MODULE_PAYMENT_TELEPHONE_PRECISION_ . '</b>
 <br />Your order will not ship until we receive payment.');
 define('MODULE_PAYMENT_TELEPHONE_TEXT_EMAIL_FOOTER', "Use the following information to contact us and finalize your order :\nYou can contact us " . MODULE_PAYMENT_TELEPHONE_OUVERTURE_ . " following number : " . MODULE_PAYMENT_TELEPHONE_NUM . ".\nRemember : " . MODULE_PAYMENT_TELEPHONE_PRECISION_ . "\n\nYour order will not ship until we receive payment.");

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

next change required was to the emailed html_invoice.php which was not displaying tax and shipping info on the invoice emailed to the customer.

 

in includes/modules/email_invoice/templates/html_invoice.php find

			 <?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo '		 <tr>' . "\n" .
	 '		 <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
	 '		 <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
	 '		 </tr>' . "\n";
}
?>

and replace with:

<?php
for ($i = 0, $n = sizeof($order2->totals); $i < $n; $i++) {
echo '		 <tr>' . "\n" .
	 '			 <td align="right" class="smallText">' . $order2->totals[$i]['title'] . '</td>' . "\n" .
	 '			 <td align="right" class="smallText">' . $order2->totals[$i]['text'] . '</td>' . "\n" .
	 '			 </tr>' . "\n";
}
?>

 

The emailed invoice will now contain the correct tax / shipping / totals

 

Hope this post isnt getting boring.....

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Sudenly noticed that installing Header Tags SEO uninstalled part of one of the changes I made in an earlier post about CKEditor in admin/categories.php - so this is the change required to get it working again:

 

find:

 

Ensure that the config of Header Tags is set to Off for using a HTML Editor

If Header Tags SEO is installed as directed, the on/off setting for the editor in the Header Tags SEO settings should work to control the entire admin so this step shouldn't be necessary. Also, the
class="ckeditor"

shouldn't be necessary. At least, this is how I install it and it works fine. Though I can't say for sure if I've tried the two in a 2.3.3.4 shop.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Found some errors during testing with the preg_split change in includes/classes/order.php - I didnt add delimiters - and I have tried several combinations of delimiters - can anyone tell me how the delimiters should fit in the following line:

 

$string_idArray = preg_split('{',$string_id);

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@burt Thanks Gary, the error message has gone from my error log now....

 

I dont think I have ever used that symbol before - Ever!

 

Do all people in your part of the world look like that ?? (w00t)

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Just installed Security Pro 2.0 (r11) by FWR Media

 

Link: http://addons.oscommerce.com/info/7708

 

Had to be the easiest install ever - 1 new file and 1 bit of code to add - works as it should with no errors.

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@burt I had already tried the forward slash in the same positions - but it still generated errors - where the ^ does not.

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

OK next security mod installed - Filesafe by FWR Media

 

Link: http://addons.oscommerce.com/info/7546

 

Easy install, but I wanted the ability to run and reset from my admin panel easily - Found a post by knifeman (Tim) here: http://www.oscommerce.com/forums/topic/364272-contribution-kiss-filesafe-file-security/page__st__40 (post No 56) and decided to take it a step further.

 

I mentioned above that I had set up horizontal buttons in my admin page for things I need to access easily - well I just added a "Filesafe Run" and a "Filesafe Reset" button to these using this code in my admin/includes/header:

 

echo tep_draw_button('Run Filesafe', 'locked', 'http://www.mysite.co.uk/filesafe.php?auth=yourpassword" ', 'primary', array('newwindow'=>'newwindow'));
echo tep_draw_button('Reset Filesafe', 'locked', 'http://www.mysite.co.uk/filesafe.php?auth=yourpassword&reset" ', 'primary', array('newwindow'=>'newwindow'));

 

Thanks Tim for the idea.

 

Now I can run this anytime easily.

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

2.3.3.4 is missing a button from the Shopping Cart Page, which is a "Continue Shopping" button - without this its difficult to go back to where you were before adding an item to the cart.

 

After searching there are a few methods for adding this button - one takes you back two clicks and one takes you to the parent category of the item you just added to the cart. They can both be seen here: http://www.oscommerce.com/forums/topic/392491-back-button-in-the-product-info-in-233-to-return-to-category-root/#entry1687170

 

I decided to go with the version by Kymation (Thanks Jim), however, when I added this code it messed up the page formatting. Jim suggested that there might be a missing </Div> tag, and sure enough there was.

 

So here is the revised code fo catalog/shopping_cart.php find:

$any_out_of_stock = 0;
 $products = $cart->get_products();
 for ($i=0, $n=sizeof($products); $i<$n; $i++) {

and replace with:

$last_product = 0;
 $any_out_of_stock = 0;
 $products = $cart->get_products();
 for ($i=0, $n=sizeof($products); $i<$n; $i++) {
		 // Find the last product that was added to use in the Continue Shopping button
	 $last_product = (int)$products[$i]['id'];

 

Then Find:

<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary'); ?></span>

and add this after:

<?php
 $continue_category = '';
 if( $last_product > 0 ) {
	 $cPath_new = tep_get_product_path($last_product);
	 $continue_category = 'cPath=' . $cPath_new;
 }
?>
	 <div class="back_button">
<?php echo tep_draw_button( IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link( FILENAME_DEFAULT, $continue_category, 'NONSSL' ) ); ?>
</div>
</div>

 

Now you will have a "Continue Shopping" button on the shopping cart page.

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...