Tommy Jordan, carolinaregion, ncbba, obx, outer banks, NC, north carolina, greenville, ECU, photos, network, computer, help, beach, waves, life,

[Me-Tom-orphasis] - Welcome

In a world where everything we say and do online is preserved to be used against us at a later date, I just decided to be myself and let man do what he will.

[Me-Tom-orphasis] - Welcome random header image

VirtueMart: Shipper Name Limited to 1 Character

May 8th, 2009 by Tommy Jordan

Grrr. I’m posting this one to see if maybe I can help others with the same problem I’m having. It’s fixed now, but it was a pain in the arse to track down.

Using Joomla 1.5 and VirtueMart 1.1.3 I was having the problem of trying to add a new shipper to the shipper’s table. The defaults are DHL and UPS, but I needed to add USPS for the new NCBBA site I’m coding. Well, every time I added anything except UPS, it only saved the first letter, shown below:

I found the fix, though it wasn’t the same code string location as I was led to believe. I’ve seen reference to this being an issue with lines 113 and 138 on the ps_shipping.php string, but my errors were on 225 and 275 (Using SCiTe as my editor if that matters)

Anyway, here’ the fix:

Go to:

 administrator/components/com_virtuemart/classes/ps_shipping.php

Edit BOTH locations of the following text: (lines 113, 138 or 225,275, or wherever they are in your config)

OLD CODE: ($fields = array( ’shipping_carrier_name’ => vmGet($d["shipping_carrier_name"]),)

NEW CODE: $fields = array( ’shipping_carrier_name’ => vmGet($d, ’shipping_carrier_name’),

(Notice the distinctions between the [ characers and the quotes are changed from double to single in the new code.)

Voila! Code Fixed!

Now, when you open the code and type your new value:

You actually get THIS:

NOW I can go back to what I was actually trying to do.. after blowing two hours on 2 single characters of bad code that I didn’t even write!

 

Tags: No Comments

You must log in to post a comment.

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.