Call to undefined relationship [product_type] on model [App\Models\MageProduct]












0















I'm very new with Laravel and Laravel backpack. I have installed yesterday the demo version and I'm trying to create my first crud.



My crud will consist of 6 dependent select database dropdowns and one field.



I have disabled 6 of my fields to test with only one select dropdown 'product_type_id'.



I have created according to the documentation :



database tables
models
Controller
Route
Menu Item



When I'm loading my CRUD, my CRUD is loaded, but I get this error : 'Error Loading Page. Please refresh the page'. Whit the Chrome Inspect function, I can see that there's an error generated by Search POST :



"message": "Call to undefined relationship [product_type] on model [AppModelsMageProduct]."



Whatever I'm trying, I always get this error. I'm certainly missing something, so I would appreciate some help here. I have of course read the related other similar issues concerning undefined relationships on StackOverflow, but couldn't solve it by myself. Please find hereafter my models and controller. Thanks in advance for your support, cheers, Marc



MODEL MAGEPRODUCT



<?php

namespace AppModels;

use BackpackCRUDCrudTrait;
use BackpackCRUDModelTraitsSpatieTranslatableHasTranslations;
use IlluminateDatabaseEloquentModel;
use AppmodelsMageProductType;

class MageProduct extends Model
{
use CrudTrait;
use HasTranslations;

/*
|--------------------------------------------------------------------------
| GLOBAL VARIABLES
|--------------------------------------------------------------------------
*/

protected $table = 'mage_products';
protected $primaryKey = 'id';
public $timestamps = true;
// protected $guarded = ['id'];
protected $fillable = ['product_type_id'];
// protected $hidden = ;
// protected $dates = ;
// public $translatable = ;

/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/

public function ProductTypes()
{
return $this->hasMany('AppModelsMageProductType', 'product_type_id');
// return $this->hasMany(MageProductType::class);
}

/*
|--------------------------------------------------------------------------
| SCOPES
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| ACCESORS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| MUTATORS
|--------------------------------------------------------------------------
*/
}


MODEL MAGEPRODUCTTYPE



<?php

namespace AppModels;

use BackpackCRUDCrudTrait;
use IlluminateDatabaseEloquentModel;
use AppmodelsMageProduct;

class MageProductType extends Model
{

use CrudTrait;

/*
|--------------------------------------------------------------------------
| GLOBAL VARIABLES
|--------------------------------------------------------------------------
*/

protected $table = 'mage_product_types';
protected $primaryKey = 'id';
// protected $guarded = ;
// protected $hidden = ['id'];
protected $fillable = ['product_type'];
public $timestamps = true;

/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| SCOPES
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| ACCESORS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| MUTATORS
|--------------------------------------------------------------------------
*/
}


CONTROLLER



<?php

namespace AppHttpControllersAdmin;

// use AppHttpRequestsTagRequest as StoreRequest;
// VALIDATION: change the requests to match your own file names if you need form validation
// use AppHttpRequestsTagRequest as UpdateRequest;
use BackpackCRUDappHttpControllersCrudController;

use AppModelsMageProductType;

class MageProductCrudController extends CrudController
{
public function setup()
{
/*
|--------------------------------------------------------------------------
| CrudPanel Basic Information
|--------------------------------------------------------------------------
*/

$this->crud->setModel('AppModelsMageProduct');
$this->crud->setRoute(config('backpack.base.route_prefix').'/produit');
// $this->crud->setRoute("admin/produitsmage");
$this->crud->setEntityNameStrings('produit', 'produits');

// $this->crud->enableAjaxTable();

/*
|--------------------------------------------------------------------------
| BASIC CRUD INFORMATION
|--------------------------------------------------------------------------
*/

// ------ CRUD COLUMNS

$this->crud->addColumn([
'label' => 'Type',
'type' => 'select',
'name' => 'product_type_id',
'entity' => 'product_type',
'model' => 'AppModelsMageProductType',
]);

// ------ CRUD FIELDS

$this->crud->addField([ // SELECT
'label' => 'Type',
'type' => 'select',
'name' => 'product_type_id',
'entity' => 'product_type',
'attribute' => 'product_type',
'model' => 'AppModelsMageProductType',
]);


}

public function store(StoreRequest $request)
{
// your additional operations before save here
$redirect_location = parent::storeCrud($request);
// your additional operations after save here
// use $this->data['entry'] or $this->crud->entry
return $redirect_location;
}

public function update(UpdateRequest $request)
{
// your additional operations before save here
$redirect_location = parent::updateCrud($request);
// your additional operations after save here
// use $this->data['entry'] or $this->crud->entry
return $redirect_location;
}
}









