我添加了一种新的送货方式“从商店取货”,可以免费送货到 WooCommerce。
我有 2 家商店,“Barsha”和“Deira”。我希望当客户选择从商店取货时能够选择他将访问的商店。
这是我添加到cart-shipping.php模板文件中的内容:
<?php
<hr><p>Please choose the pickup store:</p>
<input type="radio" id="barsha" sname="store" value="barsha">
<label for="barsha">Barsha<a href=""> Check Location</a></label><br>
<input type="radio" id="deira" sname="store" value="deira">
<label for="deira">Deira<a href=""> Check Location</a></label>
$sname= sname;
if ( $sname = 'barsha'); {
printf ('barsha')
} else {
printf ('deira')
}
?>
But I can't get it working. How can I add some radio buttons to a specific shipping method and save the chosen option when order is submitted?
小唯快跑啊