Move "Add to cart" button

  • Posts: 37
  • Thank you received: 0
13 years 2 weeks ago #29952

Good morning,

I have a store where we are listing programs at our local parks department, such as Pre-School.

I need to be able to have a registration form that only some programs need fill out. Got that, the custom fields are in the item table and I have them assigned to a category that only the programs requiring registration information are part of. Pre-school sees the registration fields and Volleyball does not.

Now, when I go the product page the custom fields are displayed but they are at the bottom of the product page (I moved them in the view). Even though I have the fields set for "required" you can still click "Add to cart" and move to checkout. Without having to complete the custom fields.

I looked through the views and did not see any easy way to move the "Add to cart" form. Ideally I would like to have the product image, product description, the custom fields, and then the "Add to cart" button.

Not sure if there is any easy/simple way to do that, and I am still perplexed as to why the fields are set to required and they do not seem to stop the check out process.

Thanks,

DAve

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 1 week ago #29970

Hi,

They should indeed stop the checkout.
If you revert your modifications (there is a delete icon for that in the Display>Views listing), does it work ?
If yes, then it means that the problem comes from the way you modified that view.
If no, it means that you probably have some javascript errors on your page.

The add to cart button is displayed in that file by the code:
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"><?php
$this->row =& $this->element;
$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this->row->product_id.'\',field,1'.$form.'); } else { return false; }';
$this->setLayout('quantity');
echo $this->loadTemplate();
?>
</div>

So if you move that code, it will move the button.

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

  • Posts: 37
  • Thank you received: 0
13 years 1 week ago #30022

Yep, I figured out what I did wrong with the required fields, but the add to cart button eluded me until you showed the code. Thank you.

Is it possible to have an entire page, a separate step, for the custom fields and have them tied to only a specific category? Once I show the program director what I had they wanted to put the complete registration package online and have it completed at registration.

Thanks,

DAve

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 1 week ago #30024

You can have a separate step of the checkout for custom fields of the type 'order' by configuring the checkout workflow option of the configuration.
However, these custom fields are linked to the order, not to products, so you can't tie them to categories. You can do that for custom fields of the table "item" but they will be on the product page directly.

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

  • Posts: 37
  • Thank you received: 0
13 years 1 week ago #30027

Bummer, that would have been sweet. I will see about putting the custom fields back to the bottom of the product page.

Thanks!

DAve

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

Time to create page: 0.063 seconds
Powered by Kunena Forum