Custom Fields

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #42539

Hi,

I have a product on my shop which can be customised by the user to have text engraved on to it.

I have sorted the custom fields so the user can enter the text that they want engraved but i would like to also have a checkbox that appears on the checkout page to confirm they have proof read the text. Is it possible to assign this checkbox to a category given it is in the 'order' table.

Cheers

CHRIS

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

  • Posts: 83103
  • Thank you received: 13417
  • MODERATOR
12 years 10 months ago #42683

Hi,

No, you cannot restrict custom order fields to categories. That's because you could have several products in the cart from several categories, so the system wouldn't know what to do.
Maybe you could just add the "terms and conditions" view to your checkout workflow option of the Checkout tab of the configuration ?
That way, you could have something global to your website while still explaining in the T&C that by doing this he agrees that he has proof read the text ?

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #42736

Hi Nicolas,

Thanks for the response.

Just wondering - if i was to create some kind of Review / Preview type page and then add the custom field to that i could put it into the item table then assign it to a category and it would then appear on the check out page. The workflow would be something like this:

Product Page (customer enters desired text) -> Review Page (this displays the text entered previously, also has the checkbox) -> Checkout Page.

This is quite a bit of work though and would need some serious custom coding i expect. For now i will use the Terms and Conditions, my client is just aware that lots of people just tick the box to proceed.

Cheers

CHRIS

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

  • Posts: 83103
  • Thank you received: 13417
  • MODERATOR
12 years 10 months ago #42738

Yes, that would be a solution but as you say it, there is some serious coding needed to do that.

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43063

Hi Nicolas,

I have been doing some thinking and would like to add the Review Page into the checkout flow. Are you able to help me with the coding of this?

Cheers

CHRIS

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43364

Hi Nicolas,

I have managed to do most of this myself. I have coded it so that when a user is on the checkout page they click 'Next' and normally this would take them to the payment page (Paypal). I have altered the code slightly so that it opens a modal window instead and in there is where i would like to put the following details:

Product Name, Any custom fields for that product and any options/variants the user has chosen.

Is this possible?

Chris

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43393

Hi Nicolas,

I am making progress with this. I have managed to get the modal popup to display the cart quantity and the product name. I am still struggling with custom fields but will get there in the end.

One issue i have come across is that if the product has a variant (used to allow the customer to choose a font for the engraving) I get two products in the modal popup one has a quantity of 0 and the other has a quantity of 1. Obviously the quantity 1 is correct but i am not sure where the quantity 0 is coming from.

This only happens to products that have variants.

The code i used to display this in the modal is:

<p>
          <?php echo '<b>'.'PRODUCT DETAILS'.'</b>'.'</br>'; ?>
          <?php foreach ($this->rows as $item) {
          echo sprintf($item->cart_product_quantity . '&nbsp' . $item->product_name); }?>
        </p>

Any help much appreciated

CHRIS

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #43394

Hi,

I managed to solve the odd quantity error using this code:

if ($item->cart_product_quantity == 0)continue;
just after the foreach.

Just need to sort out displaying the custom fields and variant name so that it is on a separate line and i am all done.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum