If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / insert an image at the bottom of the catorgories page

insert an image at the bottom of the catorgories page

Started by premint on 25 Dec 2014, 12:24 PM · Views: 1,838

Results 1 to 20 of 20
25 Dec 2014, 12:24 PM
#1
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

insert an image at the bottom of the catorgories page

hello first time i posted, lots of useful info on here but cant find this one

i would like to replace the new products box at the bottom of the categories page as below

Attachment 14810

with a fixed image file like below

Attachment 14811

can anyone offer fairly simple instructions

thanks in advance

25 Dec 2014, 5:56 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: insert an image at the bottom of the catorgories page

If not mistaken, there are a few things going on here that are somewhat related, but not necessarily completely.

The request appears to be:

  1. To turn off the new products display wiithin the main page area.
  2. Add content to the main_page area.

Now, some important things to consider/answer because of the flexibility, reusability, and portability of ZC code, is to identify on what page(s) you want all that to happen... Do you never want to display say the new products center are information box, or only not on the main page, or maybe should only display on the main page, etc....

As for turning off the new products window, that is I thought an admin configuration option. My memory is failing me at the moment, but thinking one of the layout menu options. Might be under new listing, not sure.

The image addition, well if only on the front page, then there is define page to which the html could be added to display on just the first page, otherwise, includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php I think is the filename that handles the central section of the website. It may be in the templates subfolder instead of common, but if in neither it should be copied from the applicable folder of default_templates.

Sorry, the assistance at the moment is more general than specific, besides not trying to get lost in the weeds, I'm not in front of other resources to firmly provide an answer.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

25 Dec 2014, 6:35 PM
#3
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

i know how to remove the new products box, i already did that in preparation, its inserting the image in its place that im having trouble with

25 Dec 2014, 8:14 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: insert an image at the bottom of the catorgories page

premint:

i know how to remove the new products box, i already did that in preparation, its inserting the image in its place that im having trouble with

Good to know that the new product listing removal was figured out; however, the help for inserting the new "picture" still requires answering the questions above regarding what it is exactly that is desired for the final outcome.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

25 Dec 2014, 8:20 PM
#5
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

i posted 2 pictures to show exactly what i wanted to achieve are they visible ?

26 Dec 2014, 4:35 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: insert an image at the bottom of the catorgories page

As long as you already have your own HTML for displaying that content, you can add it to the bottom of any of these 3 template files depending on which pages you want it to appear.
/includes/templates/YOUR_TEMPLATE_FOLDER/templates/ ...

  • tpl_index_default.php -- for the home page
  • tpl_index_categories.php -- for a category page where subcategories are also displayed
  • tpl_index_product_list.php -- for a product listing page (ie: the products in a specified category)

If you don't already have the corresponding file in your YOUR_TEMPLATE_FOLDER/templates directory, you can copy the one from template_default/templates into your YOUR_TEMPLATE_FOLDERNAME_HERE/templates directory and then make your changes there.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2014, 6:47 PM
#7
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

hello thanks for replying, i tried the tpl_index_default.php -- for the home page but nothing happened, i modified the file in default-template and the one in classic but still nothing

29 Dec 2014, 6:51 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: insert an image at the bottom of the catorgories page

  • What exactly did you add to the template? Did you put it AFTER everything else in the file?
  • What's the URL where we can see the page? (We'll look at the raw HTML using View Source in the browser, to see what HTML errors you've got)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Dec 2014, 6:58 PM
#9
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

the web address is https://www.new-brushes.co.uk

heres the last bit of my tpl_index_default.php file

<?php $show_display_category->MoveNext(); } // !EOF ?> </div> <p> <a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> </p>
31 Dec 2014, 5:34 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: insert an image at the bottom of the catorgories page

So, this image you're wanting to display is just a W3C HTML validation symbol?

DrByte:

