Zen Cart Logo
Forums / Addon Sideboxes / blank sidebox -- add photo

blank sidebox -- add photo

Locked

Views: 6,944

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
30 Dec 2007, 12:10 PM
#21
sabastina avatar

sabastina

New Zenner

Join Date:
Nov 2005
Posts:
72
Plugin Contributions:
0

blank sidebox -- add photo

:clap: Wow, thanks, it worked to get my image working as I needed it to work! And, gave me a better understanding of using images this way.

I'm still having the problem with the additional image appearing above the paypal verification logo in the box. This really confuses me because I didn't add any coding that would put that there!

That extra image appeared immediately after I changed the string I explained above.

Any help or direction with this issue would be greatly appreciated.

Sabastina

30 Dec 2007, 3:30 PM
#22
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: blank sidebox -- add photo

You say you added this code below the code that shows the image and link for paypal verification?

What is the whole code in that area now? I can only see the HTML output your code generates:```html

<!--// bof: paypallogo //--> <div class="leftBoxContainer" id="paypallogo" style="width: 150px"> <h3 class="leftBoxHeading" id="paypallogoHeading">Our Validations</h3> <div id="paypallogoContent" class="sideBoxContent"> <div class="wrapper"> <img src="includes/templates/classic/images/eBayCertDesigner.gif"><center> <!-- Begin Official PayPal Seal --> <a target="_blank" href="https://www.paypal.com/verified/[email protected]"><img src="includes/templates/classic/images/verification_seal.gif" alt="Click to Verify" title=" Click to Verify " width="100" height="100" /></a> <!-- End Official PayPal Seal --> <!-- Begin eBay Certified Designer Seal --> <a target="_blank" href="http://pages.ebay.com/storefronts/designdirectory.html"><div id="paypallogoContent" class="sideBoxContent"> <div class="wrapper"> <img src="includes/templates/classic/images/eBayCertDesigner.gif"></div> </div></div> <!--// eof: paypallogo //--> ```which has some weird stuff going on.

The eBay designer logo is coded to output twice (obviously); you have the correct

<div id="paypallogoContent" class="sideBoxContent"> just below the heading, but then after the paypal logo you have <div id="paypallogoContent" class="sideBoxContent"> again, with your designer logo repeated. We'll need to see the original code to sort this out.
30 Dec 2007, 4:12 PM
#23
sabastina avatar

sabastina

New Zenner

Join Date:
Nov 2005
Posts:
72
Plugin Contributions:
0

Re: blank sidebox -- add photo

Again, I thank you for your help :smile:

Here is the entire tpl_paypal_logo.php file which [other than the change to the language file] was the only file I altered for this mod:

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2007 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: tpl_paypal_logo.php,          v 1.0.6 2007/04/25 DrByte $
//
  define('MODULE_PAYPAL_SEAL_LOGO_IMAGE_FILENAME', 'verification_seal.gif');
  define('MODULE_PAYPAL_SEAL_VERIFIED_URL', 'https://www.paypal.com/verified/pal=');

  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
  $content .= '<div class="wrapper">' . "\n";

  $content .=
'<center>
<!-- Begin Official PayPal Seal -->
<a target="_blank" href="'.MODULE_PAYPAL_SEAL_VERIFIED_URL . $paypalID . '">' .
zen_image(DIR_WS_TEMPLATE_IMAGES . MODULE_PAYPAL_SEAL_LOGO_IMAGE_FILENAME, MODULE_PAYPAL_SEAL_ALT_TEXT, 100, 100) .
'</a>
<!-- End Official PayPal Seal -->
<!-- Begin eBay Certified Designer Seal -->
<a target="_blank" href="http://pages.ebay.com/storefronts/designdirectory.html">' .
$content .= '<img src="' . DIR_WS_TEMPLATE . 'images/eBayCertDesigner.gif">';
'</a>
<!-- End eBay Certified Designer Seal -->
</center>';
  $content .= '</div>' . "\n";
  $content .= '</div>';

?>

I'm sure it's possible that I inadvertantly did something while in the editor (I have cut or pasted accidentally before, when working on other coding - so it's possible I did that here...I really appreciate your help in sorting this out!

Sabastina

30 Dec 2007, 4:50 PM
#24
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: blank sidebox -- add photo

You're explicitly adding your designer seal image to $content while still inside a $content .= statement.
The ; at the end of your addition may terminate the original statement early.

So eliminate the $content .= and the ; around your added image. Most of your added code should run on from the pp seal html; where you use the php constant, use the dot joins as you had them.

$content .=
'<center>
<!-- Begin Official PayPal Seal -->
<a target="_blank" href="'.MODULE_PAYPAL_SEAL_VERIFIED_URL . $paypalID . '">' .
zen_image(DIR_WS_TEMPLATE_IMAGES . MODULE_PAYPAL_SEAL_LOGO_IMAGE_FILENAME, MODULE_PAYPAL_SEAL_ALT_TEXT, 100, 100) .
'</a>
<!-- End Official PayPal Seal -->
<!-- Begin eBay Certified Designer Seal -->
<a target="_blank" href="http://pages.ebay.com/storefronts/designdirectory.html"><img src="' . DIR_WS_TEMPLATE . 'images/eBayCertDesigner.gif"></a>
<!-- End eBay Certified Designer Seal -->
</center>';
30 Dec 2007, 5:22 PM
#25
sabastina avatar

sabastina

New Zenner

Join Date:
Nov 2005
Posts:
72
Plugin Contributions:
0

Re: blank sidebox -- add photo

Thank you SOOO much!:clap:

It worked perfectly.

I think see what you meant... by using the additional $content.= statement, I was basically commanding the code through twice and also causing the statement to end to soon by ending it with the additional ; When in reality, all I needed to do was to simply add my link and image code using the DIR_WS_TEMPLATE .

This makes sense because I was confused about the $content.= statement to begin with.

I'll go ahead and do some research on this statement (as well as php file pathing) so that I can use them properly from now on!

Thanks so very much for your time, it means alot.

Sabastina

30 Dec 2007, 5:39 PM
#26
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: blank sidebox -- add photo

Since many Zen Cart php files only prepare content to be handled by another file later in the process, it is common to accumulate html output in a $content .= statement which can be passed on easily.

The .= means "add the following to the end of this variable".

30 Dec 2007, 11:47 PM
#27
sabastina avatar

sabastina

New Zenner

Join Date:
Nov 2005
Posts:
72
Plugin Contributions:
0

Re: blank sidebox -- add photo

I'm definately bookmarking this thread for a while. Thank you, that information helps me immensely.

Kimberly