View Cart to be Identical with Cart in Checkout

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #175473

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6

Hello, there.

Good evening!

I have 2 questions in the same area:
1) a) please could you let me know how I can customise the "View Cart" display to be identical to the "Cart View" in the Checkout process?
b) in the "View Cart" display, how to allow the customer to update the quantity (by keying it in and by and also having the "+" and "-" symbols - see question 2) below)?

2) in the "Cart View" in the Checkout process, how to have the "+" and "-" to update the quantity?

Thanks.

Take care!

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #175478

Hi,

To edit the layout of the "View Cart" you have to edit the view "cart / showcart" via the menu Display > Views.
For the cart in the checkout, it's the view "checkout / cart".

Here is documentation to customize the display:
hikashop.com/support/support/documentati...ize-the-display.html

To add the "+" "-", it will require html to add the symbols and JavaScript to update and submit the form to save the changes, so Javascript knowledges are required.

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

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #175962

Hello, Xavier.

Good evening!

I want the "View Cart" table to look and behave exactly like the Cart in the Checkout view; i.e. have the same columns and the content of the columns to look and behave identically.

What is the quickest way to achieve this? I tried to copy "checkout/cart.php" to "cart/showcart.php" but (obviously) it didn't work.

What needs to be done after copying "checkout/cart.php" to "cart/showcart.php" to make it work?

The reason I am trying to do this is to minimise duplication of work. I had hitherto started moving columns and then discovered that the unit price display in both views are different when multi-currency is involved; i.e. "checkout/cart.php" displays both currencies and "cart/showcart.php" doesn't.

Please could you let me know what needs to be done to after copying checkout/cart.php to cart/showcart.php?

Thanks.

Take care!

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

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #175983

Hello,
The solution won't be to copy the "checkout/cart.php" on the "cart/showcart.php" file, you'll have to add the "+" "-", and as xavier said it will require html to add the symbols and JavaScript to update and submit the form to save the changes, so Javascript knowledge are required.

The following user(s) said Thank You: Ed_Hika

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

  • Posts: 109
  • Thank you received: 5
10 years 9 months ago #176105

Hello, Mohamed Thelji.

Good evening!

Thanks for your reply. I am not just referring to the problem of the "+", "-" symbols. Those symbols are neither present in the "View Cart" nor the "Cart in the Checkout" display. I will have to add them as Xavier suggested to both of these views.

The main point I was trying to address is that these two views are distinctly different. I wonder why they have to be so different. Not just in terms of the look and feel but also in the underlying code.

So, for the requirements for someone like me who wants the two cart displays to be in sync, one has to duplicate a lot of code (and in doing so, figure out how to do it). I am not strong on php and can just about figure my way around (with a lot of effort).

The points I am raising (in order to sync the "View Cart" and "Cart in the Checkout" views are:

a) moving colums about for these 2 views to be in sync (this I can do)
b) style the contents (e.g. one set of headers are in bold and the other not while some contents are in italics and others not) (these I can do)
c) ensure the column headers have the same text (this I can do)
d) allow the user to update the quantity column in the "View Cart" display (this is allowed in the "Cart in the Checkout" view) - I can't seem to get this to work yet and may need help
e) display the Unit Price and Total Price in default and selected currencies (one view displays this and the other doesn't) - I need help with this

Seeing that there are a few discrepancies between both views, I thought the best way is to be able to copy the "checkout/cart.php" on the "cart/showcart.php" file and make some modifications to get it to work.

If you think this is not the best solution, please could you help me with the code for d) and e) above?

Thanks.

Take care!

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

  • Posts: 84220
  • Thank you received: 13673
  • MODERATOR
10 years 9 months ago #176125

Hi,

Thank you for your feedback. We'll take your suggestions into account in order to make both views more consistent.

Copying the code from one view to the other is not a good idea. Both were not made for the same purpose. You'll break the view if you do that. The cart/showcart view file is to display a cart but also a wishlist, so it has extra code to handle both and to add additional fields. It also has to handle the form submission while the checkout/cart view has been made to be used inside the checkout.
Instead, modifying the cart/showcart.php view file so that it behaves more like the checkout/cart.php is what I recommend, like Mohamed said.

Regarding the quantity change not working, this is a bug of the current version. It will be fixed with next version to be released in a few days.
Regarding the price issue, I must say that I'm not familiar with the cart/showcart view so I don't know.
I'll assign this thread to Xavier so that he can answer you at the beginning of the week since he is the specialist of this matter.

The following user(s) said Thank You: Ed_Hika

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

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #176188

Hi,

I just edited the "cart/showcart" view and added another one for the price in order to have the same display than the cart in the checkout.

Now the columns have the same ordering, there is unit price and total price present, the quantity can be updated by clicking on a refresh button just next to the quantity field and a delete button is present.

So please wait until the next release to have this new version of the view. :)

The following user(s) said Thank You: Ed_Hika

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

  • Posts: 109
  • Thank you received: 5
10 years 9 months ago #176310

Excellent work, Hika Team. Well done!

Thanks for your responses and explanation.

Take care!

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

  • Posts: 2143
  • Thank you received: 747
10 years 9 months ago #176942

Xavier wrote: Hi,

I just edited the "cart/showcart" view and added another one for the price in order to have the same display than the cart in the checkout.

Now the columns have the same ordering, there is unit price and total price present, the quantity can be updated by clicking on a refresh button just next to the quantity field and a delete button is present.

So please wait until the next release to have this new version of the view. :)


Hi Xavier,

I'm on 2.3.4 downloaded Oct 21st, and I am enjoying the features as listed here by you. But I have different problems in the showcart view. I'm using the currency switcher, so if the user selects a currency other than the main currency, he sees prices generally as
price_in_chosen_currency (price_in_main_currency)
Which is okay. But here are the problems in showcart:

1. By default both prices are wrapped in the same span, though I managed to separate them in two spans by editing the listing_price.php. However, this doesn't affect the showcart view, unfortunately. What must I do to have the prices in separate spans or divs everywhere (except checkout cart) including showcart?

2. In showcart, the total price (tfoot, td with class="hika_show_cart_total_price") displays only in the chosen currency, no main currency showing. Which is unacceptable, of course. How to fix and display the total in the main currency, too?

Thanks in advance for your reply.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 10 years 9 months ago by lousyfool.

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

  • Posts: 2143
  • Thank you received: 747
10 years 9 months ago #176947

Small addition:

3. Now there are two delete icons per item in cart, one next to the quantity input, and another at the end of the line in its own td. I have no trouble removing one, but am sure that most other users would be happy to see only one by default. ;)

Cheers!


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #177084

Hi,

Many thanks for the feedback. I have added all of these things on my TODO list.
So I will do the changes as soon as possible :)

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

  • Posts: 109
  • Thank you received: 5
10 years 8 months ago #182367

Hello, Xavier and lousyfool.

Good evening!

Thank you for your efforts.

Any update on the changes? In particular, point 2 that lousyfool raised is very valid.

Take care!

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

  • Posts: 13201
  • Thank you received: 2322
10 years 8 months ago #182368

Hi,

Many changes have been made already, and few more comings, all of that should be available in the next release.

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

  • Posts: 109
  • Thank you received: 5
10 years 7 months ago #184117

Thanks, Xavier.

Looking forward to the changes.

Take care!

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

Time to create page: 0.106 seconds
Powered by Kunena Forum