share|improve this question





























    0















    I'm very new with Laravel and Laravel backpack. I have installed yesterday the demo version and I'm trying to create my first crud.



    My crud will consist of 6 dependent select database dropdowns and one field.



    I have disabled 6 of my fields to test with only one select dropdown 'product_type_id'.



    I have created according to the documentation :



    database tables
    models
    Controller
    Route
    Menu Item



    When I'm loading my CRUD, my CRUD is loaded, but I get this error : 'Error Loading Page. Please refresh the page'. Whit the Chrome Inspect function, I can see that there's an error generated by Search POST :



    "message": "Call to undefined relationship [product_type] on model [AppModelsMageProduct]."



    Whatever I'm trying, I always get this error. I'm certainly missing something, so I would appreciate some help here. I have of course read the related other similar issues concerning undefined relationships on StackOverflow, but couldn't solve it by myself. Please find hereafter my models and controller. Thanks in advance for your support, cheers, Marc



    MODEL MAGEPRODUCT



    <?php

    namespace AppModels;

    use BackpackCRUDCrudTrait;
    use BackpackCRUDModelTraitsSpatieTranslatableHasTranslations;
    use IlluminateDatabaseEloquentModel;
    use AppmodelsMageProductType;

    class MageProduct extends Model
    {
    use CrudTrait;
    use HasTranslations;

    /*
    |--------------------------------------------------------------------------
    | GLOBAL VARIABLES
    |--------------------------------------------------------------------------
    */

    protected $table = 'mage_products';
    protected $primaryKey = 'id';
    public $timestamps = true;
    // protected $guarded = ['id'];
    protected $fillable = ['product_type_id'];
    // protected $hidden = ;
    // protected $dates = ;
    // public $translatable = ;

    /*
    |--------------------------------------------------------------------------
    | FUNCTIONS
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | RELATIONS
    |--------------------------------------------------------------------------
    */

    public function ProductTypes()
    {
    return $this->hasMany('AppModelsMageProductType', 'product_type_id');
    // return $this->hasMany(MageProductType::class);
    }

    /*
    |--------------------------------------------------------------------------
    | SCOPES
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | ACCESORS
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | MUTATORS
    |--------------------------------------------------------------------------
    */
    }


    MODEL MAGEPRODUCTTYPE



    <?php

    namespace AppModels;

    use BackpackCRUDCrudTrait;
    use IlluminateDatabaseEloquentModel;
    use AppmodelsMageProduct;

    class MageProductType extends Model
    {

    use CrudTrait;

    /*
    |--------------------------------------------------------------------------
    | GLOBAL VARIABLES
    |--------------------------------------------------------------------------
    */

    protected $table = 'mage_product_types';
    protected $primaryKey = 'id';
    // protected $guarded = ;
    // protected $hidden = ['id'];
    protected $fillable = ['product_type'];
    public $timestamps = true;

    /*
    |--------------------------------------------------------------------------
    | FUNCTIONS
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | RELATIONS
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | SCOPES
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | ACCESORS
    |--------------------------------------------------------------------------
    */

    /*
    |--------------------------------------------------------------------------
    | MUTATORS
    |--------------------------------------------------------------------------
    */
    }


    CONTROLLER



    <?php

    namespace AppHttpControllersAdmin;

    // use AppHttpRequestsTagRequest as StoreRequest;
    // VALIDATION: change the requests to match your own file names if you need form validation
    // use AppHttpRequestsTagRequest as UpdateRequest;
    use BackpackCRUDappHttpControllersCrudController;

    use AppModelsMageProductType;

    class MageProductCrudController extends CrudController
    {
    public function setup()
    {
    /*
    |--------------------------------------------------------------------------
    | CrudPanel Basic Information
    |--------------------------------------------------------------------------
    */

    $this->crud->setModel('AppModelsMageProduct');
    $this->crud->setRoute(config('backpack.base.route_prefix').'/produit');
    // $this->crud->setRoute("admin/produitsmage");
    $this->crud->setEntityNameStrings('produit', 'produits');

    // $this->crud->enableAjaxTable();

    /*
    |--------------------------------------------------------------------------
    | BASIC CRUD INFORMATION
    |--------------------------------------------------------------------------
    */

    // ------ CRUD COLUMNS

    $this->crud->addColumn([
    'label' => 'Type',
    'type' => 'select',
    'name' => 'product_type_id',
    'entity' => 'product_type',
    'model' => 'AppModelsMageProductType',
    ]);

    // ------ CRUD FIELDS

    $this->crud->addField([ // SELECT
    'label' => 'Type',
    'type' => 'select',
    'name' => 'product_type_id',
    'entity' => 'product_type',
    'attribute' => 'product_type',
    'model' => 'AppModelsMageProductType',
    ]);


    }

    public function store(StoreRequest $request)
    {
    // your additional operations before save here
    $redirect_location = parent::storeCrud($request);
    // your additional operations after save here
    // use $this->data['entry'] or $this->crud->entry
    return $redirect_location;
    }

    public function update(UpdateRequest $request)
    {
    // your additional operations before save here
    $redirect_location = parent::updateCrud($request);
    // your additional operations after save here
    // use $this->data['entry'] or $this->crud->entry
    return $redirect_location;
    }
    }









    share|improve this question



























      0












      0








      0








      I'm very new with Laravel and Laravel backpack. I have installed yesterday the demo version and I'm trying to create my first crud.



      My crud will consist of 6 dependent select database dropdowns and one field.



      I have disabled 6 of my fields to test with only one select dropdown 'product_type_id'.



      I have created according to the documentation :



      database tables
      models
      Controller
      Route
      Menu Item



      When I'm loading my CRUD, my CRUD is loaded, but I get this error : 'Error Loading Page. Please refresh the page'. Whit the Chrome Inspect function, I can see that there's an error generated by Search POST :



      "message": "Call to undefined relationship [product_type] on model [AppModelsMageProduct]."



      Whatever I'm trying, I always get this error. I'm certainly missing something, so I would appreciate some help here. I have of course read the related other similar issues concerning undefined relationships on StackOverflow, but couldn't solve it by myself. Please find hereafter my models and controller. Thanks in advance for your support, cheers, Marc



      MODEL MAGEPRODUCT



      <?php

      namespace AppModels;

      use BackpackCRUDCrudTrait;
      use BackpackCRUDModelTraitsSpatieTranslatableHasTranslations;
      use IlluminateDatabaseEloquentModel;
      use AppmodelsMageProductType;

      class MageProduct extends Model
      {
      use CrudTrait;
      use HasTranslations;

      /*
      |--------------------------------------------------------------------------
      | GLOBAL VARIABLES
      |--------------------------------------------------------------------------
      */

      protected $table = 'mage_products';
      protected $primaryKey = 'id';
      public $timestamps = true;
      // protected $guarded = ['id'];
      protected $fillable = ['product_type_id'];
      // protected $hidden = ;
      // protected $dates = ;
      // public $translatable = ;

      /*
      |--------------------------------------------------------------------------
      | FUNCTIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | RELATIONS
      |--------------------------------------------------------------------------
      */

      public function ProductTypes()
      {
      return $this->hasMany('AppModelsMageProductType', 'product_type_id');
      // return $this->hasMany(MageProductType::class);
      }

      /*
      |--------------------------------------------------------------------------
      | SCOPES
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | ACCESORS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | MUTATORS
      |--------------------------------------------------------------------------
      */
      }


      MODEL MAGEPRODUCTTYPE



      <?php

      namespace AppModels;

      use BackpackCRUDCrudTrait;
      use IlluminateDatabaseEloquentModel;
      use AppmodelsMageProduct;

      class MageProductType extends Model
      {

      use CrudTrait;

      /*
      |--------------------------------------------------------------------------
      | GLOBAL VARIABLES
      |--------------------------------------------------------------------------
      */

      protected $table = 'mage_product_types';
      protected $primaryKey = 'id';
      // protected $guarded = ;
      // protected $hidden = ['id'];
      protected $fillable = ['product_type'];
      public $timestamps = true;

      /*
      |--------------------------------------------------------------------------
      | FUNCTIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | RELATIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | SCOPES
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | ACCESORS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | MUTATORS
      |--------------------------------------------------------------------------
      */
      }


      CONTROLLER



      <?php

      namespace AppHttpControllersAdmin;

      // use AppHttpRequestsTagRequest as StoreRequest;
      // VALIDATION: change the requests to match your own file names if you need form validation
      // use AppHttpRequestsTagRequest as UpdateRequest;
      use BackpackCRUDappHttpControllersCrudController;

      use AppModelsMageProductType;

      class MageProductCrudController extends CrudController
      {
      public function setup()
      {
      /*
      |--------------------------------------------------------------------------
      | CrudPanel Basic Information
      |--------------------------------------------------------------------------
      */

      $this->crud->setModel('AppModelsMageProduct');
      $this->crud->setRoute(config('backpack.base.route_prefix').'/produit');
      // $this->crud->setRoute("admin/produitsmage");
      $this->crud->setEntityNameStrings('produit', 'produits');

      // $this->crud->enableAjaxTable();

      /*
      |--------------------------------------------------------------------------
      | BASIC CRUD INFORMATION
      |--------------------------------------------------------------------------
      */

      // ------ CRUD COLUMNS

      $this->crud->addColumn([
      'label' => 'Type',
      'type' => 'select',
      'name' => 'product_type_id',
      'entity' => 'product_type',
      'model' => 'AppModelsMageProductType',
      ]);

      // ------ CRUD FIELDS

      $this->crud->addField([ // SELECT
      'label' => 'Type',
      'type' => 'select',
      'name' => 'product_type_id',
      'entity' => 'product_type',
      'attribute' => 'product_type',
      'model' => 'AppModelsMageProductType',
      ]);


      }

      public function store(StoreRequest $request)
      {
      // your additional operations before save here
      $redirect_location = parent::storeCrud($request);
      // your additional operations after save here
      // use $this->data['entry'] or $this->crud->entry
      return $redirect_location;
      }

      public function update(UpdateRequest $request)
      {
      // your additional operations before save here
      $redirect_location = parent::updateCrud($request);
      // your additional operations after save here
      // use $this->data['entry'] or $this->crud->entry
      return $redirect_location;
      }
      }









      share|improve this question
















      I'm very new with Laravel and Laravel backpack. I have installed yesterday the demo version and I'm trying to create my first crud.



      My crud will consist of 6 dependent select database dropdowns and one field.



      I have disabled 6 of my fields to test with only one select dropdown 'product_type_id'.



      I have created according to the documentation :



      database tables
      models
      Controller
      Route
      Menu Item



      When I'm loading my CRUD, my CRUD is loaded, but I get this error : 'Error Loading Page. Please refresh the page'. Whit the Chrome Inspect function, I can see that there's an error generated by Search POST :



      "message": "Call to undefined relationship [product_type] on model [AppModelsMageProduct]."



      Whatever I'm trying, I always get this error. I'm certainly missing something, so I would appreciate some help here. I have of course read the related other similar issues concerning undefined relationships on StackOverflow, but couldn't solve it by myself. Please find hereafter my models and controller. Thanks in advance for your support, cheers, Marc



      MODEL MAGEPRODUCT



      <?php

      namespace AppModels;

      use BackpackCRUDCrudTrait;
      use BackpackCRUDModelTraitsSpatieTranslatableHasTranslations;
      use IlluminateDatabaseEloquentModel;
      use AppmodelsMageProductType;

      class MageProduct extends Model
      {
      use CrudTrait;
      use HasTranslations;

      /*
      |--------------------------------------------------------------------------
      | GLOBAL VARIABLES
      |--------------------------------------------------------------------------
      */

      protected $table = 'mage_products';
      protected $primaryKey = 'id';
      public $timestamps = true;
      // protected $guarded = ['id'];
      protected $fillable = ['product_type_id'];
      // protected $hidden = ;
      // protected $dates = ;
      // public $translatable = ;

      /*
      |--------------------------------------------------------------------------
      | FUNCTIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | RELATIONS
      |--------------------------------------------------------------------------
      */

      public function ProductTypes()
      {
      return $this->hasMany('AppModelsMageProductType', 'product_type_id');
      // return $this->hasMany(MageProductType::class);
      }

      /*
      |--------------------------------------------------------------------------
      | SCOPES
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | ACCESORS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | MUTATORS
      |--------------------------------------------------------------------------
      */
      }


      MODEL MAGEPRODUCTTYPE



      <?php

      namespace AppModels;

      use BackpackCRUDCrudTrait;
      use IlluminateDatabaseEloquentModel;
      use AppmodelsMageProduct;

      class MageProductType extends Model
      {

      use CrudTrait;

      /*
      |--------------------------------------------------------------------------
      | GLOBAL VARIABLES
      |--------------------------------------------------------------------------
      */

      protected $table = 'mage_product_types';
      protected $primaryKey = 'id';
      // protected $guarded = ;
      // protected $hidden = ['id'];
      protected $fillable = ['product_type'];
      public $timestamps = true;

      /*
      |--------------------------------------------------------------------------
      | FUNCTIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | RELATIONS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | SCOPES
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | ACCESORS
      |--------------------------------------------------------------------------
      */

      /*
      |--------------------------------------------------------------------------
      | MUTATORS
      |--------------------------------------------------------------------------
      */
      }


      CONTROLLER



      <?php

      namespace AppHttpControllersAdmin;

      // use AppHttpRequestsTagRequest as StoreRequest;
      // VALIDATION: change the requests to match your own file names if you need form validation
      // use AppHttpRequestsTagRequest as UpdateRequest;
      use BackpackCRUDappHttpControllersCrudController;

      use AppModelsMageProductType;

      class MageProductCrudController extends CrudController
      {
      public function setup()
      {
      /*
      |--------------------------------------------------------------------------
      | CrudPanel Basic Information
      |--------------------------------------------------------------------------
      */

      $this->crud->setModel('AppModelsMageProduct');
      $this->crud->setRoute(config('backpack.base.route_prefix').'/produit');
      // $this->crud->setRoute("admin/produitsmage");
      $this->crud->setEntityNameStrings('produit', 'produits');

      // $this->crud->enableAjaxTable();

      /*
      |--------------------------------------------------------------------------
      | BASIC CRUD INFORMATION
      |--------------------------------------------------------------------------
      */

      // ------ CRUD COLUMNS

      $this->crud->addColumn([
      'label' => 'Type',
      'type' => 'select',
      'name' => 'product_type_id',
      'entity' => 'product_type',
      'model' => 'AppModelsMageProductType',
      ]);

      // ------ CRUD FIELDS

      $this->crud->addField([ // SELECT
      'label' => 'Type',
      'type' => 'select',
      'name' => 'product_type_id',
      'entity' => 'product_type',
      'attribute' => 'product_type',
      'model' => 'AppModelsMageProductType',
      ]);


      }

      public function store(StoreRequest $request)
      {
      // your additional operations before save here
      $redirect_location = parent::storeCrud($request);
      // your additional operations after save here
      // use $this->data['entry'] or $this->crud->entry
      return $redirect_location;
      }

      public function update(UpdateRequest $request)
      {
      // your additional operations before save here
      $redirect_location = parent::updateCrud($request);
      // your additional operations after save here
      // use $this->data['entry'] or $this->crud->entry
      return $redirect_location;
      }
      }






      laravel backpack-for-laravel






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 18 '18 at 6:04









      Mehran

      181311




      181311










      asked Nov 18 '18 at 5:47









      marcqmarcq

      1139




      1139
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358255%2fcall-to-undefined-relationship-product-type-on-model-app-models-mageproduct%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358255%2fcall-to-undefined-relationship-product-type-on-model-app-models-mageproduct%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to pass form data using jquery Ajax to insert data in database?

          National Museum of Racing and Hall of Fame

          Guess what letter conforming each word