Logo of the seller

04.12.2017 15:53
#1
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Logo of the seller

How on the page of a product to display a logo of the seller?
What PHP code?


Joomla: 3.8.1
JoomShopping: Version 4.16.3
PHP: 7.0.23
MySQL: mysqli 5.6.37
Website Url: lavka-chudo.ru
 
05.12.2017 12:08
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: Logo of the seller

<?php if ($this->product->vendor_info){?>

change to

<?php if ($this->product->vendor_info){?>
<img src="<?php print $this->product->vendor_info->logo;?>">

 
07.12.2017 10:10
#3
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Aw: Logo of the seller

<?php if ($this->product->vendor_info){?>
<img src="<?php print $this->product->vendor_info->logo;?>">
<?php }?>

But nothing is displayed

 
07.12.2017 12:00
#4
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: Logo of the seller

Configuration / product

Display vendor ?
Display vendor detail ?

 
07.12.2017 20:02
#5
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Aw: Logo of the seller

Yes.
It is displayed the name, surname, and here email,city and a logo isn't displayed.

<?php if ($this->product->vendor_info){?>
<img src="<?php print $this->product->vendor_info->logo;?>">
<?php }?>

<?php if ($this->product->vendor_info){?>
<?php print $this->product->vendor_info->email;?>
<?php }?>

<?php if ($this->product->vendor_info){?>
<?php print $this->product->vendor_info->city;?>
<?php }?>


Joomla: 3.8.1
JoomShopping: Version 4.16.3
PHP: 7.0.23
MySQL: mysqli 5.6.37
Website Url: https://lavka-chudo.ru/
 
08.12.2017 07:56
#6
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: Logo of the seller

<?php print_r($this->product->vendor_info);?>

 
08.12.2017 18:19
#7
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Aw: Logo of the seller

Doesn't work.

And if Addon Front Vendor is active whether there will be differences in the PHP code?

 
08.12.2017 18:22
#8
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Aw: Logo of the seller

first name, last name, shop name - displayed/
email, city - no.

At the seller the city and Email are filled

 
08.12.2017 21:44
#9
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: Logo of the seller

change code
lib/factory.php

public static function getAllVendor(){
static $rows;
if (!is_array($rows)){
$db = JFactory::getDBO();
$query = "select id, shop_name, l_name, f_name from #__jshopping_vendors";
$db->setQuery($query);
$_rows = $db->loadObjectList();
$rows = array();
$mainvendor = JSFactory::getMainVendor();
$rows[0] = $mainvendor;
foreach($_rows as $row){
$rows[$row->id] = $row;
}
unset($_rows);
}
return $rows;
}

Change to

public static function getAllVendor(){
static $rows;
if (!is_array($rows)){
$db = JFactory::getDBO();
$query = "select id, shop_name, l_name, f_name, city, logo, email from #__jshopping_vendors";
$db->setQuery($query);
$_rows = $db->loadObjectList();
$rows = array();
$mainvendor = JSFactory::getMainVendor();
$rows[0] = $mainvendor;
foreach($_rows as $row){
$rows[$row->id] = $row;
}
unset($_rows);
}
return $rows;
}


Letzte Änderung: 08.12.2017 21:45
 
09.12.2017 11:26
#10
Graffity.88
Joomshopping forum user no avatar
Name: Waleriy
30.11.2011
Posts: 28
Quote
Aw: Logo of the seller

thanks a lot. has helped!

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.