Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34
  1. #1
    Join Date
    Aug 2007
    Posts
    12
    Plugin Contributions
    2

    Default custom sidebox, i.e. perhaps for SSL or trust seal

    I recently had a client who wanted various items placed within the side columns of her site, but not within actual sideboxes. After initially playing around with tpl_main_page.php in the templates/MYTEMPLATE/common/ folder, I found a better way to do this.

    You can actually create side panel features that can be controlled just like any other sidebox (Tools --> Layout Boxes Controller), but aren't actually displayed within a sidebox template.

    This is particularly useful if you wish to display a SSL security seal or trust seal within a column on your website.

    To create a custom side panel feature, create a new PHP file with the code below. Be sure to change CUSTOM_NAME with your own chosen name.

    PHP Code:
    <?php
    // -----------------------------------
    // MY CUSTOM SIDE PANEL ITEM
    // -----------------------------------

      // test if box should be displayed
      
    $show_CUSTOM_NAME true;

      if (
    $show_CUSTOM_NAME  == true) {
          
    ?>
                
          <div align="center" style="padding:5px;">
             PLACE YOUR BOX CONTENTS HERE
          </div>
                
          <?php }
    ?>
    Save the file as CUSTOM_NAME.php (replacing CUSTOM_NAME with your own name, providing it is consistent with the one used in the page code). Upload the file into the includes/modules/sideboxes/ folder. Then log into admin, and select Tools -> Layout Boxes Controller to manage your new feature. You can select which column to display it within, along with its sort order, just like any other module.

    ---------------------------------------

    P.S. My apologies if this has been discussed a thousand times before.

  2. #2
    Join Date
    May 2005
    Location
    Phoenix Arizona (whew!)
    Posts
    188
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    That obviously works... but I know what I did was create my own sideboxes to do that by using the 'blank sidebox' mod.

    Cheers!
    [FONT=Comic Sans MS]Vicki[/FONT]
    www.moebiusenterprises.com
    Fragrance*jewelry*metaphysical supplies*art*LIFE ... 'bout sums it up....

  3. #3
    Join Date
    Aug 2007
    Posts
    12
    Plugin Contributions
    2

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    The main difference between this code and the blank sidebox mod is that this code does not use the sidebox template.

    This can be useful if you don't want your side column content to be displayed within a box.

    It is also useful if you want to create a sidebox that uses a different template than the rest of your sideboxes.

  4. #4
    Join Date
    Aug 2007
    Posts
    114
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Just wanted to add, thanks your a star. I have been looking for this mod for ages. Its good for me because if you want to display the google checkout acceptance logo you have to enter their code. With the normal blank sideboxes addon you got the style around it too. Where as this you just get the logo!.

    Thankyou very much!

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Quote Originally Posted by phil99 View Post
    Just wanted to add, thanks your a star. I have been looking for this mod for ages. Its good for me because if you want to display the google checkout acceptance logo you have to enter their code. With the normal blank sideboxes addon you got the style around it too. Where as this you just get the logo!.
    You could also use a regular sidebox and just use CSS to turn off the styling for just that sidebox.
    Nevertheless, use whatever works for you.
    .

    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.

  6. #6
    Join Date
    Oct 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Hi,
    I am trying to use rowanwa's code to put a PayPal logo in one of my side panels. Here is the code:

    <?php
    // -----------------------------------
    // PAYPAL ACCEPTED SIDE PANEL ITEM
    // -----------------------------------

    // test if box should be displayed
    $show_MYK_PAYPAL = true;

    if ($show_MYK_PAYPAL == true) {
    ?>

    <div align="center" style="padding:5px;">
    <!-- PayPal Logo --><table border="0" cellpadding="10" cellspacing="0" align="center"><tr><td align="center"></td></tr>
    <tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img src="https://www.paypal.com/en_GB/i/bnr/vertical_solution_PP.gif" border="0" alt="Solution Graphics"></a></td></tr></table><!-- PayPal Logo -->

    </div>

    <?php }
    ?>

    The bit I have highlighted red is straight from the PayPal web site. I am getting the following error message when I turn the sidebox on:
    Parse error: syntax error, unexpected T_STRING in /pathtomystore/store/includes/modules/sideboxes/MYK_PAYPAL.php on line 7
    Line 7 is the one that says: $show_MYK_PAYPAL = true;

    I am no expert in PHP, in fact I have never programmed in PHP... if anyone can say what the problem might be I would be very grateful.

    Thanks,
    RtX

  7. #7
    Join Date
    Aug 2007
    Posts
    12
    Plugin Contributions
    2

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Hi RtX,

    I tested your code and it worked for me on Zen Cart 1.3.6. Have you tried re-uploading the file and testing it again? From what I can see, there's no syntax error in the code you have provided.

    I will be updating my module contributions for version 1.3.8 over the next week or so. At the same time, I will check to make sure the custom sidebox code still works for 1.3.8.

  8. #8
    Join Date
    Oct 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Hi, rowanwa,
    I have uploaded various versions of the same text and get the same or similar error messages regardless. Someone has advised me that:

    PHP Code:
    if ($show_MYK_PAYPAL == true) { 
    should be


    PHP Code:
    if ($show_MYK_PAYPAL == "true") { 
    Frankly, I do not know if this is right, but I may give it a try.

    Maybe I'll also try re-typing the whole file rather than copying and pasting and editing. If I have any luck, I'll post again.

    Thanks,
    RtX

  9. #9
    Join Date
    Oct 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    I completely re-entered (by re-typing) the code and it worked. It looks the same but clearly is not. I think there must be a funny character or one that looks ok but is not what php expects somewhere in there. Thanks for responding.
    RtX

  10. #10
    Join Date
    Jan 2008
    Location
    Georgia
    Posts
    68
    Plugin Contributions
    0

    Default Re: custom sidebox, i.e. perhaps for SSL or trust seal

    Quote Originally Posted by rowanwa View Post
    I recently had a client who wanted various items placed within the side columns of her site, but not within actual sideboxes. After initially playing around with tpl_main_page.php in the templates/MYTEMPLATE/common/ folder, I found a better way to do this.

    You can actually create side panel features that can be controlled just like any other sidebox (Tools --> Layout Boxes Controller), but aren't actually displayed within a sidebox template.

    This is particularly useful if you wish to display a SSL security seal or trust seal within a column on your website.

    To create a custom side panel feature, create a new PHP file with the code below. Be sure to change CUSTOM_NAME with your own chosen name.

    PHP Code:
    <?php
    // -----------------------------------
    // MY CUSTOM SIDE PANEL ITEM
    // -----------------------------------

      // test if box should be displayed
      
    $show_CUSTOM_NAME true;

      if (
    $show_CUSTOM_NAME  == true) {
          
    ?>
                
          <div align="center" style="padding:5px;">
             PLACE YOUR BOX CONTENTS HERE
          </div>
                
          <?php }
    ?>
    Save the file as CUSTOM_NAME.php (replacing CUSTOM_NAME with your own name, providing it is consistent with the one used in the page code). Upload the file into the includes/modules/sideboxes/ folder. Then log into admin, and select Tools -> Layout Boxes Controller to manage your new feature. You can select which column to display it within, along with its sort order, just like any other module.

    ---------------------------------------

    P.S. My apologies if this has been discussed a thousand times before.
    I found your post in searching the forum. You indicate to save the file "providing it is consistent with the one used in the page code." Can you please tell me where (and on what page - index.php?) this new php page would be referenced?

    Thx,
    Lynne

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Replies: 1
    Last Post: 30 Jan 2014, 02:50 AM
  2. How to add Godaddy SSL seal to sidebox?
    By sewingzfun in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Apr 2011, 03:40 AM
  3. GoDaddy SSL Site Seal sidebox blank
    By capete in forum Basic Configuration
    Replies: 0
    Last Post: 2 Jun 2009, 05:55 PM
  4. Godaddy SSL Seal sidebox
    By Linux in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 19 Jun 2007, 12:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR