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!
Thanks for saving me hours of work! Perfect Fix.
ReplyDeleteThank you too for saving a huge amount of time fixing something that shouldn't be broken in the first place. Cheers!
ReplyDeletehmmm... didn't fix mine :(
ReplyDeletethe search continues...
Was losing a few hairs on that one; thank you so much for sharing! Alex @ZenElements
ReplyDeleteThanks so much. Am a complete novice at this kind of stuff, but it worked so you;ve given me soem confidence as well as sorting out this problem for me!!
ReplyDeleteStill a great fix. Thanks!
ReplyDeleteGlad it's still working for ya! I appreciate the kind comments
ReplyDeleteYou absolute legend!!! This fixed it for me!
ReplyDeleteI believe this was fixed in the latest version.
ReplyDelete