Aegidius Posted January 8, 2014 Share Posted January 8, 2014 Hello. I would like to know how to build the supplier image link in a smarty template, given the supplier ID. Thank you. Egidio Link to comment Share on other sites More sharing options...
vekia Posted January 9, 2014 Share Posted January 9, 2014 try to add to front controller this function: public static function supplier_image($id_supplier) { return (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$id_supplier.'-'.ImageType::getFormatedName('medium').'.jpg')) ? $this->context->language->iso_code.'-default' : $id_supplier; } then you can use {FrontController::supplier_image(50)} and you will get an url to supplier image Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now