Forums / Templates, Stylesheets, Page Layout / how: a unique footer for every product and category

how: a unique footer for every product and category

Locked

Views: 3,395

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
30 Sep 2006, 10:48 PM
#1
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

how: a unique footer for every product and category

Hi all,

I've had a good hunt round to try and find information on adding a unique footer to each and every product and category page.

I need to do this to add some new php tracking codes that are totally page specific.
I can't even add the code to the product description area, it really does need to be placed as low as possible in every page I want to track. :(

And that led me to thinking I need a unique override footer for each page .... unless you know a little secret that might make it simpler :)

Any help you can give would be great.

Thanks

Kev

1 Oct 2006, 12:42 AM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: how: a unique footer for every product and category

You could add the information at the very bottom of:

includes -> templates -> YOUR_TEMPLATE -> templates -> tpl_product_info_display.php

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

1 Oct 2006, 12:51 AM
#3
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

but that would put the 'same' peice of code on all product pages.

I need to be able to add 'different' code on every 'individual' page.

Thanks

Kev

1 Oct 2006, 1:15 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: how: a unique footer for every product and category

Two factors:

  1. You can override the tpl_footer.php on each page by placing unique versions of it in override folders like this:
    /includes/templates/YOURTEMPLATE/PAGENAME/tpl_footer.php
    where PAGENAME could be product_info or contact_us or checkout_shipping etc.

You might need to combine that with the 2nd option somehow:

  1. You would need to build a dynamic loop to display your special tracking codes based on whatever data you are presently showing on the screen.
    Use a PHP loop that detects which product/category is currently active, and thereby display varying tracking settings based on that info.

You didn't give much to go on, so I can't give you any examples. But, that's the concept.

.
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.

1 Oct 2006, 1:20 AM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: how: a unique footer for every product and category

Let me work on it a bit and see if I can come up with something.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

1 Oct 2006, 2:04 AM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: how: a unique footer for every product and category

How many products are we talking about?

I haven't worked everything out yet but here are some thoughts.

You might be able to add an extra defines file in:

includes -> languages -> english -> extra_definitions -> tracking_info_defines.php

<?php
define ('TRACKING_CODE', 'Your information goes here');
?>

Now you could use an if statement at the bottom of tpl_product_info_display.php

<?php if ($product_id=? || $product_id=?) echo TRACKING_CODE; ?>

I'll play around with this and see how it works.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

1 Oct 2006, 2:35 AM
#7
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

I think we have a solution :)

The software I'm playing with tracks where a visitor gets too, on a page, before taking an action.

What this means is that if you have driven a visitor to your site and they find your product and the sales page doesn't 'close' the sale you can see how much that visitor read before they left or bought.

It's basically meant to be a server side 'eye tracking' solution (for want of a better way of explaining it)

Having just tested it on some static pages I won't need to keep the code on the pages for long. It's just too powerful. Anything more that 20 - 30 page impressions and it slows down lots when it comes to generating the results. And to be fair, the results are not much different from getting 10 or so visitor scans.

Initially Dr Bytes first option will give me the chance to test it out on the home page and other fixed pages. Thats a great place to start. Thanks.

The concept of a dynamic loop sound techie to me, Creating isn't my bag.

Here's a link to the product I'm trying to integrate. Having a look may give a better insight at the concept at this stage rather than any example.

If what this software can do, can be done with zen cart products, it would probably be a tool worth adding to the 'marketing' section and getting some recommendation commissions into the core zen cart teams coffers.

I know the concept isn't perfect but having the chance to measure the effectiveness of copy changes and having a 'better clue' where your visitors take any action is valuable info.

I just want to reinforce that it's not open source, it's commercial and it is new.
https://www.mutualadvantage.co.uk/covertmarketingtools-zencart

Dr Byte: If you have any info in the wiki (or anywhere) about building dynamic loops, please point me in the right direction.

Thanks again
Kev

1 Oct 2006, 2:38 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: how: a unique footer for every product and category

can you share a couple examples of what code would need to show up on which pages? Perhaps 2 or 3 examples?

.
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.

1 Oct 2006, 2:41 AM
#9
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

Clyde you are a genius. I'll give that a try right now.

Thanks.

Kev

1 Oct 2006, 2:42 AM
#10
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

Dr Byte,

Gimme Five mins or so. I gotta get a coffee. It's too damn early over here.

Kev

1 Oct 2006, 3:09 AM
#11
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

Ok Coffee on desk :)

This is an example of the code I need to add

<?php $pageNum=4; // the Num would change with every page tracked. $trackweb='http://www.domainname/folder'; include('/server/path/to/folder/file_name.php'); ?>

Thanks

Kev

1 Oct 2006, 3:15 AM
#12
profitshock avatar

profitshock

Zen Follower

Join Date:
Jul 2004
Location:
UK
Posts:
169
Plugin Contributions:
0

Re: how: a unique footer for every product and category

Clyde,

When I got round to implementing the idea it fell over. Still only one tracking code available. Having said that the IF statement looked like the begining of a product loop to me.

Thanks

Kev

1 Oct 2006, 3:47 AM
#13
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: how: a unique footer for every product and category

Try this code at the bottom of tpl_product_info_display.php

<p>
<?php
$product = $_GET['products_id'];
if ((int)$cPath>0 && $product==?? or $product==??){
echo TRACKING_CODE;
}else{
echo TRACKING_CODE_BLANK;
}
?>
</p>

don't forget to define the TRACKING_CODE and TRACKING_CODE_BLANK as indicated in my previous post.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.