- tpl_index_categories.php -- for a category page where subcategories are also displayed
Since you've configured your site to not show the home page, but to instead use a category page as the home page, you'll need to make the change to tpl_index_categories.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Dec 2014, 10:12 AM
#11
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

thanks i didnt realise id set it to not show the home page, but your suggestion of using tpl_index_categories.php has done the trick thats put the logo at the bottom of the home page and the sub categories pages, changing tpl_index_product_list.php has not put it at the bottom of the product pages though can you suggest why not ?

also as you had a look round the site what do you think to my social media buttons mod are they good enough for me to post them to the mods section

31 Dec 2014, 2:56 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: insert an image at the bottom of the catorgories page

premint:

changing tpl_index_product_list.php has not put it at the bottom of the product pages though can you suggest why not ?tpl_index_product_list.php is only used on a page where products are listed, not on a specific product.
But, if you had said that your purpose was only to put just a simple W3C validation icon on every page of the site in the first place we would have advised to put it in tpl_footer.php or tpl_main_page.php (in the "common" folder), because those affect what appears on all pages, and requires only one file be touched instead of your approach to touching multiple files.

premint:

also as you had a look round the site what do you think to my social media buttons mod are they good enough for me to post them to the mods section
Um, I don't see them. Do you mean the somewhat blurry "Verified by Visa" logo at the bottom of the page?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Dec 2014, 3:02 PM
#13
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

if you go onto one of the products near the bottom you will see the social media buttons

31 Dec 2014, 3:13 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: insert an image at the bottom of the catorgories page

premint:

if you go onto one of the products near the bottom you will see the social media buttons
Oh.
I see a text link with the word "tweet" on it, but no image. And to the right of that I see an image which says something about tell-a-friend and an envelope symbol on it, but it's not clickable.

So, no, that part doesn't appear to be production-ready.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Dec 2014, 3:41 PM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: insert an image at the bottom of the catorgories page

premint:

hello thanks for replying, i tried the tpl_index_default.php -- for the home page but nothing happened, i modified the file in default-template and the one in classic but still nothing

DrByte:

So, this image you're wanting to display is just a W3C HTML validation symbol?

Since you've configured your site to not show the home page, but to instead use a category page as the home page, you'll need to make the change to tpl_index_categories.php

It would be suggested (though hasn't been said here) that the changes made to the default_template files be restored to factory at least as related to the changes made here for this image issue.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Dec 2014, 4:50 PM
#16
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

yes thats a good idea i can restore that to factory easily, not sure why my social media buttons dont work for you they do for me, ill look into that some more, would you be willing to have a look at my mod for me and see if you can get it ready to post, its only one short page of php

31 Dec 2014, 4:57 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: insert an image at the bottom of the catorgories page

I found the load time to be rather slow, eventually all of the "popups" over the main images appeared, some were clickable, others were not, I also found the email a friend button to not be clickable and wonder what additional security protections are to be inherently included with that one.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Dec 2014, 5:09 PM
#18
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

the facebook, twitter, linkin and google buttons should be all functional, the email a friend button does nothing right now. i was going to look for a script that has all the right security already implemented and just add that into mine

1 Jan 2015, 5:36 AM
#19
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

trying not to nit pick here but if you are going to put logos for the validators, you should probably make sure they work correctly.
The left one takes you to the validator and reports 4 errors on the page, which all involve the code for displaying the validator images....how ironic.
The right one (for css validation) just fails completely, landing you on a forbidden page with the following text

Some Headers, mandatory for this resource, are missing.

    Referer

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

1 Jan 2015, 10:51 AM
#20
premint avatar

premint

New Zenner

Join Date:
Nov 2014
Posts:
16
Plugin Contributions:
0

Re: insert an image at the bottom of the catorgories page

hi thanks i am aware of the errors, and yes i also found it ironic that the 4 errors it finds were for displaying their own logo, i just cut and pasted that from their site so its not even my error, i have no idea why the other fails, but i didnt have any more time to work on it yesterday, i will figure out whats up wit it

thanks