How to show the amount of beads something sold for-

Forum
Last Post
Threads / Messages

Ittermat

The awesomesauce
Member
Joined
Feb 2, 2016
Messages
310
Points
18
Location
in front of my laptop
Mysidian Dollar
21,337
Ugh sorry! beads is the name of my sites currency...****

I want to tell a user how much something they sold back to the site gave them back....So like if they go to their inventory- sell it- I want it to tell them

"You sold 2 Flowers for 300 dollars!"

As an example...

I know I need to mess in the Inventory_Lang file I just need the right coding to get it to do that lol... Please and thank you ^^;
 
Last edited:
Hey! Looks like the thing to put is:

{$mysidia->settings->cost}

Try putting there where you want it. So, it'd be something like:

You sold {$mysidia->input->post("itemname")} for {$mysidia->settings->cost}!

I think. >.> I haven't tested it, but it looks right, from my limited (Very, very limited) knowledge. XD
 
Ah! Thank you! You' have more knowledge than me XD I'll try it haha

EDIT: It doesnt give me the amount still... This is what my Lang file spot looks like:

$lang['sell'] = "Thank you for selling your $qty $item ";
$lang['sell2'] = "For {$mysidia->settings->cost} Stranger!<br> <a href='http://atrocity.mysidiahost.com/inventory'> Go back to your inventory</a><br>";


and this is what it gives me... (the item I sold as a test was a rock worm.)

Thank you for selling your 1 Rock Worm For Beads Stranger!
Go back to your inventory


No money amount... XD Which is what I want.
 
Last edited:
I think the issue is that cost bit needs to be in the inventory file... Uh.

Yeah, just looked through the shopview.php to confirm. Anytime you want it to list the value of currency, it needs to be within the view file, not the lang file. Here's an example:

PHP:
$document->addLangvar("{$this->lang->purchase_item}{$cost->getValue()} {$mysidia->settings->cost}");
		}

So, for this to work, you need to word it sort of like:

PHP:
"You have purchased Item {$mysidia->input->post("quantity")} {$mysidia->input->post("itemname")} at a cost of: ";

BUT, even then, I can't get it to post the amount of currency. Might have to shove in an extra function somewhere and that's not really something I know anything about. PHP is not my strength. XD
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top