I have some items in shop basket in SESSION
.
Each item maybe be for one shop and another item maybe for another shop.
I want when customer click in create factor button for each shop item list in basket.
How can I delete or unset some items in my basket that have same shopid
and customer click create factor for this shop with this shopid
.
My session array for example is:
Array('customer' => Array('basket' => Array(
'9_2' => Array
(
"row" => "0",
'item' => 'cd',
'count' => '1',
'sale_start_date' => '1391-12-25 19:27:56',
'sale_end_date' => '1392-04-20 19:27:49',
'sale_price' => '40500',
'price' => '54564',
'id' => '999035',
'shopid' => '4'
),
'999_17' => Array
(
'row' => '1',
'item' => 'car',
'count' => '1',
'sale_start_date' => '0000-00-00 00:00:00',
'sale_end_date' => '0000-00-00 00:00:00',
'sale_price' => '0',
'price' => '520000',
'id' => '999039',
'code' => 'b125nh',
'shopid' => '6'
),
'9_3' => Array
(
'row' => '2',
'item' => 'book',
'count' => '1',
'sale_start_date' => '0000-00-00 00:00:00',
'sale_end_date' => '0000-00-00 00:00:00',
'sale_price' => '0',
'price' => '520000',
'id' => '999039',
'code' => 'b125nh',
'shopid' => '4'
),
'10_5' => Array
(
'row' => '2',
'item' => 'dvd',
'count' => '1',
'sale_start_date' => '0000-00-00 00:00:00',
'sale_end_date' => '0000-00-00 00:00:00',
'sale_price' => '0',
'price' => '520000',
'id' => '999039',
'code' => 'b125nh',
'shopid' => '5'
)
)
)
);
You can see some items are with different shopid
and it's not sort.
How can delete, for example, those items with shopid=4
from my basket?