I have next problem:
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: { product_id:product_id, quantity:quantity, "option[30]":product_option_id},
dataType: 'json',
I have an ajax function that must return key option[value] and it's value product_option_id. My function takes three parameters:
function addTocartN(product_id, product_option_id, product_option) {
So i need to get data like this:
data: { product_id:product_id, quantity:quantity, "option[product_option]":product_option_id}
How i can do this?