This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

federicocitti

  • **
  • 10 posts
Plugin print pdf
« on: March 25, 2020, 02:48:33 PM »
Hi, do any of you know how to work the print pdf plugin that takes the relevant fields like phone etc.? Thank you

*

chris

  • **
  • 29 posts
Re: Plugin print pdf
« Reply #1 on: January 06, 2021, 11:34:44 PM »
hello,

did you find your way ?


*

abuzarkandwal

  • ****
  • 112 posts
Re: Plugin print pdf
« Reply #2 on: April 23, 2021, 04:15:57 AM »
how to activate it

*

Giacomo Vespo

  • **
  • 10 posts
Re: Plugin print pdf
« Reply #3 on: January 05, 2022, 04:50:50 PM »
Good Mornig, i'am new man (Italy)
My question: The pdf view Email for seller
and no view Phone Number.
template.php present at line 150,151 this:
// Email
  $pdf->RotatedText($x + (29.5*$i) + 10 , $y+5, osc_item_contact_email(), 270);

The show email is danger because the item page hide mail for seller at all.

I need solved Email in phone number but dont know code script and dont know if other files is compromise.
Excuse my Language.

*

MB Themes

Re: Plugin print pdf
« Reply #4 on: January 06, 2022, 09:37:51 AM »
Do you want to replace email with phone?
Changes in pdf template are easy, but usually needs bit of testing eith proper adjustments
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Giacomo Vespo

  • **
  • 10 posts
Re: Plugin print pdf
« Reply #5 on: January 06, 2022, 08:27:26 PM »
Do you want to replace email with phone?
Changes in pdf template are easy, but usually needs bit of testing eith proper adjustments
yes but I don't know the call to the phone. an example?

*

MB Themes

Re: Plugin print pdf
« Reply #6 on: January 07, 2022, 10:10:25 AM »
@Giacomo Vespo
Not quite sure what you mean.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Giacomo Vespo

  • **
  • 10 posts
Re: Plugin print pdf
« Reply #7 on: January 07, 2022, 10:55:44 AM »
@Giacomo Vespo
Not quite sure what you mean.
I need show
$item_user['s_phone_mobile']

*

Giacomo Vespo

  • **
  • 10 posts
Re: Plugin print pdf
« Reply #8 on: January 07, 2022, 11:17:28 AM »
@Giacomo Vespo
Not quite sure what you mean.
Example:
$pdf->Cell(0,4,  sprintf(__('Email: %s', 'printpdf'), osc_item_contact_email()),'',1,'L', false);
replace in:
$pdf->Cell(0,4,  sprintf(__('Email: %s', 'printpdf'), osc_item_contact_phone()),'',1,'L', false);
?

*

MB Themes

Re: Plugin print pdf
« Reply #9 on: January 07, 2022, 01:17:57 PM »
@Giacomo
Osc_item_contact_phone() would get phone number from item, not from item user.

Code: [Select]
$user = User::newInstance()->findByPrimaryKey(osc_item_user_id());
echo @$user['s_phone_mobile'];
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on January 07, 2022, 03:42:56 PM
*

Giacomo Vespo

  • **
  • 10 posts
Re: Plugin print pdf
« Reply #10 on: January 07, 2022, 03:40:55 PM »
@Giacomo
Osc_item_contact_phone() would get phone number from item, not from item user.

Code: [Select]
$user = User::newInstance()->findByPrimaryKey(osc_item_user_id());
echo @$user['s_phone_mobile'];
Solved!
I Love You Man!!!!!!!!!

My code template.php for phone and not email:

$user = User::newInstance()->findByPrimaryKey(osc_item_user_id());
$pdf->Cell(0,4,  sprintf(__('Phone: %s', 'printpdf'), @$user['s_phone_mobile']),'',1,'L', false);