0

I am using marketplace in my website in that how to get seller Name and url

$collection= Mage::getModel('marketplace/sellerprofile')->load($sellerId,'seller_id');

I get Seller Id in above mention way how to get Seller Name & url

this is the field name store_title

Can you please suggest me how to get that

1
  • can you print the $collection data?? in that you have find out the seller name??
    – Ajay Patel
    Commented Mar 12, 2016 at 4:04

1 Answer 1

0

I'm not familiar with that module, but give this a try

$sellerProfile = Mage::getModel('marketplace/sellerprofile')->load($sellerId);

You should be able to just load it with the ID, if that doesn't work, use your original code

$sellerProfile = Mage::getModel('marketplace/sellerprofile')->load($sellerId, 'seller_id');

Now you should be able to echo the name, which should be one of these:

echo $sellerProfile->getName();

Or

echo $sellerProfile->getSellerName();

If you still can't find it after that, try doing a var_dump of the model's data

var_dump($sellerProfile->getData());

If you can find what the attribute's name is, you should be able to camel-case it into a get call on the model, for example:

If you see the attribute key is 'seller_profile_name' the call would be:

echo $sellerProfile->getSellerProfileName();

Let me know how this works out for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.