Hi BrockleyJohn,
I have tried both those, under index products I tried :
cm_ip_title.php
cm_ip_product_listing.php
cm_ip_category_manufacturer_description.php
And under index nested :
cm_in_category_listing.php
cm_in_title.php
cm_in_card_products.php
cm_in_category_description.php
When trying to paste the banner image code into the above files one out of two things happened, either nothing showed (it seemed to have no effect), or it caused the page not to fully load (only the breadcrumb showed, nothing below that), so I know I am in the right area.
But doing exactly the same as I did with the special offer page and the new products page does not seem to work on the files listed above, so I presume I am missing something, or I need to change the code for the banner ?
Here is a example, this is the page called cm_in_title.php (as a example of where I paste the code, see the red dot, in this case I tried one or the other red dot areas to paste the code)
Thank you.
Trying to add a banner to the top of the category page
-
cerberus
- Member
- Posts: 78
- Joined: Sun Sep 06, 2026 10:54 pm
- Phoenix Version: v1.1.0.7
- Has thanked: 20 times
- Been thanked: 6 times
Re: Trying to add a banner to the top of the category page
You do not have the required permissions to view the files attached to this post.
Tags:
- burt
- Core Team
- Posts: 4719
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 278 times
- Been thanked: 464 times
Re: Trying to add a banner to the top of the category page
Modularity - embrace the jigsaw. You should rarely have to edit files (other than language files).
--
Phoenix is made up of lots of jigsaw pieces. You are currently missing three of those pieces which will help complete the picture and make Phoenix into "Your Phoenix", namely;
1. A hook for the admin area that allows you to attach a banner per category
2. A module for index_nested that shows the banner (index_nested is basically categories that have NO products)
3. A module for index_products that shows the banner (index_products, guess what, is basically a category that DOES have products)
If you had those three jigsaw pieces, you would then simply go into your admin area > drill down to a category > press edit > upload a banner image. Do the same for another category. Etc etc. On the shop side, each category would then show its attached banner.
Modularity is key. All of this would be done without touching ANY files.
Just upload, install, and think "WOW! Phoenix can let me do something quite complicated without touching any core code files!"
--
You turned down the free addon I linked to, for good enough reasons (it's tagged up to v1.0.9.9) - however...if shopowners don't try it in other versions, and report back their findings...addons never get updated...that might be something you can do at some point in the future (for any addon) after you have become more familiar with Phoenix. You appeared to also turn down raiwa's paid addon (principle? risk aversion? cost? didn't register it as an option?) which reads like it might do the job you need.
--
So my words above are a way that (I think) gives you what you want (fairly simple; upload. turn on. add image per category).
Your `problem` is that it does not exist in such a simple format. How do "we" (in effect you, as you need to make "Your Phoenix") solve that problem?
--
Phoenix is made up of lots of jigsaw pieces. You are currently missing three of those pieces which will help complete the picture and make Phoenix into "Your Phoenix", namely;
1. A hook for the admin area that allows you to attach a banner per category
2. A module for index_nested that shows the banner (index_nested is basically categories that have NO products)
3. A module for index_products that shows the banner (index_products, guess what, is basically a category that DOES have products)
If you had those three jigsaw pieces, you would then simply go into your admin area > drill down to a category > press edit > upload a banner image. Do the same for another category. Etc etc. On the shop side, each category would then show its attached banner.
Modularity is key. All of this would be done without touching ANY files.
Just upload, install, and think "WOW! Phoenix can let me do something quite complicated without touching any core code files!"
--
You turned down the free addon I linked to, for good enough reasons (it's tagged up to v1.0.9.9) - however...if shopowners don't try it in other versions, and report back their findings...addons never get updated...that might be something you can do at some point in the future (for any addon) after you have become more familiar with Phoenix. You appeared to also turn down raiwa's paid addon (principle? risk aversion? cost? didn't register it as an option?) which reads like it might do the job you need.
--
So my words above are a way that (I think) gives you what you want (fairly simple; upload. turn on. add image per category).
Your `problem` is that it does not exist in such a simple format. How do "we" (in effect you, as you need to make "Your Phoenix") solve that problem?
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
cerberus
- Member
- Posts: 78
- Joined: Sun Sep 06, 2026 10:54 pm
- Phoenix Version: v1.1.0.7
- Has thanked: 20 times
- Been thanked: 6 times
Re: Trying to add a banner to the top of the category page
Hi burt,
I presume I have the 3 pieces turned on as I have categories, and their are no other modules I can see that seem to be connected to the categories to be installed.
If I go to the categories and edit, I have a edit category description, yes I can add the code for a banner in there, but then the banner shows up in the small box for the category description on the category page, I want the banner above that box, not in it (see pic).
And I am putting this site together for my brother who knows even less than me about these things, that is why I want to have the category banner built in, so he does not have to bother about code, so he just need to be concerned about the basics.
And I understand what you are saying about if people don't install modules and check them out to see if they still work they will not get updated if needed, but as I know little about these things I think that would be better done by someone who knows a lot more than I do, this is the second installation of phoenix cart for me, the first time I did something that stopped the shop from working (it would not load any more) so I had to scrap it and start again, a beginner experimenting can cause issues that they cannot fix.
And I don't think raiwa's paid addon will do the job, it says nothing about the categories, it says its for :
Included Static modules:
Header module
Index module (I presume this is the start page)
Footer module
Box (I presume this is the same box that the banner will appear if I enter the code into the category description )
Independant banner page (I don't know what this is)
Besides that I don't have the money to buy any extras.
And as my question does not have a answer that exists in such a simple format (as you put it), I will leave it.
Thank you.
I presume I have the 3 pieces turned on as I have categories, and their are no other modules I can see that seem to be connected to the categories to be installed.
If I go to the categories and edit, I have a edit category description, yes I can add the code for a banner in there, but then the banner shows up in the small box for the category description on the category page, I want the banner above that box, not in it (see pic).
And I am putting this site together for my brother who knows even less than me about these things, that is why I want to have the category banner built in, so he does not have to bother about code, so he just need to be concerned about the basics.
And I understand what you are saying about if people don't install modules and check them out to see if they still work they will not get updated if needed, but as I know little about these things I think that would be better done by someone who knows a lot more than I do, this is the second installation of phoenix cart for me, the first time I did something that stopped the shop from working (it would not load any more) so I had to scrap it and start again, a beginner experimenting can cause issues that they cannot fix.
And I don't think raiwa's paid addon will do the job, it says nothing about the categories, it says its for :
Included Static modules:
Header module
Index module (I presume this is the start page)
Footer module
Box (I presume this is the same box that the banner will appear if I enter the code into the category description )
Independant banner page (I don't know what this is)
Besides that I don't have the money to buy any extras.
And as my question does not have a answer that exists in such a simple format (as you put it), I will leave it.
Thank you.
You do not have the required permissions to view the files attached to this post.
- burt
- Core Team
- Posts: 4719
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 278 times
- Been thanked: 464 times
Re: Trying to add a banner to the top of the category page
OK, that's a perfectly good place to leave it. Better to wait for the right jigsaw piece than force one that doesn't fit (or worse, one that takes the whole picture down with it).
Your idea of adding in the image to the description is workable to make do with for now.
--
Someone else in the future may want similar and they might share it in the addons area maybe.
So don't give up on getting that jigsaw completed.
Your idea of adding in the image to the description is workable to make do with for now.
--
Someone else in the future may want similar and they might share it in the addons area maybe.
So don't give up on getting that jigsaw completed.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
raiwa
- Certified Developer
- Posts: 1665
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 72 times
- Been thanked: 156 times
Re: Trying to add a banner to the top of the category page
I'll try to make a code co-op module.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
https://docs.google.com/spreadsheets/d/ ... sp=sharing
-
cerberus
- Member
- Posts: 78
- Joined: Sun Sep 06, 2026 10:54 pm
- Phoenix Version: v1.1.0.7
- Has thanked: 20 times
- Been thanked: 6 times
Re: Trying to add a banner to the top of the category page
Hi raiwa,
Thankyou, but that will be no use to me at the moment as I understand the co-op is 10 per month, it will be some time before I can afford to pay out 120 per year to keep using the module (if you make one). But it is possible the module will be of use for someone out there
In my case I will just give the idea up at the moment, I just cannot work out the structure of how it works, for instance (I know I should not do this, but as I am experimenting/learning I try things out to a point), I found in the template folder a tpl file connected with the categories, and when I put the banner code into it the banner showed up in the correct place, but only for the first "Fruit" category, it would not show for the "Vegetables" category and with my extremely limited understanding I did not understand why (and the banner did not show up on the "Fruit" subcategories, not too sure if I will have sub categories when the site finally goes live, so that may not be a issue, have not decided yet.).
But as I said, I will give up on the idea at the moment, its fine without the category banner, but would of looked better with the category banner (I think)
Thankyou, but that will be no use to me at the moment as I understand the co-op is 10 per month, it will be some time before I can afford to pay out 120 per year to keep using the module (if you make one). But it is possible the module will be of use for someone out there
In my case I will just give the idea up at the moment, I just cannot work out the structure of how it works, for instance (I know I should not do this, but as I am experimenting/learning I try things out to a point), I found in the template folder a tpl file connected with the categories, and when I put the banner code into it the banner showed up in the correct place, but only for the first "Fruit" category, it would not show for the "Vegetables" category and with my extremely limited understanding I did not understand why (and the banner did not show up on the "Fruit" subcategories, not too sure if I will have sub categories when the site finally goes live, so that may not be a issue, have not decided yet.).
But as I said, I will give up on the idea at the moment, its fine without the category banner, but would of looked better with the category banner (I think)
- burt
- Core Team
- Posts: 4719
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 278 times
- Been thanked: 464 times
Re: Trying to add a banner to the top of the category page
Explained in the "2" and "3" points in this post: viewtopic.php?p=24758#p24758cerberus wrote: ↑Mon Sep 28, 2026 8:50 am I found in the template folder a tpl file connected with the categories, and when I put the banner code into it the banner showed up in the correct place, but only for the first "Fruit" category, it would not show for the "Vegetables" category and with my extremely limited understanding I did not understand why
index_products VS index_nested - there are TWO tpl files you need to look at;
Fruit is index_nested, it has NESTED subcategories inside.
Vegetables is index_products, it has no categories inside, just products.
Out of the Box:
Fruit => top level, index_nested
-> Apples & Pears => subcat, index_products
-> Citrus Fruit=> subcat, index_products
Vegetables => top level, index_products
Say you added a new Top Level called Legumes;
Fruit => top level, index_nested
-> Apples & Pears => subcat, index_products
-> Citrus Fruit=> subcat, index_products
Vegetables => top level, index_products
Legumes => top level, index_products (ie, it is ready for you to add products, or it is ready for you to add subcategories)
Then say you added a subcategory of Legumes called Beans, look at how it changes;
Fruit => top level, index_nested
-> Apples & Pears => subcat, index_products
-> Citrus Fruit=> subcat, index_products
Vegetables => top level, index_products
Legumes => top level, index_nested
-> Beans => subcat, index_products
Notice the highlighted red bits.
If you or your brother ever re-arranges categories, they may flip flop between index_products and index_nested.
--
Also, try to override the TPL files into your chosen template (likely the "override" template) rather than amend them directly in the "default" template. Overview of that: https://phoenixcart.org/phoenixcartwiki ... a_Template - this is the correct Phoenix way, and doing things in the Phoenix way will help save you from disaster (as you already noted you broke a shop by experimenting).
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
cerberus
- Member
- Posts: 78
- Joined: Sun Sep 06, 2026 10:54 pm
- Phoenix Version: v1.1.0.7
- Has thanked: 20 times
- Been thanked: 6 times
Re: Trying to add a banner to the top of the category page
Thankyou burt,
I will look into this later, I need to give it a rest at the moment, spend some time away from it so to speak.
I will look into this later, I need to give it a rest at the moment, spend some time away from it so to speak.
-
cerberus
- Member
- Posts: 78
- Joined: Sun Sep 06, 2026 10:54 pm
- Phoenix Version: v1.1.0.7
- Has thanked: 20 times
- Been thanked: 6 times
Re: Trying to add a banner to the top of the category page
Hi burt,
Thank you for the info,
It looks like I was editing the tpl files in the default template (at least I think I was), the two below show where I was editing
/public_html/shop/includes/modules/content/index_nested/templates/tpl_cm_in_title.php
/public_html/shop/includes/modules/content/index_products/templates/tpl_cm_ip_title.php
However going by what you said and the how to use template page link you supplied I presume I need to recreate the paths to the two files in the override folder then copy the two files across ? so it looks like the two below, then I can edit the two files safely, is that correct ? (just double checking before I break something again
)
/public_html/shop/templates/override/includes/modules/content/index_nested/templates/tpl_cm_in_title.php
/public_html/shop/templates/override/includes/modules/content/index_products/templates/tpl_cm_ip_title.php
Thank you again
Thank you for the info,
It looks like I was editing the tpl files in the default template (at least I think I was), the two below show where I was editing
/public_html/shop/includes/modules/content/index_nested/templates/tpl_cm_in_title.php
/public_html/shop/includes/modules/content/index_products/templates/tpl_cm_ip_title.php
However going by what you said and the how to use template page link you supplied I presume I need to recreate the paths to the two files in the override folder then copy the two files across ? so it looks like the two below, then I can edit the two files safely, is that correct ? (just double checking before I break something again
/public_html/shop/templates/override/includes/modules/content/index_nested/templates/tpl_cm_in_title.php
/public_html/shop/templates/override/includes/modules/content/index_products/templates/tpl_cm_ip_title.php
Thank you again
