本文整理汇总了PHP中VirtueMartModelCustomfields::CustomsFieldOrderDisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP VirtueMartModelCustomfields::CustomsFieldOrderDisplay方法的具体用法?PHP VirtueMartModelCustomfields::CustomsFieldOrderDisplay怎么用?PHP VirtueMartModelCustomfields::CustomsFieldOrderDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtueMartModelCustomfields
的用法示例。
在下文中一共展示了VirtueMartModelCustomfields::CustomsFieldOrderDisplay方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo $item->order_item_name;
?>
</span>
<input class='orderedit' type="text" name="item_id[<?php
echo $item->virtuemart_order_item_id;
?>
][order_item_name]" value="<?php
echo $item->order_item_name;
?>
"/><?php
//echo $item->order_item_name;
//if (!empty($item->product_attribute)) {
if (!class_exists('VirtueMartModelCustomfields')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'customfields.php';
}
$product_attribute = VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item, 'BE');
if ($product_attribute) {
echo '<div>' . $product_attribute . '</div>';
}
//}
$_dispatcher = JDispatcher::getInstance();
$_returnValues = $_dispatcher->trigger('plgVmOnShowOrderLineBEShipment', array($this->orderID, $item->virtuemart_order_item_id));
$_plg = '';
foreach ($_returnValues as $_returnValue) {
if ($_returnValue !== null) {
$_plg .= $_returnValue;
}
}
if ($_plg !== '') {
echo '<table border="0" celspacing="0" celpadding="0">' . '<tr>' . '<td width="8px"></td>' . '<td>' . $_plg . '</td>' . '</tr>' . '</table>';
}
示例2: retornaHtmlPagamento
//.........这里部分代码省略.........
} elseif (stripos($envio, "sedex") !== false) {
$tipo_frete = "SD";
} else {
$tipo_frete = "EN";
}
*/
// configuração dos campos
$campo_complemento = $method->campo_complemento;
$campo_numero = $method->campo_numero;
$html .= '<form id="frm_pagseguro" action="https://pagseguro.uol.com.br/v2/checkout/payment.html" method="post" > ';
$html .= ' <input type="hidden" name="receiverEmail" value="' . $method->email_cobranca . '" />
<input type="hidden" name="currency" value="BRL" />
<input type="hidden" name="tipo" value="CP" />
<input type="hidden" name="encoding" value="utf-8" />';
if (isset($order["details"][$endereco]) and isset($order["details"][$endereco]->{$campo_complemento})) {
$complemento = $order["details"][$endereco]->{$campo_complemento};
} else {
$complemento = '';
}
if (isset($order["details"][$endereco]) and isset($order["details"][$endereco]->{$campo_numero})) {
$numero = $order["details"][$endereco]->{$campo_numero};
} else {
$numero = '';
}
$html .= '<input name="reference" type="hidden" value="' . ($order["details"][$endereco]->order_number != '' ? $order["details"][$endereco]->order_number : $order["details"]["BT"]->order_number) . '">';
$html .= '<input type="hidden" name="senderName" value="' . ($order["details"][$endereco]->first_name != '' ? $order["details"][$endereco]->first_name : $order["details"]["BT"]->first_name) . ' ' . ($order["details"][$endereco]->last_name != '' ? $order["details"][$endereco]->last_name : $order["details"]["BT"]->last_name) . '" />
<input type="hidden" name="shippingType" value="' . $method->tipo_frete . '" />
<input type="hidden" name="shippingAddressPostalCode" value="' . ($order["details"][$endereco]->zip != '' ? $order["details"][$endereco]->zip : $order["details"]["BT"]->zip) . '" />
<input type="hidden" name="shippingAddressStreet" value="' . ($order["details"][$endereco]->address_1 != '' ? $order["details"][$endereco]->address_1 : $order["details"]["BT"]->address_1) . ' ' . ($order["details"][$endereco]->address_2 != '' ? $order["details"][$endereco]->address_2 : $order["details"]["BT"]->address_2) . '" />
<input type="hidden" name="shippingAddressNumber" value="' . $numero . '" />
<input type="hidden" name="shippingAddressComplement" value="' . $complemento . '" />
<input type="hidden" name="shippingAddressCity" value="' . ($order["details"][$endereco]->city != '' ? $order["details"][$endereco]->city : $order["details"]["BT"]->city) . '" />';
$cod_estado = !empty($order["details"][$endereco]->virtuemart_state_id) ? $order["details"][$endereco]->virtuemart_state_id : $order["details"]["BT"]->virtuemart_state_id;
$estado = ShopFunctions::getStateByID($cod_estado, "state_2_code");
$html .= '
<input type="hidden" name="shippingAddressState" value="' . $estado . '" />
<input type="hidden" name="shippingAddressCountry" value="BRA" />
<input type="hidden" name="senderAreaCode" value="" />
<input type="hidden" name="senderPhone" value="' . ($order["details"][$endereco]->phone_1 != '' ? $order["details"][$endereco]->phone_1 : $order["details"]["BT"]->phone_1) . '" />
<input type="hidden" name="senderEmail" value="' . ($order["details"][$endereco]->email != '' ? $order["details"][$endereco]->email : $order["details"]["BT"]->email) . '" />';
// total do frete
// configurado para passar o frete do total da compra
if (!empty($order["details"]["BT"]->order_shipment)) {
$html .= '<input type="hidden" name="itemShippingCost1" value="' . number_format(round($order["details"][$endereco]->order_shipment != '' ? $order["details"][$endereco]->order_shipment : $order["details"]["BT"]->order_shipment, 2), 2, '.', '') . '">';
} else {
$html .= '<input type="hidden" name="itemShippingCost1" value="0">';
}
// desconto do pedido
/*
$order_discount = (float)$order["details"]["BT"]->order_discount;
if (empty($order_discount) && (!empty($order["details"]["BT"]->coupon_discount))) {
$order_discount = (float)$order["details"]["BT"]->coupon_discount;
}
$order_discount = (-1)*abs($order_discount);
if (!empty($order_discount)) {
$html .= '<input type="hidden" name="extraAmount" value="'.number_format($order_discount,2,'.','').'" />';
}
*/
// Cupom de Desconto
$desconto_pedido = $order["details"]['BT']->coupon_discount;
//$desconto_pedido*= -1;
$html .= '<input type="hidden" name="extras" value="' . number_format($desconto_pedido, 2, ",", "") . '" />';
$order_subtotal = $order['details']['BT']->order_subtotal;
if (!class_exists('VirtueMartModelCustomfields')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'customfields.php';
}
if (!class_exists('VirtueMartModelProduct')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'product.php';
}
$i = 0;
$product_model = VmModel::getModel('product');
foreach ($order['items'] as $p) {
$i++;
$valor_produto = $p->product_final_price;
// desconto do pedido
$valor_item = $valor_produto;
$pr = $product_model->getProduct($p->virtuemart_product_id);
$product_attribute = strip_tags(VirtueMartModelCustomfields::CustomsFieldOrderDisplay($p, 'FE'));
$html .= '<input type="hidden" name="itemId' . $i . '" value="' . $p->virtuemart_order_item_id . '">
<input type="hidden" name="itemDescription' . $i . '" value="' . $p->order_item_name . '">
<input type="hidden" name="itemQuantity' . $i . '" value="' . $p->product_quantity . '">
<input type="hidden" name="itemAmount' . $i . '" value="' . number_format(round($p->product_final_price, 2), 2, '.', '') . '">
<input type="hidden" name="itemWeight' . $i . '" value="1">';
/* <input type="hidden" name="itemWeight' . $i . '" value="' .round( ShopFunctions::convertWeigthUnit($pr->product_weight, $pr->product_weight_uom, "GR"),2) . '"> */
}
$url = JURI::root();
$url_lib = $url . DS . 'plugins' . DS . 'vmpayment' . DS . 'pagseguro_virtuemartbrasil' . DS;
$url_imagem_pagamento = $url_lib . 'imagens' . DS . 'pagseguro.gif';
// segundos para redirecionar para o Pagseguro
if ($redir) {
// segundos para redirecionar para o Pagseguro
$segundos = $method->segundos_redirecionar;
$html .= '<br/><br/>Você será direcionado para a tela de pagamento em ' . $segundos . ' segundo(s), ou então clique logo abaixo:<br />';
$html .= '<script>setTimeout(\'document.getElementById("frm_pagseguro").submit();\',' . $segundos . '000);</script>';
}
$html .= '<div align="center"><br /><input type="image" value="Clique aqui para efetuar o pagamento" src="' . $url_imagem_pagamento . '" /></div>';
$html .= '</form>';
return $html;
}