handling per-item shipping dropdowns in js

This commit is contained in:
Paul Driver 2010-05-03 16:46:11 -07:00
parent ec2d6a85e5
commit e26723f526
2 changed files with 469 additions and 237 deletions

View file

@ -848,6 +848,25 @@ sub www_ajaxPrices {
#-------------------------------------------------------------------
=head2 www_ajaxSetCartItemShippingId
Sets the shippingAddressId for a particular cartItem
=cut
sub www_ajaxSetCartItemShippingId {
my $self = shift;
my $session = $self->session;
my $form = $session->form;
my $item = $self->getItem($form->get('itemId'));
my $address = $form->get('addressId') || undef;
$item && $item->update({ shippingAddressId => $address });
$session->http->setMimeType('text/plain');
return 'ok';
}
#-------------------------------------------------------------------
=head2 www_lookupPosUser ( )
Adds a Point of Sale user to the cart.