【问题标题】:Joomla 2.5 and Virtuemart 2 custom field values send via e-mailJoomla 2.5 和 Virtuemart 2 自定义字段值通过电子邮件发送
【发布时间】:2013-08-01 14:00:00
【问题描述】:

我有一个模板覆盖,它显示产品(带有一些 jquery)。我有一个自定义的 sendmail.php,它可以正确发送选择的值。但不是产品自定义字段值。我无法联系到他们。 在 sendmail.php 中,此字段可用:

$userContact->shipname
$product->quantity
$product->product_parent_id ...

我可以在 sendmail.php 中列出所有自定义字段值:

foreach ($product->customfieldsCart as $field) {
echo $field->custom_value;
}

但我只想要选定的值。在正常的订购过程中,invoice_items.php 运行良好(第 57-51 行):

if (!empty($item->product_attribute)){
if(!class_exists 'VirtueMartModelCustomfields'))
require JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'customfields.php');
$product_attribute = 
VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item,'FE');
echo $product_attribute;}  

请帮助我,非常感谢

【问题讨论】:

    标签: joomla2.5 virtuemart custom-fields


    【解决方案1】:

    无法从产品视图中的产品数据中获取自定义字段的选定值。 正如您所说,您可以获得自定义字段的所有选项的值,但产品数据数组不存储选择了哪些值/选项。此数据只能来自购物车或发票数组。

    在您的情况下,我认为您需要使用 javascript 获取选定的值,将它们发送到您的 sendmail.php(ajax,json)并使用该数据构建您的电子邮件。

    【讨论】:

      猜你喜欢
      • 2013-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多