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 11-30-2015, 08:25 AM
Mortain's Avatar
Mortain Mortain is offline
***** SpottedMare.com
 
Join Date: Nov 2015
Posts: 80
Gender: Female
Credits: 10,227
Mortain is on a distinguished road
Default Can't get hidden shop to work...

I'm making a shop that you need an item to go to the link's page to get to the shop.

buy item>Get link>Use item>go to page with shop link> Go to shop (in that order.)

When i try to directly access the shop, it tosses this error.

Catchable fatal error: Argument 2 passed to AppController::setField() must implement interface Resource\Native\Objective, boolean given, called in /home/nirainia/public_html/adopts/shop.php on line 33 and defined in /home/nirainia/public_html/adopts/classes/class_appcontroller.php on line 169
Reply With Quote
  #2  
Old 11-30-2015, 10:48 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: 335,070
Hall of Famer is on a distinguished road
Default

The reason why you are getting this error is that the shop does not exist, which is why the variable $shop is Null rather than a valid Shop object.

And did you do all these via Admin control panel? Or you modified the script file? In the former case, I will investigate into this issue and help you as much as I can.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 11-30-2015, 10:50 AM
Mortain's Avatar
Mortain Mortain is offline
***** SpottedMare.com
 
Join Date: Nov 2015
Posts: 80
Gender: Female
Credits: 10,227
Mortain is on a distinguished road
Default

i added it via ACP. frustrating.
Reply With Quote
  #4  
Old 11-30-2015, 10:52 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: 335,070
Hall of Famer is on a distinguished road
Default

Well can you tell me how you made this in ACP? I dont recall doing anything like this myself, it seems that you are using this script in a really creative way. So please describe in more details, and I will try to reproduce the same error on my demo site, and then I can help you.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 11-30-2015, 10:57 AM
Mortain's Avatar
Mortain Mortain is offline
***** SpottedMare.com
 
Join Date: Nov 2015
Posts: 80
Gender: Female
Credits: 10,227
Mortain is on a distinguished road
Default

go to shops...
Fill out all pertinent data (name, type - adoptable, category - named after shop name)
Find image already uploaded.
make shop hidden
Add 9% sales tax
Reply With Quote
  #6  
Old 11-30-2015, 11:02 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: 335,070
Hall of Famer is on a distinguished road
Default

I see, but it seems to me that the system cannot find the shop for you, so either it is not created properly, or that it is not loading from database when you browse it. Can you go to PhpMyAdmin to check your database's table adopts_shops and see if the shop exists as a record? If so, it means that the hidden shop is not loaded from database, and I will see what I can do.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 11-30-2015, 06:32 PM
Mortain's Avatar
Mortain Mortain is offline
***** SpottedMare.com
 
Join Date: Nov 2015
Posts: 80
Gender: Female
Credits: 10,227
Mortain is on a distinguished road
Default

sorry about earlier, I had to run out the door to a doctors apointment.

Yes, the shop is in the database. I think this is hailing back to the problem of when i tried to install the item drop. it altered the DB some how to where things aren't showing (pets included)
Reply With Quote
  #8  
Old 11-30-2015, 06:42 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: 335,070
Hall of Famer is on a distinguished road
Default

I understand, I figured out what might be the issue for you. In fact it is the desired behavior, since if you can access a hidden shop by it's name, it's no longer really hidden. Think about this, the clever users may be able to find out the name of the shop, or they can simply exchange information. This is why by default, a hidden shop cannot be accessed by simply entering it's name from URL query string.

However, if you want the hidden shops to behave this way, I can make it happen for you. All you need is a single line edit in class shoplist. Lemme know if you want that, and I will show you the code to change.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #9  
Old 12-01-2015, 12:58 AM
Mortain's Avatar
Mortain Mortain is offline
***** SpottedMare.com
 
Join Date: Nov 2015
Posts: 80
Gender: Female
Credits: 10,227
Mortain is on a distinguished road
Default

well what i really want, is an item that gives a one time access to the shop per item use. Different items different colors will access different shops. that was the end goal. but there's really no way to do that.

Last edited by Mortain; 12-01-2015 at 01:01 AM.
Reply With Quote
  #10  
Old 12-01-2015, 02:49 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: 335,070
Hall of Famer is on a distinguished road
Default

I see, I dont think this is possible without some kind of modification to the script. You can find a list of item functions available from admin control panel, and I dont recall access to a hidden shop is one of the functionality in the default package. You can, however, enable one-time access to a custom page per item use. So there is a way to work around, as you can just create a custom page and put the link to your shop in this page.

But anyway, if you want to access a hidden shop(or any shop) by the shopname, you can change this block of code(the browse method) in shop.php:

PHP Code:
    public function browse(){
        
$mysidia Registry::get("mysidia");        
        
$shoptype $mysidia->db->select("shops", array("shoptype"), "shopname = '{$mysidia->input->get("shop")}'")->fetchColumn();
        
$shoplist = new Shoplist($shoptype);
        
$shop $shoplist->createshop($mysidia->input->get("shop"));
        
$this->setField("shop"$shop);
    } 
To this:

PHP Code:
    public function browse(){
        
$mysidia Registry::get("mysidia");        
        
$shoptype $mysidia->db->select("shops", array("shoptype"), "shopname = '{$mysidia->input->get("shop")}'")->fetchColumn();
        
$shoplist = new Shoplist($shoptype"all");
        
$shop $shoplist->createshop($mysidia->input->get("shop"));
        
$this->setField("shop"$shop);
    } 
This will create a shoplist object with fetchmode 'all', which will find even hidden shops for you. Hope it solves your problem with hidden shop display.
__________________


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
Oh My God. Something else does not work PokeFerno Questions and Supports 1 05-10-2014 10:14 AM
How to replace this to work with new Mys SilverDragonTears Questions and Supports 11 04-11-2012 07:16 PM
pages won't work. AlexC Questions and Supports 9 03-18-2011 01:08 AM
Cant get the site to work AlkseeyaKC Questions and Supports 42 01-19-2011 08:30 PM
Still a work in Progress MyBBSkinz Adoptables Sites Showcase 7 08-31-2008 08:13 AM


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

Currently Active Users: 9782 (0 members and 9782 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