在我的Magento安装中,我具有用于Fedex住宅/商业交付的客户地址属性Sub CopyRowsAcross()
Dim i As Integer
Dim ws1 As Worksheet: Set ws1 = ThisWorkbook.Sheets("Master")
Dim ws2 As Worksheet: Set ws2 = ThisWorkbook.Sheets("KACC")
For i = 2 To ws1.Range("B65536").End(xlUp).Row
If ws1.Cells(i, 2) = "Kimborough Ambulatory Care Center" Then ws1.Rows(i).Copy ws2.Rows(ws2.Cells(ws2.Rows.Count, 2).End(xlUp).Row + 1)
Next i
End Sub
。我们需要在结帐页面上为没有地址价值的客户创建一个选择。
我已覆盖模板文件address_type_indicator
Magento_Checkout/template/shipping-address/address-renderer/default.html
<div class="shipping-address-item amcheckout-shipping-address" css="'selected-item' : isSelected() && address().customAttributes['address_type_indicator'].value !== '0', 'not-selected-item':!isSelected()">
<text args="address().prefix"/> <text args="address().firstname"/> <text args="address().middlename"/>
<text args="address().lastname"/> <text args="address().suffix"/><br/>
<text args="_.values(address().street).join(', ')"/><br/>
<text args="address().city "/>, <span text="address().region"></span> <text args="address().postcode"/><br/>
<text args="getCountryName(address().countryId)"/><br/>
<a if="address().telephone" attr="'href': 'tel:' + address().telephone" text="address().telephone"></a><br/>
<each args="data: address().customAttributes, as: 'element'">
<if args="element.label">
<text args="element.label"/>
</if>
<ifnot args="element.label">
<if args="element.address_type_indicator.value">
<if args="element.address_type_indicator.value === '0'">
<hr />
<strong>
<small>Select Address Type</small>
</strong>
<select>
<option value="0" disabled="disabled" selected="selected">Please, select address type</option>
<option value="Residential">Residential</option>
<option value="Commercial">Commercial</option>
</select>
<button class="checkout-change-address-type-btn" click="$parent.updateAddressType">
<span>Save</span>
</button>
</if>
<ifnot args="element.address_type_indicator.value === '0'">
<text args="element.address_type_indicator.value"/>
</ifnot>
</if>
</ifnot>
</each>
<button type="button" click="selectAddress" class="action action-select-shipping-item amcheckout-button -select" visible="address().customAttributes['address_type_indicator'].value !== '0'">
<span translate="'Ship Here'"></span>
</button>
<button visible="address().isEditable()" type="button"
class="action edit-address-link amcheckout-button -edit"
click="editAddress">
<span translate="'Edit'"></span>
</button>
</div>
requirejs-config.js
如何发送到后端地址ID和所选值?