Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

printing off a product listed on a page


pronane

Recommended Posts

Posted

I have removed the cart aspect from my website, and I was wondeirng how can I replace where the Add to cart button was with a "print" button and it would print off the current page I am on, or just the inside frame detailing the currently viewed product and a picture along with the template header at the top of the page?

 

Is this possible, if so how can I do it?

 

Also, how do you remove the price list from a product? i.e. when you click into the product the price is still appearing even though I have removed the cart options!

 

Thanks for any help!

Posted

Here is some advice:

 

1/ You can set a custom stylesheet for your print pages by adding the following into your header

<link rel="stylesheet" href="4.7_files/print.css" media="print">

2/ Find in product listing

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

and replace it with your javascript print function.

 

3/ I recommend you first look for a comtribution that does this because there are hundred of improvements over just a simple javascript function that can be made.

 

Anyway, good luck

 

Nick

Menou and unome

Posted
Here is some advice:

 

1/ You can set a custom stylesheet for your print pages by adding the following into your header

<link rel="stylesheet" href="4.7_files/print.css" media="print">

2/ Find in product listing

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

and replace it with your javascript print function.

 

3/ I recommend you first look for a comtribution that does this because there are hundred of improvements over just a simple javascript function that can be made.

 

Anyway, good luck

 

Nick

 

I haven't been able find a contribution that does this unfortunately. Is it just a standard print button that will call, the same as File -> Print that i need to create?

 

Secondly, I simply add that to a header file and everything will print the way i want? where is the 4.7_files/print.css located or is that something that I would need to create separately? Finally where is the header file that you refer to located?

 

Thanks again,

 

Paul

Posted

osc does not work with frames. in order not to print the outer menus, you would need to create a new php-page that pops up on clicking the print button, with a code in the <body tag that will make it print onload.

 

basicly you will not have to change much, just copy the products_info.php to a new file products_popup.php and in the new file remove the header / collumn_left / collumn_right / footer and all you do not want to print.

 

then go back to your products_info.php and replace the add to chart code with code like:

<a href="<?php echo tep_href_link('products_popup.php?products_id=' . $http_get_vars['products_id']) ?>" taget=_blank>YOUR_TEXT_PRINT</a>

Posted
YOUR_TEXT_PRINT

 

this probably is a stupid question but what should be put in there? I assume thats just the name of the print button/link?

Posted
There is a contribution that may help you. TRY THIS

 

 

thats pretty much what i want to do, but within the printer friendly view page, i want to have a print button that will just print off that page....is there a javascript method that can be called and put into the bottom of the page?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...