Jump to content


Corporate Sponsors


Latest News: (loading..)

32 Degrees

Member Since 22 Feb 2008
Offline Last Active Today, 01:55
-----

Posts I've Made

In Topic: Authorize.net error

Today, 01:42

cwchbc,

I am having such a problem with this. How did you solve it please? Where did you get the MD5 Hash value from?

Thanks

In Topic: USPS Rate V4, Intl Rate V2 (official support thread)

08 February 2012, 01:53

Jetta,

Thanks again for releasing this contribution, it's a huge help! I wanted to point out some errors I encountered to see if you or others are having them as well? As they are E_NOTICE errors it doesn't seem to affect functionality from what I can see.

Error: Undefined variable: FirstClassMailType
File: includes/modules/shipping/usps.php
Line: 211
Error: Undefined index: Error
File: includes/modules/shipping/usps.php
Line: 82
Error: Undefined index: Certificate of Mailing
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Registered MailTM
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Registered without Insurance
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Certified MailRM
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Delivery ConfirmationTM
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Return Receipt for Merchandise
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Signature ConfirmationTM
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Adult Signature Required
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Adult Signature Restricted Delivery
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined index: Collect on Delivery
File: includes/modules/shipping/usps.php
Line: 86
Error: Undefined variable: iInfo
File: includes/modules/shipping/usps.php
Line: 160
Error: Undefined index: shownString
File: checkout_shipping.php
Line: 313

- Ryan

In Topic: ADD-ON : Dynamic Template System for OsCommerce 2.3.x

08 February 2012, 01:48

IF... You are having troubles incorporating USPS and UPS within a shop using the Dynamic Template System these changes may solve your problem. They solved maybe they can solve yours?

admin/modules.php

FIND:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
		while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
		// bof Dynamic Template System			
		  if((is_array($value)) && (!empty($value))){
		  $pages = '';
		  $count = count($value);
		  for($i=0 ; $i<$count; $i++){
		  $pages = "$pages$value[$i]";
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
			   }
		  }
		// eof Dynamic Template System
		  else
		  {		
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
		  }
		}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

REPLACE:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
	foreach($_POST['configuration'] as $key => $value) {		
		   // Dynamic Template System  
	 if((is_array($value)) && (!empty($value))) {
			  if (isset($set) && $set == "boxes") {
	   $pages = '';
	   $count = count($value);
	   for($i=0 ; $i<$count; $i++) {
		$pages = "$pages$value[$i]";
		tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
	   }
	  } else {
	   // USPS
	   $value = implode( ", ", $value);
	   tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	  }
	 } else {
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	 }
	}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

FIND:
$contents[] = array('text' =>  $file);

REPLACE:
$contents[] = array('text' => '<br />' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/'), array('&reg;', '&trade;', 'Int\'l', 'Env'), $file)); // Modified for USPS

Good luck@

In Topic: USPS Rate V4, Intl Rate V2 (official support thread)

08 February 2012, 01:46

IF... You are having troubles incorporating this contribution within a shop using the Dynamic Template System these changes may solve your problem. They solved maybe they can solve yours?

admin/modules.php

FIND:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
		while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
		// bof Dynamic Template System			
		  if((is_array($value)) && (!empty($value))){
		  $pages = '';
		  $count = count($value);
		  for($i=0 ; $i<$count; $i++){
		  $pages = "$pages$value[$i]";
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
			   }
		  }
		// eof Dynamic Template System
		  else
		  {		
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
		  }
		}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

REPLACE:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
	foreach($_POST['configuration'] as $key => $value) {		
		   // Dynamic Template System  
	 if((is_array($value)) && (!empty($value))) {
			  if (isset($set) && $set == "boxes") {
	   $pages = '';
	   $count = count($value);
	   for($i=0 ; $i<$count; $i++) {
		$pages = "$pages$value[$i]";
		tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
	   }
	  } else {
	   // USPS
	   $value = implode( ", ", $value);
	   tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	  }
	 } else {
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	 }
	}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

FIND:
$contents[] = array('text' =>  $file);

REPLACE:
$contents[] = array('text' => '<br />' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/'), array('&reg;', '&trade;', 'Int\'l', 'Env'), $file)); // Modified for USPS

Good luck ;)

In Topic: USPS Rate V4, Intl Rate V2 (official support thread)

08 February 2012, 01:35

Quote

If the dynamic template requires changes to the shipping mods, then perhaps, the dynamic templates should either be rewritten, so that they don't intrude on already existing scripts, or the dynamic templates contributor(s) should take the time to supply the necessary updates for the mods that their script intrudes on, don't you think? If they can't make it a one size fits all, then they need to invest the time in staying up to date with CORE mods and issuing compatibility packets along the way. Seems to me it would be easier (and make more sense) to write a script that works with the existing OSC core, than it does to force changes to the core and all surrounding mods so that an incompatible contribution will fit like it would if it had been written thoughtfully in the first place. Incompatibility of another contribution isn't a shipping mod issue. It's a distinct issue that needs to be dealt with by the creator of that contribution. Those are my cents on that.

Jetta,

Thanks for taking some time to fix the bug in the USPS class, I really appreciate it! As of today the contribution is running as desired :)

In regards to the dynamic template system (DTS) I didn't do justice in explaining the issue thoroughly. I agree with your point that an intruding script should be maintained by it's author if it changes another contribution or affects core usage. In this situation it is not the case that the DTS intrudes on the USPS module, but, that each contribution attempts to process the information differently. In admin/modules.php the USPS contribution implodes $value if is_array($value) returns true, whereas, the DTS contributions incorporates it's own processing if is_array($value) is true.

I have seen many contributions with additional instructions to help users complete common tasks both big and small. For example, many contributions include separate instructions for the STS contribution. Being consistent with this idea would provide a great benefit to more users and foster a stronger community. As a resource to others I am going to post the changes I made here. I hope you would consider including them as additional instructions in future releases.

:)

- Ryan

P.S. I'm requesting the same of the DTS author.