Skip to content

Commit

Permalink
Fixed hardcoded menu image dimension in storefront
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Jun 27, 2016
1 parent e348e6b commit d9258fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extensions/cart_module/controllers/Cart_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,16 @@ public function options() { // _updateModule() method to update
$data['menu_id'] = $this->input->get('menu_id');
$data['row_id'] = $this->input->get('row_id');
$data['menu_name'] = $menu_data['menu_name'];
$data['menu_name'] = $menu_data['menu_name'];
$data['menu_price'] = $this->currency->format($menu_data['menu_price']);
$data['description'] = $menu_data['menu_description'];
$data['quantities'] = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');
$data['quantity'] = (isset($quantity)) ? $quantity : 1;
$data['comment'] = isset($cart_item['comment']) ? $cart_item['comment'] : '';

$menu_photo = (!empty($menu_data['menu_photo'])) ? $menu_data['menu_photo'] : 'data/no_photo.png';
$data['menu_image'] = $this->Image_tool_model->resize($menu_photo, '154', '154');
$menu_images_w = (is_numeric($this->config->item('menu_images_w'))) ? $this->config->item('menu_images_w') : '154';
$menu_images_h = (is_numeric($this->config->item('menu_images_h'))) ? $this->config->item('menu_images_h') : '154';
$data['menu_image'] = $this->Image_tool_model->resize($menu_photo, $menu_images_w, $menu_images_h);

$data['cart_option_value_ids'] = (!empty($cart_item['options'])) ?
$this->cart->product_options_ids($this->input->get('row_id')) : array();
Expand Down
4 changes: 4 additions & 0 deletions extensions/cart_module/views/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,8 @@ border-radius: 3px;
}
#cart-buttons .order-total {
font-weight: bold;
}

.modal-menu-options .media-object {
width: 150px;
}

0 comments on commit d9258fa

Please sign in to comment.