Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43
  1. #1
    Join Date
    Jan 2008
    Location
    Portland, Oregon USA
    Posts
    356
    Plugin Contributions
    0

    Default Mod gone bad? - fonts somehow screwed up

    Tried to add some new define pages to the information sidebox and when I did, things really got screwed up.

    The only file I thought was changed was the information.php put into mods/sideboxes/your_template.

    Restored the \includes directory from a backup several weeks ago to no avail. I must have unintentionally changed something else but for the life of me I don't know what. I'm wondering if I might have accidentally saved something to wrong directory or to a core file.

    All the page fonts are huge - product titles seem to be a courier font. There is now text at the top of the main page that says "Your Page Text Goes Here". When you log into Your Account The Account page yields a blank page with the same message "Your Page Text Goes Here"

    www.broadwayfloral.com

    Would REALLY appreciate some help. Thanks!

    Doug

    Zen Cart V1.3.8a Patched
    SEO Mod, Date Reminder Mod, Invoice Mod, Add Customer From Admin, About Us Page
    Last edited by pdxdoug; 22 Mar 2009 at 11:54 PM.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Mod gone bad - fonts somehow screwed up

    What has happened is that you have added the contents of one of your new pages the the information sidebox instead of a link to it.

    Since the sidebox is built before anything is displayed and you are now outputing page content when it is built, your page content comes out first. The words "Your page text goes here" top left are the visible part of that, though there is more that can be seen in the source code.

    This in turn means that the doctype statment isn't the first thing received byt he browser, and as a result it's not sure how to interpret other information it receives, including ... font sizes.

    So you need to re-visit what you're doing in your includes/modules/sideboxes/iC_AcadameV1.2/information.php file.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jan 2008
    Location
    Portland, Oregon USA
    Posts
    356
    Plugin Contributions
    0

    Default Re: Mod gone bad - fonts somehow screwed up

    Thanks Kuroi,

    As you saw, my front page was modified (hacked) by a web design firm to move the feature products to the top and the main page text below.

    I had seen a post by Kobra that explained how move elements around properly so I had created a new define page - main_top that I was going to insert into the tpl_index and the tpl_main_page to sit between the header/nav bar and the featured section, then I was going to re-insert the define_main_page back into the proper place. The intent was to give me two editable sections (define pages) with the featured items in the middle.

    It appears that ZenCart found the main_top page I'd created and stuck it in at the very beginning without me adding any code - that was the "Page text goes here" message. The change to the information sidebox was coincidental. Deleting the main_top new page fixed it.

    So why? And if I use another name instead of main_top can I accomplish what I'm trying to do?

    Thanks,
    Doug

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Mod gone bad - fonts somehow screwed up

    This isn't a naming issue. Whatever was done would likely be a problem however, it was named. Unfortunately, there are a huge number of possible approaches with this sort of customization (and that's just the ones that work!) and despite reading your posts several times I was unable to form a clear picture of what had been done, or the scope of what you were trying to do (i.e. to which pages it should apply).
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Jan 2008
    Location
    Portland, Oregon USA
    Posts
    356
    Plugin Contributions
    0

    Default Re: Mod gone bad - fonts somehow screwed up

    Kuroi,
    Sorry to be vague in my explanation.

    I had used the define_pages generator mod to create some new pages - most to be added to the information sidebox like the about_us mod, and one that I had hoped to make editable via the tools:define pages editor that I was going to insert into the main page to provide another section of text in addition to the built-in define_main_page.

    I uploaded all these pages into their respective directories. They all appeared in the tools:define_pages editor so I added some content to one of them - About the Design Studio - and then went about modifying the information.php file to add that one page.

    The only page that was added to the information.php file was About the Design Studio.

    The information.php file was uploaded into the correct override directory and when I looked at the site things were displaying wrong.

    When I viewed the site and saw what had happened, I restored the information.php back to the original but that didn't fix the problem. Then after posting I deleted all the pages I'd added named main_top from all the directories and that's when the site reverted back to normal.

    I made no changes to any other files at all. It seems for whatever reason that one of the pages I'd created, named main_top was being grabbed by ZenCart and was being added first thing to the main page and other pages even though I'd not made any reference to the main_top page at all.

    Back to my intended change to the main page:

    Since I sell flowers, I thought it best the have the featured products display before the main page text, so a web design company hacked the tpl_main_page so that a single line of hard-coded static text would be at the top, then whatever products were enabled on the main page (featured, new, special) followed by some text.

    Instead of moving the main_page text to be after the products, they inserted page 4, so to edit text on my main page I edit the define_page_4 file.

    I had seen an earlier post about moving the display order -
    http://www.zen-cart.com/forum/showthread.php?t=118972 -

    So what I intended to do was to split my main page text into two parts. I figured that my new main_top page (the one that screwed up) would replace the static, hard coded text that now is between my header/nav bar area and that I re-enable the main_page text and place it below the products.

    That was my plan and would welcome your thoughts/opinions/recommendations.

    Thanks,
    Doug

  6. #6
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Mod gone bad - fonts somehow screwed up

    Doug,
    Achieving what you want is really quite simple - it's obvious that the company you hired doesn't have a good understanding of Zen Cart's architecture.

    Five simple steps for what you want to do:
    1. For the content you want at the top of your main page, just use the existing define main page system, with no changes - just edit the define_main_page in admin as normal.
    2. For the content that you want to show at the bottom of your main page, create a new file includes/languages/english/html_includes/define_main_page_lower.php - you'll be able to edit the content of that from the Define Pages Editor in Admin.
    3. Create a new file includes/extra_datafiles/main_page_definitions.php with this content:
    Code:
    <?php 
    define('FILENAME_DEFINE_MAIN_PAGE_LOWER', 'define_main_page_lower');
    ?>
    4. Edit includes/modules/pages/index/header_php.php and add this line of code:
    Code:
    $define_main_page_lower = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE_LOWER, 'false');
    immediately below this line:
    Code:
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE, 'false');
    5. Make an override copy of includes/templates/template_default/templates/tpl_index_default.php and add this line of code immediately before the closing /div tag at the end of the file:
    Code:
    <div id="indexDefaultLowerContent" class="content"><?php require($define_main_page_lower); ?></div>
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  7. #7
    Join Date
    Jan 2008
    Location
    Portland, Oregon USA
    Posts
    356
    Plugin Contributions
    0

    Default Re: Mod gone bad - fonts somehow screwed up

    Thank you for your reply. It looks to be the answer to my dilemma.

    The web hosting people HAVE done a good job in modifying the checkout process to include additional information needed for my business - delivery date/delivery time/occasion/gift card message in addition to the standard order comments - everything appears in the admin order area and on all Emails along with our delivery and substitution policies. They also took the Date Reminder mod and customized it to include a occasion and a customized Email sent to both the customer and us so we know of the event also.

    The main_page hack was a quick response to a need and now it's time to clean it up and make it more functional. Breaking it up with two areas of main page text insures that potential customers see our products and Google sees our 'content' and steers customers our way.

    I'll override the hack tonight.

    Thanks again,
    Doug

  8. #8
    Join Date
    Mar 2009
    Posts
    58
    Plugin Contributions
    0

    Default Re: Mod gone bad - fonts somehow screwed up

    Beautiful site by the way

  9. #9
    Join Date
    Oct 2008
    Posts
    111
    Plugin Contributions
    0

    Default Re: Mod gone bad - fonts somehow screwed up

    Hi

    Followed Bunyip's instructions for adding new text section to bottom of homepage and something is going wrong and I'm getting in a bit of a mess. See below:

    http://trulyethical.com

    What have I done wrong?

    Can anyone help?

    Thanks

    Matt

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Mod gone bad - fonts somehow screwed up

    Quote Originally Posted by Matt Smith View Post
    Followed Bunyip's instructions for adding new text section to bottom of homepage and something is going wrong and I'm getting in a bit of a mess.
    Unfortunately the answer to this lies on your site in the files that you've changes and that we can't see. But my best guess would be that you have added the code that is showing at the top of your site after the closing php tage "?>" on the file where you added it. It should be before it (or better still, just remove the closing tag completely - you don't need it and it can get in the way).
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. So screwed up the Admin page somehow...
    By Serious in forum Basic Configuration
    Replies: 5
    Last Post: 18 Feb 2011, 05:53 AM
  2. SSU gone bad!
    By NBordeau in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 1 Jun 2010, 05:05 AM
  3. Replies: 8
    Last Post: 6 Dec 2008, 01:18 AM
  4. Screwed up my admin somehow??
    By Baloo in forum General Questions
    Replies: 14
    Last Post: 7 Jul 2008, 01:37 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