moving header text on zencart item pages (works fine on the category pages)

Posted on 2012-09-21
Last Modified: 2012-09-26
hi all. i'm attempting to fix some minor issues in my zencart store. i'm running v150. it was previously handled by a developer so i'm working within the constraints of someone elses code...

basically, all i'm trying to do is move a block of text to a different part of the page. sounds simple enough right? unfortunately there's some issues going on with the code. here's the way i'd like the text to appear on all the individual product pages, which currently appears perfectly on the main category/PARENT pages as seen in the screenshot below:

screenshot of parent pages with correct text:

actual link of a parent page with correct text: (spaces added to URL to prevent search engines from indexing this thread):
http://c u l

and here's the way it's looking on the individual item pages, for whatever reason:

screenshot of an item page with incorrect text:

actual link of an individual item page with incorrect text: (spaces added to URL to prevent search engines from indexing this thread):
http://c u l

in zencart, i've discovered that the tpl_main_page.php file of my template controls the product pages and that the tpl_index_product_list.php file of my template controls the category/parent pages. so of course, i'm trying to take the portion of the text/code from the category pages (tpl_index_product_list.php file) that seems to be controlling this text/header area since it's the one that displays correct, this part here:

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>

Open in new window

as opposed to this part of the product/item pages (tpl_main_page.php file) which seems to control the text/header area that's out of whack:

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, ''); echo zen_get_category_description(zen_get_products_category_id((int)$_GET['products_id']), (int)$_SESSION['languages_id']) ?></div>

Open in new window

unfortunately it's not as simple as swapping the good code above in place of the bad one as that didn't work.. i've also attempted to to put the good code into different spots of the other file.. no luck yet.

any php experts have any ideas before i compress the text onto the images and call it good? that's my easy "solution" at this point, although not ideal since it's not SEO friendly or easy to edit in the future...

thanks in advance.
Question by:lgg733
    LVL 107

    Accepted Solution

    D'Oh (slaps forehead).  I just posted a Request Attention for this question referring to Zend instead of ZenCart, but maybe the moderators will figure that out and realize that I had a brain fart.
    ... compress the text onto the images
    If you choose to go that way it does not have to be any kind of an SEO disaster.  Just put the text into the ALT and TITLE attributes of the images / links.  And if you can get the text into the <title> tag on the page, that will help a lot with SEO.
    LVL 4

    Author Closing Comment


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
    In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now