Skip to main content

Unit Pricing in Cart

More
15 years 2 months ago #22216 by Robertson
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.

More
15 years 2 months ago #22225 by nicolas
Replied by nicolas on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22226 by Robertson
Replied by Robertson on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22229 by nicolas
Replied by nicolas on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22231 by Robertson
Replied by Robertson on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22232 by Robertson
Replied by Robertson on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22235 by nicolas
Replied by nicolas on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago - 15 years 2 months ago #22239 by Robertson
Replied by Robertson on topic Re: Unit Pricing in Cart
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??
Last edit: 15 years 2 months ago by Robertson.

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

More
15 years 2 months ago #22242 by nicolas
Replied by nicolas on topic Re: Unit Pricing in Cart
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.

More
15 years 2 months ago #22248 by Robertson
Replied by Robertson on topic Re: Unit Pricing in Cart
Absolutely perfect. Thank you so much!

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

Time to create page: 0.213 seconds
Powered by Kunena Forum