Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   How to show the amount of beads something sold for- (http://www.mysidiaadoptables.com/forum/showthread.php?t=5209)

Ittermat 10-01-2016 08:02 PM

How to show the amount of beads something sold for-
 
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 ^^;

Ittermat 10-02-2016 03:35 PM

bump cuz I had to clarify cuz of my title... x.x

NobodysHero 10-04-2016 02:06 PM

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

Ittermat 10-04-2016 07:49 PM

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.

NobodysHero 10-05-2016 09:40 AM

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 Code:

$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 Code:

"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

Ittermat 10-05-2016 07:42 PM

Yea mine either... okay... XD thanks... I'll make it work with what I can make appear then ^^

Thank you for trying!


All times are GMT -5. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.