VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: milstan on October 06, 2011, 11:33:15 AM

Title: Store name
Post by: milstan on October 06, 2011, 11:33:15 AM
I created template override for Categories. How can I show Store Name in categories template? Tried <?php echo $this->vendor->vendor_store_name; ?> but does not work. It works fine when I enter any static text.

Also, in backend, when I go Shop > Shop and enter anything under "Vendor Information", it's deleted after Save.

I am using 2.0.0-RC-2G.
Title: Re: Store name
Post by: PRO on October 06, 2011, 16:18:30 PM
vendor_vendor_name   might work if you are the only vendor
Title: Re: Store name
Post by: milstan on October 06, 2011, 17:25:48 PM
Sorry but I don't understand what you mean.

Code <?php echo $this->vendor->vendor_name; ?> does not work (gives empty value).
Title: Re: Store name
Post by: Milbo on October 06, 2011, 21:49:31 PM
The right name is vendor_store_name. Should work with it.
Title: Re: Store name
Post by: milstan on October 06, 2011, 21:52:09 PM
Tried with:

<?php echo $this->vendor->store_name; ?>
and
<?php echo $this->vendor->vendor_store_name; ?>

but no luck! Shows nothing.
Title: Re: Store name
Post by: alatak on October 07, 2011, 00:01:08 AM
Hi,

The vendor information is not available on that page.
Title: Re: Store name
Post by: milstan on January 04, 2012, 11:28:16 AM
Hi,

Any update on this? How to get values ​​"vendor_store_name" and "vendor_store_desc" and echo them into the categories page?
Title: Re: Store name
Post by: razor7 on January 19, 2012, 01:52:16 AM
Hi, i'm in need of the same at payment process, at function plgVmConfirmedOrder on my payment plugin.

Which method gives me vendor store name, any code snippet?

Thanks a lot!
Title: Re: Store name
Post by: Virtual on March 15, 2012, 15:53:43 PM
I tried

<?php echo $this->product->vendor_store_name; ?>
and
<?php echo $this->product->vendor_name; ?>
and
<?php echo $this->product->store_name; ?>

for productdetails/tmpl, does not work too.
Title: Re: Store name
Post by: jshroyer on April 13, 2012, 22:50:22 PM
Just figured this out. First you need to register the variables in order to use them.

<?php $vendorModel VmModel::getModel('vendor');
$this->vendor $vendorModel->getVendor(); ?>


Then you can use the store name wherever you want using this:

<?php echo $this->vendor->vendor_store_name?>

Hope this helps!
Title: Re: Store name
Post by: adomi on May 15, 2013, 15:31:15 PM
Hi,

Where exactly you put this code, because i tried and it seems not working.