經過與爲JoomShopping組件編寫的幾乎每一行代碼的一些摔角之後,我相信我已經找到了應該解決所有困境的答案。從一個動態頁面到另一個頁面獲取詳細信息 - 重新發布
當購物清單激活「購買」按鈕,一次就可以點擊使用下面的鏈接語法,以便將產品發佈到Google Checkout購物車:
index.php/cart/add?category_id=2&product_id=12&quantity=4
其中2爲類別ID和12是產品ID等等...這是由V.Vachev解決,但我認爲審慎的做法後所有的成品/固定OCED,因爲它的工作原理:
$('.checkOut').live('click',function(){
var products= new Array();
$(".jshop_prod_cart").each(function(){
var product = new Object();
product.catid = $(this).find('[name="category_id"]').val();
product.id = $(this).find('input[name="product_id"]').val();
product.qanty = $(this).find('input[name^="quantity"]').val();
products.push(product)
$.ajax({
type: 'GET',
url: "shop-portal/add?category_id="+products[0].catid+"&product_id="+products[0].id+"&quantity="+products[0].qanty,
dataType: 'json',
})
})
})
這將返回:
http://www.domain.com/index.php/shop-portal/add?category_id=2&product_id=48&quantity=4
但它只返回1和I具有多個動態條目所有需要被捕捉爲這樣。
我正在研究這個,似乎我需要緩存這個信息莫名其妙...任何想法?
檢查我的編輯,我希望這將有助於:) –
我有,我發現,這是我的拼寫是11小時實編碼後attrocious! – user2265402