| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding Printable Version to Embeded Static Pages | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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. ![]() 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! ![]()
__________________
Taylork ______________ X-Cart Version 4.0.19 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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'}
__________________
Taylork ______________ X-Cart Version 4.0.19 |
|||||||
#3
|
|||||||
|
|||||||
![]() Just another Tip, you can use CSS to automaticly change the layout for print.
http://www.w3schools.com/css/css_ref_print.asp
__________________
4.1.9 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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' ?
__________________
Seacat X-Cart Gold v4.1.6 [linux] PHP 5.2.2 My SQL 5.0.24 DSEFU Mod Cartlab CSS Skin Several other mods Self-Defense Weapons |
|||||||
#5
|
|||||||
|
|||||||
![]() This works great in 4.1.8, thank you!!
Mike
__________________
X-cart Gold v. 4.1.8 Unix |
|||||||
#6
|
|||||||
|
|||||||
![]() 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:
__________________
X-cart 4.1.10 |
|||||||
#7
|
|||||||
|
|||||||
![]() 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:
Do I need to place any code in the actual static pages?
__________________
X-Cart Gold - v4.2.2 PHP: 4.4.9 MySQL: 5.1.55-rel 12.6 Apache: 2.0.54 |
|||||||
#8
|
|||||||||
|
|||||||||
![]() Is the printable version working for the other pages?
Quote:
__________________
xcart 5.1.2 |
|||||||||
#9
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart Gold - v4.2.2 PHP: 4.4.9 MySQL: 5.1.55-rel 12.6 Apache: 2.0.54 |
|||||||
#10
|
|||||||
|
|||||||
![]() 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)
__________________
X-Cart Gold - v4.2.2 PHP: 4.4.9 MySQL: 5.1.55-rel 12.6 Apache: 2.0.54 |
|||||||
|
|||
X-Cart forums © 2001-2020
|