Modify what gets printed from cart

  • jimmitch
  • Topic Author
12 years 9 months ago #46799

I have configured our cart so that the user can print out their invoice using the small printer icon that is on the lower right side of the page. What prints is the item purchased and the price. Is there a way to get the entire cart page to print so that the invoice also included the users name and address? Or is there another way to allow the user to print a page that includes their name, adress, item(s) purchased and price?

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #46894

If you want to also display the address entered in that printout, you can add the code:
$this->setLayout('address');
echo $this->loadTemplate();
in the file "printcart" of the view "checkout" via the menu Display>Views.

The following user(s) said Thank You: jimmitch

Please Log in or Create an account to join the conversation.

  • jimmitch
  • Topic Author
12 years 8 months ago #48507

Hi: I got my last question answered and it works THANKS. I now have another. Cart has name address and phone number of the buyer on it and that all prints well, that information is also included in emails that confirm the order back to us when the buyer completes the transaction. I would like the buyers email address to also show up on the cart, on the cart that is printed and in all emails sent to us confirming orders. I am a little surprised that this is not automatic as the email address is part of the registration process and I can find them easily by looking at our customer list. Must be a simple trick. I hope!

Last edit: 12 years 8 months ago by jimmitch.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 8 months ago #48557

How to edit the different elements:

-The cart display & print:
file "cart" of the view "checkout" via the menu display->Views
You will have to add such code:
$user = hikashop_loadUser(true);
echo $user->user_email;

-the emails:
You will have to edit them via the menu System->Emails (Business edition) and add:
$userClass = hikashop_get('class.user');
$userClass->get(false);
$user = $userClass->get($data->order_user_id);
echo $user->user_email;

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum