从magento的购物车中删除所选商品
问题描述:
<script>
function getValueUsingClass(){
/* declare an checkbox array */
var chkArray = [];
/* look for all checkboes that have a class 'chk' attached to it and check if it was checked */
$(".chk:checked").each(function() {
chkArray.push($(this).val());
});
/* we join the array separated by the comma */
var selected;
selected = chkArray.join(',') + ",";
/* check if there is selected checkboxes, by default the length is 1 as it contains one single comma */
if(selected.length > 1){
alert("You have selected " + selected);
}else{
alert("Please at least one of the checkbox");
}
}
</script>
<input type="button" value="Remove Selected" id="buttonClass">
<input type="checkbox" class="chk" value="<?php echo $_item->getId(); ?>">
我有一个购物卡,里面有多个商品。
如何从我的购物卡中删除所选项目?从magento的购物车中删除所选商品
而问题是什么? –
@GerardRozsavolgyi我想他想从他的购物卡里删除选定的物品。 Yogesh,请提供一些你正在使用的代码。我们不是在这里为你写整个申请表,而是为了帮助你解决你遇到的问题。 所以提供代码,并解释什么是不工作的。 – Mitch
我收到物品ID,但我无法删除购物车中的选定物品。请提供多个删除代码。 – yogesh