在本例中,
http
: //jsfiddle.net/SnJXQ/61/表示正在读取进度指示器,但是它的宽度从站点顶部开始增加!
但是我们需要进度条的宽度
在到达文章内容div时才 开始增加,直到文章内容结束为止
,这是我们需要编辑
HTML 的示例代码
<div class="bar-long"></div>
<header>Header & Menu
<br>header and menu content
<p>Header & Menu
<br>header and menu content
<p>Header & Menu
<br>header and menu content
<p>
</header>
<h1>Begin Article <br>(Need show Bar from here) </h1>
<p>
<article>
<div class="bar-long2">article content
<br />article content
<br />article content
<br />article content
<br />article content
<br />article content
<br />article content
<br />article content
<br />article content
<br />content
<br />article content
<br …Run Code Online (Sandbox Code Playgroud) 我们需要传递以下 WooCommerce 参数,但我们不能并且出现错误。
主要问题是获取所有产品数量、购买的每种产品的数量、产品 SKU
这是我们的代码:
add_action( 'woocommerce_thankyou', 'the_tracking' );
function the_tracking( $order_id ) {
global $woocommerce;
$order = wc_get_order( $order_id );
$total = $order->get_total();
$currency = get_woocommerce_currency();
$subtotal = $woocommerce->cart->subtotal;
$coupons = $order->get_used_coupons();
$coupon_code = '';
$discount = $order->get_total_discount();
foreach ($coupons as $coupon){
$coupon_code = $coupon;
}
$tracking = 'OrderID='.$order.'&ITEMx=[ItemSku]&AMTx=[AmountofItem]&QTYx=[Quantity]&CID=1529328&OID=[OID]&TYPE=385769&AMOUNT='. $total .'&DISCOUNT='. $discount .'&CURRENCY='. $currency .'&COUPON='. $coupon_code .'';
echo $tracking;
}
Run Code Online (Sandbox Code Playgroud)
但它并没有给我们带来我们应该需要的预期结果。
任何帮助表示赞赏。