Dynamic checkout page

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
5 years 6 months ago #306919

-- HikaShop version -- : 4.0.2

Hi

I have two questions.

Question 1: We sell online courses as a result an individual can only register once for a course, is it possible to as soon as a person clicks the "Add to Cart" change the button into a proceed to checkout button.

Question 2: Is it possible to setup the checkout page to look like the attached images, so that if they use a phone or tablet the sections are listed below one another the way it currently looks, but that on a larger screen the sections are listed next to each other.

Laptop



Phone

Attachments:

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
5 years 6 months ago #306927

Hi,

For both questions, it's possible but will require some custom view overrides with some PHP code. Nothing to fancy, but it still requires a bit of development.
If you would like us to work on that for you, you can use our contact form to request a quote on that job:
www.hikashop.com/support/contact-us.html
Make sure you include a link to this thread in your message.

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

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
5 years 5 months ago #307225

Hi Nicolas

I managed to sort the column layout out it was actually surprisingly easy to do, I will post the code once I have got it working completely.

You said changing the "Add to Cart" button to a "Proceed to checkout" button once an individual has clicked on it should not be to difficult to do, could you please give me some guidance as to how I would achieve this

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307232

Hi,

Note that next version of HikaShop will have a system to handle multiple columns layout in the checkout:
monosnap.com/file/ah3NB1A4WHAOP514RRUgrfpzxiMLdH
monosnap.com/file/JvkLJkrsIJzbmQCAzzE3NhgOCyWlFt

Regarding the add to cart buttons, if you want to change the text of the button to "proceed to checkout" instead, you can use a translation override:
www.hikashop.com/download/languages.html#modify

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

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
5 years 5 months ago #307266

Hi Nicolas

I don't want to simply change the text, what I would like is a button that states "Add to Cart" when some one clicks on it the product is added to the cart and the button text for that product changes to "Proceed to checkout" or "View Cart" the other products must still state "Add to cart" until they have been added if the person then clicks on the button again it proceeds to checkout.

Thanks for letting me know about the multi column setup, do you have any idea when the next version will be released.

Last edit: 5 years 5 months ago by SnoozeULooze.co.za.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307269

Hi,

1. So there are two things then:
- You can edit the view files displaying the add to cart buttons. For example product/quantity.php for the product page.
There, you'll want to change the code displaying the add to cart button:

if($add_to_cart) {
?>
	<a class="<?php echo $css_button . ' ' . $css_button_cart; ?>" href="<?php echo hikashop_completeLink('product&task=updatecart&add=1'); ?>" onclick="if(window.hikashop.addToCart) { return window.hikashop.addToCart(this); }" data-addTo-div="<?php echo $this->row->formName; ?>" data-addToCart="list" data-addTo-class="add_in_progress"><span><?php
		echo JText::_('ADD_TO_CART');
	?></span></a>
<?php
	}
You'll have to get the cart and loop through the products in it to check if the product is already in there. If no, then you can display the normal add to cart link, and if yes, you can display a link to the checkout. That way when you display a page with that product on it, and the product in already in the cart, you'll get the "proceed to checkout" button instead.
www.hikashop.com/forum/wishlist/897446-c...n-status.html#306467
- If you want the link to dynamically change after clicking on it (without any full page reload), it will require also having some javascript added to the onclick of the add to cart link to change its text, its onclick and its href to point to the checkout page.

2. Hard to say for now. We're still in the middle of the development phase for the next release. Ideally, I would like to release it before August. It won't be in the next 2 weeks.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum