Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2012, 03:02 AM
dulop's Avatar
dulop dulop is offline
Member
 
Join Date: May 2012
Posts: 26
Gender: Male
Credits: 7,139
dulop is on a distinguished road
Default Give promocode when buy item?

Hello!
There is a way to give a promocode to the users, when they buy an item?

Thanks! :D
Reply With Quote
  #2  
Old 09-14-2012, 03:13 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 492,060
Hall of Famer is on a distinguished road
Default

Well you can take a look at the class file class_promocode.php, it explains how to use the promocode class.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 09-19-2012, 09:29 PM
dulop's Avatar
dulop dulop is offline
Member
 
Join Date: May 2012
Posts: 26
Gender: Male
Credits: 7,139
dulop is on a distinguished road
Default

I dont know how to give a promocode when a user buy an item :s
Reply With Quote
  #4  
Old 09-19-2012, 10:41 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 492,060
Hall of Famer is on a distinguished road
Default

Of course I know you dont know, thats why I told you to look at promocode class file and read the comments in it. I dont really have time to work on a custom script for anyone at this point, busy with school and Mys v1.3.2 at the moment(I will help with newbie problems such as installing/configuring the site though).
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 09-28-2012, 01:33 AM
dulop's Avatar
dulop dulop is offline
Member
 
Join Date: May 2012
Posts: 26
Gender: Male
Credits: 7,139
dulop is on a distinguished road
Default

Ah ok, sorry! no problem, dont worry ^^
And thanks for reply!
Reply With Quote
  #6  
Old 02-02-2013, 06:42 AM
dulop's Avatar
dulop dulop is offline
Member
 
Join Date: May 2012
Posts: 26
Gender: Male
Credits: 7,139
dulop is on a distinguished road
Default

i've seeing the files and i made this:

PHP Code:
function items_milagros($item$adopt){
$codigopromo $adopts->select("items_functions", array(), "code")->fetchObject();
$mtitle "Has ganado un logro!";
        
$mtext "Felicitaciones!  Has recibido una recompenza. El código es el siguiente:{$codigopromo} . Puedes usarlo en la página de promos. Para saber como usarlo hay una guía correspondiente.";

        
$date date('Y-m-d');
        
$GLOBALS['adopts']->insert("messages", array("id" => NULL"fromuser" => "SYSTEM""touser" => $owner"status" => "unread""datesent" => $date"messagetitle" => $mtitle"messagetext" => $mtext));
        
        
$row $GLOBALS['adopts']->select("users", array(), "username='{$owner}'")->fetchObject();    

        
$newmessagenotify=$row->newmessagenotify;
        
$email=$row->email;
        
        if(
$newmessagenotify == 1) {
            
// We are sending this user an email about the new message...
            
$systememail grabanysetting("systememail"); // QUERYPROBLEM - we should get the settings at the beginning so we never need to call for them after that.            
            
$headers "From: {$systememail}";
            
$site_name grabanysetting("sitename"); // QUERYPROBLEM - see, two queries for this message alone.
            
$message "Hello {$owner};\n\nYou have received a new Private Message from SYSTEM at {$site_name} with the title {$mtitle}.\n
            You can read this message at: http://www."
.constant("DOMAIN").constant("SCRIPTPATH")."/messages.php\n
            Thank You.  The 
{$site_name} team.";

            
mail($email$site_name." - You Have Received a Reward"$message$headers);
        }
        
$note "Has conseguido un código promo!";
return 
$note;

Its a new function. I want that when i use a item with this function, the system send me a pm, giving me a promocode.

But doesn't work. Any idea? when i use the item, the screen goes blank.
Thank you
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips Kyttias Mys v1.3.x Mods 55 06-19-2020 12:21 PM
Item Promocode MaximumRide Questions and Supports 11 05-03-2012 12:31 AM
ok im new and i give up i am asking for help chinchillapals Questions and Supports 12 04-18-2012 05:22 PM
Promocode SilverDragonTears Questions and Supports 25 04-12-2012 04:11 AM


All times are GMT -5. The time now is 01:49 PM.

Currently Active Users: 682 (0 members and 682 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636