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 06-13-2012, 08:28 PM
Roaringwindz Roaringwindz is offline
Member
 
Join Date: May 2012
Posts: 2
Gender: Female
Credits: 497
Roaringwindz is on a distinguished road
Default Promocode Problem

I don't know why this is happening, but if someone could help me fix the problem, that would be so great.

The problem: I make a promo code for an adoptable, enter it in and it says the code matches the one in the database but I never get the pet. . . I go to the manage adoptables in my cpanel and see that the "adoptable's owner" is blank. Is there a reason why it didn't enter in my username?
Reply With Quote
  #2  
Old 06-13-2012, 09:07 PM
Alaric Alaric is offline
Mod
 
Join Date: Nov 2011
Posts: 112
Gender: Male
Credits: 312,464
Alaric is on a distinguished road
Default

I Guess you are having the same problem as shown In The link (.See Screenshots.)

Problem

I'll help you out!

1. Go to the File-Manager.
2. Find classes/class_promo.php
3. Find this part as shown below.

PHP Code:
 public function __construct($code ""){
      
// Fetch the database info into object property

      
$stmt $GLOBALS['adopts']->select("promocodes", array(), "code ='{$code}'");
      if(
$row $stmt->fetchObject()){
         
// loop through the anonymous object created to assign properties
         
foreach($row as $key => $val){
            
// Assign properties to our promocode instance
            
$this->$key $val;         
         }
      }
      else 
$this->message "Promocode does not exist...<br>";
  } 
4. Now Change it To..

PHP Code:
public function __construct($code ""){
      
// Fetch the database info into object property

      
$stmt $GLOBALS['adopts']->select("promocodes", array(), "code ='{$code}'");
      if(
$row $stmt->fetchObject()){
         
// loop through the anonymous object created to assign properties
         
foreach($row as $key => $val){
            
// Assign properties to our promocode instance
            
$this->$key $val;         
         }
         if(empty(
$this->user)) $this->user $GLOBALS['loggedinname'];
      }
      else 
$this->message "Promocode does not exist...<br>";
  } 
__________________
Reply With Quote
  #3  
Old 06-14-2012, 01:12 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: 331,828
Hall of Famer is on a distinguished road
Default

Oh yeah this public promocode glitch... In fact I plan to redesign the promocode system after Mys v1.3.3 release(not v1.3.2). The Promocode class is trying to do too much, it handles both public and private promocode, and it handles both adoptables and items promocode. Bad object-oriented design Id say, will be improved in future.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 06-14-2012, 11:26 AM
Roaringwindz Roaringwindz is offline
Member
 
Join Date: May 2012
Posts: 2
Gender: Female
Credits: 497
Roaringwindz is on a distinguished road
Default

Thanks Alaric and Hall of Fame! I can't wait until v1.3.2 and v1.3.3 are released.
Reply With Quote
  #5  
Old 10-29-2012, 06:53 AM
draugluin's Avatar
draugluin draugluin is offline
Member
 
Join Date: Oct 2011
Location: germany
Posts: 120
Gender: Unknown/Other
Credits: 10,860
draugluin is on a distinguished road
Default

@ Alaric

great, it works. Thanks so much ... I just installed the version 1.3.1 and have exactly this problem.
Reply With Quote
  #6  
Old 11-21-2012, 10:04 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: 331,828
Hall of Famer is on a distinguished road
Default

Well this is fixed in Mys v1.3.2, the promocode system now supports both public and private codes. The usage of promocode is also extended to pages, although you do not go to promo.php and enters your password for pages. Instead, upon visiting the page url you will get a screen asking for promocode.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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
Give promocode when buy item? dulop Questions and Supports 5 02-02-2013 05:42 AM
1.3.2 promocode for pages draugluin Questions and Supports 1 12-10-2012 03:36 PM
Change promocode private message dulop Questions and Supports 6 09-06-2012 09:04 PM
Item Promocode MaximumRide Questions and Supports 11 05-02-2012 11:31 PM
Promocode SilverDragonTears Questions and Supports 25 04-12-2012 03:11 AM


All times are GMT -5. The time now is 09:24 PM.

Currently Active Users: 375 (0 members and 375 guests)
Threads: 4,080, Posts: 32,024, 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