Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    87
    Plugin Contributions
    0

    Default Custom Center Box

    Hi, I am trying to add a center box to my 1.3.9 site, just like the 'whats new' and 'featured products' center boxes, only it will run an amazon script.

    What I have done so far:

    I cloned the tpl_modules_whats_new.php and replaced this code with the script:
    Code:
    <?php
      require($template->get_template_dir('tpl_columnar_one_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_one_display.php');
    ?>
    Then I added
    Code:
     define('BOX_HEADING_AMAZON', 'Amazon');
    just under the define for whats new in my english.php.

    Then I added a .centerboxamazon to the css box classes on my css

    Now i am stuck.. where do I go from there?

    The script will show similar products that amazon offers to what I have, with my affiliate id of course. ...

    I searched the wiki, I searched the forums, and I searched the add ons, and could not find out what I need to do to create a custom center box.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Custom Center Box

    You will need to replicate/clone ALL files that affect/interact tpl_modules_whats_new.php

    And rename them appropriately to something like
    tpl_modules_amazon.php

  3. #3
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Custom Center Box

    Which pages do you want this box to be displayed on.

    I usually hack the code with pure html code instead of taking the time to duplicate every file and rename every function.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Custom Center Box

    Quote Originally Posted by gjh42
    You might try putting your code in Editable Home Page Centerboxes.
    Very nice module gjh42!!

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Center Box

    It's mostly DivaVocals' work; I supplied some code that made the various boxes work more efficiently.

  7. #7
    Join Date
    Feb 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Custom Center Box

    Thanks guys, I think that mod makes three side by side boxes.. I just want one box... to look like the New Items box..

    I want it to be on the front page, and on the category listing page, and the product listing page, just like the New prducts for xxxx month box is..
    Last edited by Figster; 6 Apr 2011 at 01:09 PM.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Center Box

    Modifying the mod to have just one centerbox would be a lot easier than creating the same functionality from scratch. Post in its support thread for information on that task.
    Likewise, it should not be a big deal to add the mod to the other pages you mention.

  9. #9
    Join Date
    Feb 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Custom Center Box

    Thanks, I got it done, all I had to do was paste the code on the templates/tpl_module_whats_new.php and it shows just fine on all the pages I wanted it to.

    Quote Originally Posted by CoolCarPartsOnline View Post
    Which pages do you want this box to be displayed on.

    I usually hack the code with pure html code instead of taking the time to duplicate every file and rename every function.
    Yup.. that was the easiest way.. ty :)
    Last edited by Figster; 6 Apr 2011 at 05:24 PM. Reason: needed to place quote

 

 

Similar Threads

  1. How can i create custom center box, for home page only?!?
    By tcarden in forum Customization from the Admin
    Replies: 2
    Last Post: 7 Dec 2012, 07:05 PM
  2. Help Center Live - center the online/offline box
    By terryparley in forum General Questions
    Replies: 5
    Last Post: 9 Oct 2009, 03:01 AM
  3. Custom Center Box Help
    By buildingblocks in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 9 Sep 2009, 08:16 PM
  4. Custom Monthly Center Box
    By Berserker in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 May 2009, 04:58 AM
  5. custom center box
    By alimtlai in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Feb 2009, 03:05 PM

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