Revision 356

Date:
2013/05/31 19:55:50
Author:
ahitrov
Revision Log:
Order form bug - some fields are occasionally gone empty
Basket special_price field misspelling in Coupon price counting
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/comps/contenido/webshop/components/order_form.msn

     
    61 61 my $field = $prop->{attr};
    62 62 next if ($prop->{hidden} == 1) || ($prop->{type} eq 'external');
    63 63 if ( $context eq 'facil' ) {
    64 next unless $prop->{$context.'show'} || $prop->{$context."edit"};
    64 unless ( $prop->{$context.'show'} || $prop->{$context."edit"} ) {
    65 $prop->{temp_hidden} = 1;
    66 next;
    67 } else {
    68 $prop->{temp_hidden} = 0;
    69 }
    65 70 } elsif ( $context eq 'post' ) {
    66 next unless $prop->{$context.'show'} || $prop->{$context."edit"};
    71 unless ( $prop->{$context.'show'} || $prop->{$context."edit"} ) {
    72 $prop->{temp_hidden} = 1;
    73 next;
    74 } else {
    75 $prop->{temp_hidden} = 0;
    76 }
    67 77 } else {
    68 next if $prop->{manager_hidden};
    78 if ( $prop->{manager_hidden} ) {
    79 $prop->{temp_hidden} = 1;
    80 next;
    81 } else {
    82 $prop->{temp_hidden} = 0;
    83 }
    69 84 }
    70 85
    71 86 </%perl>
     
    85 100 </table>
    86 101 </td></tr>
    87 102 % if ( ($context && $prop->{$context.'show'}) || $prop->{manshow} ) {
    103 % $prop->{temp_hidden} = 1;
    88 104 % if ( exists $prop->{lookup_opts} ) {
    89 105 % my $doc = $keeper->get_document_by_id( $object->$field, class => $prop->{lookup_opts}{class} );
    90 106 <tr><td><% $doc->name %></td></tr>
     
    95 111 <tr><td><% $object->$field %></td></tr>
    96 112 % }
    97 113 % } else {
    114 % $prop->{temp_hidden} = 0;
    98 115 % if ($prop->{type} eq 'parent') {
    99 116 <tr><td><& "/contenido/components/inputs/$prop->{type}.msn", prop => $prop, object=>$object, options=>$options, name => $prop->{attr}, check => ($object->{$prop->{attr} } || $prop->{default} || $sect_id ), id => $object->id() &></td></tr>
    100 117 % } elsif( ( $prop->{type} ne 'flag' ) && ($prop->{type} ne 'checkbox') ) {
     
    107 124
    108 125 % for (0..$#properties) {
    109 126 % my $prop = $properties[$_];
    110 % next if ($prop->{hidden} != 1);
    127 % next if $prop->{hidden} != 1 && $prop->{temp_hidden} != 1;
    128 % next if $prop->{attr} eq 'sections';
    111 129 <input type="hidden" name="<% $prop->{attr} %>" value="<% html_escape($object->{ $prop->{attr} }) %>">
    112 130 % }
    113 131 <input type="hidden" name="sect_id" value="<% $sect_id %>">
  • utf8/plugins/webshop/lib/webshop/Coupon.pm

     
    120 120 my $found_sum = 0;
    121 121 foreach my $bi ( @$basket ) {
    122 122 warn "BASKET: Item id [".$bi->item_id."]\n";
    123 next unless $bi->price_special;
    123 next unless $bi->special_price;
    124 124 foreach ( @$items) {
    125 125 warn "BASKET: Item [".$_->name."] id [".$_->id."]\n";
    126 126 if ( $bi->item_id == $_->id ) {
  • utf8/plugins/webshop/lib/webshop/Order.pm

     
    117 117 return 'webshop::SQL::Order';
    118 118 }
    119 119
    120 sub table_links
    121 {
    122 return [
    123 { name => 'Корзина', class => 'webshop::Basket', filter => 'order_id', field => 'order_id' },
    124 ];
    125 }
    120 126
    127
    121 128 sub post_delete
    122 129 {
    123 130 my $self = shift;