Get post values between checkout steps

  • Posts: 34
  • Thank you received: 1
  • Hikashop Business
4 years 4 months ago #314194

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.14
-- PHP version -- : 7.2.26
-- Browser(s) name and version -- : every browser
-- Error-message(debug-mod must be tuned on) -- : No error message

Hi,

I have two questions that are related to each other:

  1. Is there a way to use the "restrictions / display limited to" function when the two fields are in 2 different steps in the checkout-process?
  2. Is it possible to get the input-values of custom fields in a previous step in the checkout process in javascript?
    I want to display certain input-fields to hide and show, depending on previous selected values.

Thanks.

Best regards,
Peter

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

  • Posts: 12953
  • Thank you received: 1778
4 years 4 months ago #314197

Hello Peter,

1. The "Restrictions / Display limited to" option was originally developed for custom fields that are on the same view / checkout step

2. You actually can retrieve custom fields values by checking the form data after every step.

Kind regards,
Mohamed.

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

  • Posts: 34
  • Thank you received: 1
  • Hikashop Business
4 years 3 months ago #314238

Hi Mohammed,

Thanks for the reply.

  • I can imagine that there are situations that you would like to display certain (custom) fields depending on values in a previous step. Maybe a new feature in an upcoming release?
  • How can I retrieve these values? I tried to get the values wit a php $_GET or $_POST but they both are empty. The POST cid-1 is directly going to a GET cid-2 with a 303-status.

Regards,
Peter

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

  • Posts: 12953
  • Thank you received: 1778
4 years 3 months ago #314247

Hello Peter,

Well you can actually retrieve order custom fields values by directly checking your cart data :

		// Get the current cart
		$checkoutHelper = hikashopCheckoutHelper::get();
		$cart = $checkoutHelper->getCart();

Kind regards,
Mohamed.

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

  • Posts: 34
  • Thank you received: 1
  • Hikashop Business
4 years 3 months ago #314285

Thank you Mohammed, this was exactly what I was looking for.

Kind regars, and a happy 2020!
Peter

The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.091 seconds
Powered by Kunena Forum