![]() |
Adding Printable Version to Embeded Static Pages
Hello All,
I am a new x-cart user and have been working with it for over a week now. So far so good. I have been able to find the answers and fix things myself. But I am very stuck on one thing... I swear I have read every post in this forum - twice trying to find out. 8O I have a bunch of articles that I want to make embeded static pages. I have a couple of them done for testing purposes right now, but there is no "Printable Version" link like there are for categories and products. How can I add that in so all my embeded static pages show the "Printable Version" link? I REALLY appreciate any help you could offer! Thanks a MILLION! :-) |
Re: Adding Printable Version to Embeded Static Pages
Okay - I got the answer from X-Cart. Maybe this will help somebody else out.
It's VERY easy! I copied and pasted and all was well... ___________________ Unfortunately, standard X-Cart does not support such functionallity - printable version for embeded static pages. However since X-Cart has open source code it can be customized to meet your needs. You can modify the cart by yourselif, please follow the instruction below to implement the feature you need: 1. Modify the "<xcart_dir>/skin1/head.tpl" template, replace the following code: {if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} with this one: {if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || $main eq 'pages' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} |
Re: Adding Printable Version to Embeded Static Pages
Just another Tip, you can use CSS to automaticly change the layout for print.
http://www.w3schools.com/css/css_ref_print.asp |
Re: Adding Printable Version to Embeded Static Pages
Quote:
added the above, and nothing changes on 4.1.6. Did you have any other places to add the part for $main eq 'pages' ? |
Re: Adding Printable Version to Embeded Static Pages
This works great in 4.1.8, thank you!!
Mike |
Re: Adding Printable Version to Embeded Static Pages
This works fine in 4.1.10 as well.
Just make sure you add the the double-pike OR symbol... || Also, if you would like to have the Printable Version added to your Search Results as well, then just add: || $main eq 'search' This in the the file: skin1/head.tpl (near the bottom): Here's the complete replacement code: Code:
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || $main eq 'pages' || $main eq 'search' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} |
Re: Adding Printable Version to Embeded Static Pages
I tried changing the code in /skin1/head.tpl but it didn't seem to change anything. I am using X-Cart v4.2.2. Has anyone else been able to get it to work for this version?
Here is the code I used: Code:
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || $main eq 'pages' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} Do I need to place any code in the actual static pages? |
Re: Adding Printable Version to Embeded Static Pages
Is the printable version working for the other pages?
Quote:
|
Re: Adding Printable Version to Embeded Static Pages
Yes it works fine on the Category and Product pages. A "Printable version" link and icon appear in the top right, on the same line as the breadcrumbs.
Nothing appears for my static pages. |
Re: Adding Printable Version to Embeded Static Pages
I also noticed another problem. When I select "Printable Version" from any Categories section that has a long list, it takes me to a new page that looks like it should print properly but when I actually select Print Preview from my browser it cuts things off after the first page. It also places the store logo on a completely separate page.
Pg1 = Company Logo then a bunch of blank space Pg2 = whatever products that fit on 1 page (the rest are cut off) |
Re: Adding Printable Version to Embeded Static Pages
Did you ever resolve the issue from above: new page that looks like it should print properly but when I actually select Print Preview from my browser it cuts things off after the first page. I'm having the exact same problem now and am searching the forum looking for a solution. Can you help?
|
All times are GMT -8. The time now is 08:21 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.