temporary checkout redirect

  • Posts: 490
  • Thank you received: 2
7 years 10 months ago #244746

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi

is it possible to temporarily disable the checkout process? i would like site users to view the site but not checkout as it is not yet finish. Can i disable or redirect it temporarily to a page?

thanks again

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
7 years 10 months ago #244747

Hi,

Yes. Edit the file "step" of the view "checkout" via the menu Display>Views add add such code at the top:

Checkout is disabled<?php return; ?>

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

  • Posts: 490
  • Thank you received: 2
7 years 10 months ago #244818

hi

can we redirect it to a page? or article?

thanks

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

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

Hello,

Using some code like this will probably do the job :

$app = JFactory::getApplication();
$ App-> redirect ( 'Your_URL');

The following user(s) said Thank You: ronron

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

  • Posts: 490
  • Thank you received: 2
7 years 10 months ago #245761

hi

Its working .

Anothe question of mine. How can u disable checkout for products or suppliers based on a custom field.

Example:

custom field = allow checkout = yes button
Do not Allow = No button

So if do not allow is checked / ticked it will be redirected to the page i created.

thanks

Last edit: 7 years 10 months ago by ronron.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
7 years 10 months ago #245807

Hi,

You need to load the list of products of the cart, loop through them to check the value of a custom product field for each one of them:
www.hikashop.com/support/documentation/6...umentation.html#code

The following user(s) said Thank You: ronron

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

Time to create page: 0.071 seconds
Powered by Kunena Forum