[FIX] Shop Mod 2.6.0 Trade Error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   [FIX] Shop Mod 2.6.0 Trade Error
Trubador
CZ Active Member
Trubador has been a member for over 19 year's 19 Year Member
uk.gif
Occupation: Aircraft Technician
Age: 52
Gender: Male
Status: Offline
Joined: Nov 16, 2004
0.01 posts per day
Posts: 104
Points: 4,807
   
When I exceute a trade is viewed, text to confirm items name does not appear.

Instead:

Nothing and 0
for
Nothing and 0

Apply this fix

Open shop_actions.php and replace the following lines:

**** find ****

      if (strlen($tradeitems) < 3) { $tradingitems = "Nothing"; }
      else {
         $tradingitems = str_replace("Þ", ', ', str_replace("ß", "", $tradeitems));
         $tradingitems = substr($tradingitems, 0, strlen($tradingitems)-2);
      }
      if (strlen($otheritems) < 3) { $otheritemz = "Nothing"; }
      else {
         $otheritemz = str_replace("Þ", ', ', str_replace("ß", "", $otheritems));
         $otheritemz = substr($otheritemz, 0, strlen($otheritemz)-2);
      }


**** replace with ****

      if (strlen($_REQUEST['tradeitems']) < 3) { $tradingitems = "Nothing"; }
      else {
         $tradingitems = str_replace("Þ", ', ', str_replace("ß", "", $_REQUEST['tradeitems']));
         $tradingitems = substr($tradingitems, 0, strlen($tradingitems)-2);
      }
      if (strlen($_REQUEST['otheritems']) < 3) { $otheritemz = "Nothing"; }
      else {
         $otheritemz = str_replace("Þ", ', ', str_replace("ß", "", $_REQUEST['otheritems']));
         $otheritemz = substr($otheritemz, 0, strlen($otheritemz)-2);
      }


Thanks to NoMercy for the initial fix. I've added two more line of code.

TTFN

Trub



_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#2   re: [FIX] Shop Mod 2.6.0 Trade Error
rfburn
CZ Newbie
rfburn has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 14, 2004
0.00 posts per day
Posts: 8
Points: 362
   
I have a weird problem regarding this trading feature. My item names get corrupted when being pulled up from the array. Initial my first item is posted fine, but when I try to use the buttons for myself or the other party's items and/or cash the refreshing action of the screen results in all items being corrupted and hence I get an error stating

Fatal Error: Invalid Items!


This is very annoying, when trading was the sole purpose for installing the store in the first place. Has anyone come across this, or a fix for it? FYI, the fix for your stated problem will not help me here. I tried it. This has something to do with the way the data is exploded into the array tables and then pulled back together in the Shops template.



Back to top Reply with quote
#3   re: [FIX] Shop Mod 2.6.0 Trade Error
Trubador
CZ Active Member
Trubador has been a member for over 19 year's 19 Year Member
uk.gif
Occupation: Aircraft Technician
Age: 52
Gender: Male
Status: Offline
Joined: Nov 16, 2004
0.01 posts per day
Posts: 104
Points: 4,807
   
Sorry its taken a while m8. I'm not to clever with code, cant compile owt!!

Have you still got this problem?

I doubt if I could be of help but I'll give it a bash. icon_smile.gif

Trub




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#4   re: [FIX] Shop Mod 2.6.0 Trade Error
rfburn
CZ Newbie
rfburn has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 14, 2004
0.00 posts per day
Posts: 8
Points: 362
   
I gave up on it.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum