ArtcoInc Posted August 13, 2019 Posted August 13, 2019 Unless I'm missing something, which is quite possible ... There is no provision to display the Category Image on a Categories page. I did a quick hack to add code to display the image in the /includes/modules/content/index_nested/templates/tpl_cm_in_title.php file, although in retrospect I should (and probably will) make a new module just to display the image. M
burt Posted August 13, 2019 Posted August 13, 2019 50 minutes ago, ArtcoInc said: Unless I'm missing something, which is quite possible ... There is no provision to display the Category Image on a Categories page. I did a quick hack to add code to display the image in the /includes/modules/content/index_nested/templates/tpl_cm_in_title.php file, although in retrospect I should (and probably will) make a new module just to display the image. M So far as I recall, this functionality has never been available in osCommerce... As you say...as we're now modular...it needs a module.
René H4 Posted August 13, 2019 Posted August 13, 2019 1 hour ago, burt said: There is no provision to display the Category Image on a Categories page. In RC2a this was standard. I make use of this feature as well on my current frozen site.
burt Posted August 18, 2019 Posted August 18, 2019 On 8/13/2019 at 7:43 PM, René H4 said: In RC2a this was standard. I make use of this feature as well on my current frozen site. It's a long time since I saw a RC2A, but I am 99.9 certain that the functionality never existed in the 2.3 series. It only takes a module! Maybe someone can make it for Core?
ArtcoInc Posted August 18, 2019 Author Posted August 18, 2019 @burt I seem to remember it being in the Community Edition from v2.3.3.4 all the way through Frozen. Anyway, I backed out my hack, and wrote up two content modules (one for index_nested and one for index_products). M
♥JcMagpie Posted August 18, 2019 Posted August 18, 2019 On 8/13/2019 at 5:00 PM, ArtcoInc said: There is no provision to display the Category Image on a Categories page. It is already in the title function, you just need to add $cm_image to the template file to display both cat images and manufacturing images. layout is upto you and your page design. This was done just with a simple image output. <?php echo tep_image('images/' . $cm_image, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"'); ?> function execute() { global $oscTemplate, $current_category_id, $OSCOM_category; $content_width = MODULE_CONTENT_IP_TITLE_CONTENT_WIDTH; if (isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) { $manufacturer_query = tep_db_query("select manufacturers_image, manufacturers_name from manufacturers where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); $cm_name = $manufacturer['manufacturers_name']; $cm_image = $manufacturer['manufacturers_image']; } else { $cm_name = $OSCOM_category->getData($current_category_id, 'name'); $cm_image = $OSCOM_category->getData($current_category_id, 'image');
ArtcoInc Posted August 18, 2019 Author Posted August 18, 2019 @JcMagpie That's what I said I did in my first post. M
burt Posted August 18, 2019 Posted August 18, 2019 Now you mention it I do (vaguely) recall writing a post explaining how to (fairly) easily add a category image to the Title Module, which was then taken further in the codebase ready for people to start using... https://github.com/gburton/CE-Phoenix/blob/master/includes/modules/content/index_nested/cm_in_title.php#L41 I don't remember a core-code separate category image Module though...I could very well be mistaken on that though.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.