Choose options button not working without variants

  • Posts: 6
  • Thank you received: 0
12 years 10 months ago #36191

Hi,

After playing with the characteristics and options we have decided to create a product for each departure with an option for each rate (adult, senior, youth, child and transportation only). This allows us to automatically stop selling tours on a preset date without having to work with too many variants.

We're using the Hikashop Content Module to display our tours (products) within an article. Check pursuitadventure.ca/bow-valley/day-trip-to-sunshine-village for an example. Through the language file we have changed "Add to Cart" and "Choose Options" to "BOOK NOW".

The issue we are having is that if we do not add a variant to the main product, it gets added to the cart from the module instead of taking the client to the product page where they can choose the options. The work around has been to add a pointless variant to the product but this removes the "available stock" display from the module which we want to keep.

Any way to trigger the "Choose Options" button without adding a variant?

Also, how do we add the "Price with options" you have on the demo page to the product page?

Thanks for your help.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36228

Hi,


In that case, you should edit the file "listing_div" of the view "product" via the menu Display>Views and add the line:
$this->row->has_options = true;

after the line:
$this->row =& $row;

For the price display, you should turn on the option "show price" in the Display tab of the configuration.

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

  • Posts: 6
  • Thank you received: 0
12 years 10 months ago #36247

Hi,

Thanks for the quick reply and code. It worked.

I have the option to "show price" but I think the issue is because the main product is free. The pricing comes from the options. I tried putting the price of the main product to $100 and this worked fine. As soon as I change the price back to $0 I lose the price with options (they show fine in the cart I just can't get them on the product page).

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36286

Indeed if the price of the product is 0, the "price with options" won't show.
You'll need to replace the file components/com_hikashop/views/product/tmpl/show.php with the one in the archive enclosed and it should then work.

File Attachment:

File Name: show-20120122.zip
File Size:4 KB

Attachments:

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

  • Posts: 6
  • Thank you received: 0
12 years 10 months ago #36290

Thanks Nicolas. That worked great!

One last issue in regards to the free products. I have the options grouped with the products (gives a clearer view for our clients at checkout). If I remove the product from the cart, the product and options disappear but the total price still reflects the value of the options.

Everything works fine if the primary product has a price, just not for a free product.

Any suggestions?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36328

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

  • Posts: 6
  • Thank you received: 0
12 years 10 months ago #36342

Thanks! That solved it.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum