【问题标题】:WooCommerce Print Invoice & Packing List Regular PriceWooCommerce 打印发票和装箱单正常价格
【发布时间】:2015-04-02 10:15:38
【问题描述】:

我正在使用 WooCommerce Print Invoice & Packing List 插件和 Woocommerce 来打印发票。我需要在发票中打印产品的常规价格。请帮助。

谢谢!

【问题讨论】:

    标签: woocommerce invoice


    【解决方案1】:

    让这个工作 将以下代码添加到您的 invoice.php -

    $item['product']->regular_price
    

    【讨论】:

      【解决方案2】:

      要将常规价格添加到每种产品的发票中,只需将以下代码添加到您的 invoice.php 文件中,就在 SKU 的 dl 标记下方。

      在我的示例中,我将其标记为“单价”。如果您愿意,请随意更改。

          <dl class="meta">
              <?php $description_label = __( 'Unit Price', 'wpo_wcpdf' ); // registering alternate label translation ?>
              <?php if( !empty( $item['product']->regular_price ) ) : ?><dt class="sku"><?php _e( 'Unit Price:', 'wpo_wcpdf' ); ?></dt><dd class="sku"><?php echo $item['product']->regular_price; ?></dd><?php endif; ?>
          </dl>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-08-02
        • 1970-01-01
        • 1970-01-01
        • 2021-07-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多