Unit Pricing in Cart

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22216

I'm sure that i'm overlooking something simple, but how do I add unit price display to the cart? I've looked everywhere and searched the forum and docs. On a deadline here and would appreciate any input.

Thanks

Aubrey

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22225

There is no option for that and no one requested that so far. The problem is that the cart module is usually displayed on the side and doesn't have enough space to display well so we removed that column in order to offer more space for the other columns.

If you want to add that column, you need to edit the file "cart" of the view "product" via the menu Display->Views and change the code in order to display that additional column.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22226

Thanks for the response. We are using the cart a little different so it will be helpful to have it. Should be able to add it.

Should i start another thread to ask about payment options? I would like to change the order of the options in checkout and have the top one default selected.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22229

The payment methods are displayed based on their ordering. You can change their ordering in the plugins manager of Joomla.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22231

Well of course... that's easy - thank you again. Support around here is exceptional!

On the previous question, I added this to the product cart view and it's showing the unit header, but the total and not the unit prices int that column:

In the table header:

<th id="hikashop_cart_product_price_title" class="hikashop_cart_product_price_title hikashop_cart_title">
<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>
</th>
After the product name </td>:

<td class="hikashop_cart_product_price_value">
<?php
$this->row=&$row;
$this->unit=true;
echo $this->loadTemplate();
?>
</td>

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22232

Also - I'm going to upgrade to business today to get the customer order fields - will the upgrade overwrite this type of view customization or the language file?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22235

The unit variable is not used in the listing_price file of the view product. It's only used in the listing_price file of the view checkout.
Thus, you need to port the code below from one to the other in order to do that:
if(!empty($this->unit) && isset($price->unit_price)){
$price =& $price->unit_price;
}

If you customize the views via the interface and that you customize your translations via the override area, you won't loose them when you update/upgrade HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22239

nicolas wrote:

if(!empty($this->unit) && isset($price->unit_price)){
$price =& $price->unit_price;
}


Okay, I added that to the product listing_price view, but now both the unit price column and the price column show the unit price??

Attachments:
Last edit: 13 years 3 months ago by Robertson.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 3 months ago #22242

Of course. You need to set $this->unit back to false after your code.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 3 months ago #22248

Absolutely perfect. Thank you so much!

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum