Ciao ragazzi, sto diventando matto, vi prego di aiutarmi.
sto facendo un sitoweb con wordpress, e sto usando un plugin che a quanto pare nessuno in italia usa perche non ho trovato assistenza a riguardo se non in inglese su siti stranieri... il plugin si chiama WPPizza e consente di fare un menu online con i prodotti slezionabili in un unico ordine che viene spedito via mail all'amministratore... il problema è che questa mail che arriva è veramente mal impostata, tutto scritto nello stesso modo e tutto molto ristretto, io vorrei ordinarla un po mettendo in grassetto i dati importanti, ma non ci riesco!! ecco la pagina:
Codice PHP:
<?php
/****************************************************************************************************************
*
* WPPizza - Plaintext Email Template
*
* Note: do not use html tags. it will not work . Know what you are doing.
*
* if you are sending html emails with phpmailer (wppizza->settings->Select Type of Mail Delivery)
* you could also comment OUT
* $mail->AltBody = $this->orderMessage['plaintext'];
* in wppizza-phpmailer-settings.php as phpmailer will automatically generate plaintext emails form the html input
* if you do this, changes to this file will not make any difference
* make sure however, that you copy wppizza-phpmailer-settings.php to your theme directory
* as otherwise your changes will be overwritten in the next update of this plugin. just saying.....
*
****************************************************************************************************************/
?>
<?php
/****************************************************************************
*
* [header: date and time of order,gateway used,transactionid etc]
*
****************************************************************************/
?>
===========<?php echo $orderLabel['order_details'] ?>============
<?php echo $nowdate ?>
<?php echo $orderLabel['order_paid_by'] ?> <?php echo $gatewayUsed ?> (<?php echo $transactionId ?>)
<?php
/****************************************************************************
*
* [customer details: whatever fields where enabled on order page]
*
****************************************************************************/
echo $emailPlaintext['customer_details'];
?>
<?php
/****************************************************************************
*
* [order items: list of items ordered]
* to make thing reasonably pretty in plaintext emails , we pad with spaces
* as required as tabs do not seem to want to work
*
****************************************************************************/
$output='';
foreach($emailPlaintext['items'] as $k=>$v){
$strPartLeft=''.$v['label'].'';/*made up of => '.$v['quantity'].'x '.$v['name'].' '.$v['size'].' ['.$v['currency'].' '.$v['price'].']'*/
$spaces=75-strlen($strPartLeft);
$strPartRight=''.$v['value'].'';/*made up of => '.$v['currency'].' '.$v['pricetotal'].'*/
/**add to string, spacing left and right out somewhat and put linebreak before any additional info**/
$output.=''.$strPartLeft.''.str_pad($strPartRight,$spaces," ",STR_PAD_LEFT).''.PHP_EOL.'';
/**NOTE: DO NOT DELETE OR ALTER THE ADDITIONAL INFO DECLARATIONS OR YOU MIGHT BREAK THINGS. IF NOT NOW THAN POSSIBLY IN THE FUTURE AS OTHER EXTENSIONS MAY RELY ON THIS!!!*/
if(isset($v['additional_info']) && $v['additional_info']!=''){$output.=''.$v['additional_info'].'';}
/**add additional line break as spacer between items**/
$output.=PHP_EOL;
}
/* print it */
echo''.$output.'';
/*****************************************************************************************************
if you've changed the above and also want to store these changes in the order history->order details
as opposed to just in plaintext emails uncomment the line below.
YOU PROBABLY SHOULD DO A TEST ORDER AND CHECK HISTORY->ORDER DETAILS !!!
IF IN DOUBT, LEAVE IT COMMENTED OUT
*****************************************************************************************************/
/* $emailPlaintext['db_items']=$output; */
?>
<?php
/************************************************************************************************
*
* [order summary: price/tax/discount/delivery options etc]
*
************************************************************************************************/
echo $emailPlaintext['order_summary'];
?>
<?php
/****************************************************************************
*
* [footer]
*
****************************************************************************/
?>
====================================================================
<?php
echo $orderLabel['order_email_footer'];
?>
Questo è il codice e il tipo di stringe che mi interessa mettere in grassetto sono ad esempio $orderLabel['order_details'] e $transactionId
Premetto che 'order_details' è un campo che va inserito tra le impostazioni nel pannello di controllo di wordpress (in questo caso la frase è DETTAGLI ORDINE che io vorrei mettere in grassetto...)
Come posso fare?? mi serve anche per capire in generale come andare a modificare graficamente certe parti di un codice php non essendo ancora molto pratico... grazie in anticipo