Osclass Support Forums

General osclass questions => Plugins => Topic started by: federicocitti on March 25, 2020, 02:48:33 PM

Title: Plugin print pdf
Post by: federicocitti 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
Title: Re: Plugin print pdf
Post by: chris on January 06, 2021, 11:34:44 PM
hello,

did you find your way ?

Title: Re: Plugin print pdf
Post by: abuzarkandwal on April 23, 2021, 04:15:57 AM
how to activate it
Title: Re: Plugin print pdf
Post by: Giacomo Vespo 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.
Title: Re: Plugin print pdf
Post by: MB Themes 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
Title: Re: Plugin print pdf
Post by: Giacomo Vespo 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?
Title: Re: Plugin print pdf
Post by: MB Themes on January 07, 2022, 10:10:25 AM
@Giacomo Vespo
Not quite sure what you mean.
Title: Re: Plugin print pdf
Post by: Giacomo Vespo on January 07, 2022, 10:55:44 AM
@Giacomo Vespo
Not quite sure what you mean.
I need show
$item_user['s_phone_mobile']
Title: Re: Plugin print pdf
Post by: Giacomo Vespo 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);
?
Title: Re: Plugin print pdf
Post by: MB Themes 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'];
Title: Re: Plugin print pdf
Post by: Giacomo Vespo 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);