Jump to content

supplier description


LeGhe

Recommended Posts

Bonjour,

 

Comment, dans la fiche product, appeler le supplier_description, comme existe déjà le manufacturer ?

$product_manufacturer Smarty_Variable Object (3)

->value = Manufacturer Object (13)

->id = 9

->id_manufacturer = "9"

->name = "Annick Cojean"

->description = "Annick Cojean est grand reporter au M..."

->short_description = ""

->id_address = false...

 

Quelle classe modifier ? Je ne trouve pas !!

Merci

Link to comment
Share on other sites

  • 1 year later...

Faire la même chose dans le controller Product (voir ligne 220):

 

'product_manufacturer' => new Manufacturer((int)$this->product->id_manufacturer, $this->context->language->id),

 

Ajouter

 

'product_supplier' => new Supplier((int)$this->product->id_supplier, $this->context->language->id),

 

Il ne reste plus qu'a afficher tout ça dans le template

Edited by webpulser (see edit history)
Link to comment
Share on other sites

j ai ajouté

{if $product_supplier->id}<p>{$product->supplier_description|escape:'htmlall':'UTF-8'}</p> {/if}

dans product.tpl mais ça fonctionne pas.

et voila le product.php

$this->context->smarty->assign(array(
'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'),
'customizationFields' => ($this->product->customizable) ? $this->product->getCustomizationFields($this->context->language->id) : false,
'accessories' => $this->product->getAccessories($this->context->language->id),
'return_link' => $return_link,
'product' => $this->product,
'product_manufacturer' => new Manufacturer((int)$this->product->id_manufacturer, $this->context->language->id),
'product_supplier' => new Supplier((int)$this->product->id_supplier, $this->context->language->id),

Edited by amro (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...