Revision 241
- Date:
- 2012/09/11 16:45:11
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/webshop/lib/webshop/Basket.pm
12 12 }, 13 13 { 'attr' => 'articul', 'type' => 'string', 'rusname' => 'Артикул' }, 14 14 { 'attr' => 'colour', 'type' => 'string', 'rusname' => 'Цвет' }, 15 { 'attr' => 'size', 'type' => 'string', 'rusname' => 'Размер' }, 15 16 { 'attr' => 'discount_flag', 'type' => 'string', 'rusname' => 'Наличие скидки' }, 16 17 { 'attr' => 'discount', 'type' => 'text', 'rusname' => 'Формула скидки', rows => 15 }, 17 18 ) -
utf8/plugins/webshop/lib/webshop/Keeper.pm
36 36 my $found = 0; 37 37 if ( @items ) { 38 38 foreach my $item ( @items ) { 39 if ( $object->item_id == $item->item_id && $object->color_id == $item->color_id ) { 39 if ( $object->item_id == $item->item_id && $object->color_id == $item->color_id && $object->size_id == $item->size_id ) { 40 40 $item->number($item->number + $object->number); 41 41 $item->status(1); 42 42 $item->store; -
utf8/plugins/webshop/lib/webshop/SQL/Basket.pm
26 26 _s_filter 27 27 28 28 _color_filter 29 _size_filter 29 30 _session_filter 30 31 _uid_filter 31 32 _order_id_filter … … 124 125 'db_field' => 'color_id', 125 126 'db_type' => 'integer', 126 127 }, 128 { # ID размера 129 'attr' => 'size_id', 130 'type' => 'integer', 131 'rusname' => 'ID размера', 132 'hidden' => 1, 133 'db_field' => 'size_id', 134 'db_type' => 'integer', 135 }, 127 136 { # ID Сессии 128 137 'attr' => 'session', 129 138 'type' => 'string', … … 166 175 return &SQL::Common::_generic_int_filter('d.color_id', $opts{color}); 167 176 } 168 177 178 sub _size_filter { 179 my ($self,%opts)=@_; 180 return undef unless ( exists $opts{size} ); 181 return &SQL::Common::_generic_int_filter('d.size_id', $opts{size}); 182 } 183 169 184 sub _order_id_filter { 170 185 my ($self,%opts)=@_; 171 186 return undef unless ( exists $opts{order_id} ); -
utf8/plugins/webshop/sql/TOAST/basket.sql
12 12 item_table text, 13 13 order_id integer, 14 14 color_id integer, 15 size_id integer, 15 16 session text, 16 17 number integer default 0, 17 18 price float default 0,