Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Seo addon: Dynamic footer at the product page
irene
post Jan 13 2010, 05:11 PM
Post #1


Advanced Member
***

Group: Super Moderator
Posts: 185
Joined: 23-September 08
Member No.: 1,488



how to make dynamic footer at the product page:

it’s easy smile.gif

create a file with a footer template (you can create several templates with specific keywords and phrases for a particular language/country. you can see keywords for the UK in the example):
lang/en/product_footer.php

Write there whatever you want, e.g.


There is a php-code used in the template: the name of the product (Viagra), the title of the product (Generic Viagra), and the name of the active ingredient (Sildenafil); also you can see the output of the product page and the home page urls. If anything is done incorrectly in the php-code, there will be a blank page shown.

Then connect this footer to the product output function, for example connect footer-template after the product description (as at the first image):
Find draw_product_page() function in the .htclasses/Page.class.php file so you can see the following lines:
Êîä
                $this->draw_filetext_editable('descr/'.$name, array('item' => 'main'));
                $this->draw_filetext_editable('product_footer', array('id' => 'product_footer'));
                echo '«/td>«/tr>«/table>';


Then you can either replace the product description with the template, or (as in the given example) show the template after the product description. For the second option you need to put the connection of your footer «include 'lang/'.$this->_cart->_lang->id().'/product_footer.php';» after the line «$this->draw_filetext_editable('product_footer', array('id' => 'product_footer'));». In this case there will be an individual footer used and you can even distinguish UK, US, and EU if you create several templates (you’ll find the template for the UK in lang/en, for the US in lang/us, for the EU in lang/eu).

your draw_product_page() function inside the .htclasses/Page.class.php should look similar to:


p.s. There can be some differences in the text of the product page functions. Also it can be in the PresetPage.class.php file in some templates. Write a message here if you don’t find it.
Go to the top of the page
 
+Quote Post
irene
post Jan 13 2010, 05:21 PM
Post #2


Advanced Member
***

Group: Super Moderator
Posts: 185
Joined: 23-September 08
Member No.: 1,488



For example you can find draw_product_page() function in the indiangenerics template in .htclasses/PresetPage.class.php. It looks a bit different then in the above examples:
Here there is a dynamic block right before the “product info” button (it shows the product description if to click on it). You can see the example with Tamiflu:
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 7th September 2010 - 01:44 PM