Characteristic Dynamic Display

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 2 weeks ago #331241

-- HikaShop version -- : 4.4.1

HikaShop 4.4.1 - Release date : February, 12 2020

Under "New Features" is the following. Can you please explain the below a bit more? It may help with an issue that I had brought up previously.

The characteristic dynamic display system can now work for one characteristic only based on how you configured the "Characteristics dynamic display" setting in the HikaShop configuration.


Thanks!

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 2 weeks ago #331246

Hi,

On the product page for a product with only one characteristic, you had previously a dropdown with one value per characteristic value with the one linked to the default variant selected by default.
And that regardless of this "Characteristics dynamic display" setting.
Now, if that option is set to "always", you'll have an extra "please select" choice in the characteristic dropdown so that the customer will have to select something in that dropdown before seeing the add to cart button to purchase the product.

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 2 weeks ago #331286

I was testing it out and I love the idea... but I'm thinking that when the button is NOT showing customers may think that that item is not available.

Is it possible to still have the button display but maybe have a message like the attached display when the customer click on the button without selecting a size. Most sites have the "add to cart" button visible.

[/u]

Thanks!!

Attachments:

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 1 week ago #331312

Hi,

You can do that with a translation override.
For example:

ADD_TO_CART_AVAILABLE_AFTER_CHARACTERISTIC_SELECTION="<p class='selection_warning'>Please select a size before adding to bag</p><input type='text' value='1'/><a class='hikabtn' onclick='alert(\'Please make a selection first\'); return false;'>Add to cart</a>"

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 5 days ago #331500

Thanks for the above but I'm missing something as it's not working.

1) I have "Characteristics dynamic display = For two characteristics and more"

2) In the /language/overrides/en-GB.override.ini I add the code you provided:

ADD_TO_CART_AVAILABLE_AFTER_CHARACTERISTIC_SELECTION="<p class='selection_warning'>Please select a size before adding to bag</p><input type='text' value='1'/><a class='hikabtn' onclick='alert(\'Please make a selection first\'); return false;'>Add to cart</a>"

The button is showing but when I click on it I don't get the alert and am still able to add items to the cart.

What am I missing please?

Thanks!

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 4 days ago #331506

HI,

Can you provide a link to a page with the button so that we can check what's going on ?

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 4 days ago #331534

Hi Nicolas,

I sent the link privately. Thanks!!

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 4 days ago #331535

Hi,

You've configured the setting "Characteristics dynamic display" to "For two characteristics and more". So the dynamic display will only happen if the product has two characteristics or more.
But the link you provided for the product "SISTER FASHION Cotton Blend Brown Leopard Print Off Shoulder Top" has only one characteristic, so the translation override is not used there.
I tried to search for a product with more than 1 characteristic but I couldn't find one.
As I said here ( www.hikashop.com/forum/install-update/90...-display.html#331246 ) if you want the dynamic display to happen for products with one characteristic you need to select "always" in that "Characteristics dynamic display" setting.

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 4 days ago #331538

When I change "Characteristics dynamic display" to "Always", the button is no longer showing (if you look a the URL I sent you will see that).

As per my post via the link below, I would like the button to display but the user will be prompted to select a size if they click on the "Add to Cart" button before selecting a size. What do I do next?

www.hikashop.com/forum/install-update/90...-display.html#331286

Thanks!

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 3 days ago #331541

Hi,

If you don't see the text "add to cart button available after characteristic selection" on the product page with the "Characteristics dynamic display" setting set to "Always", it means that you probably have a view override on product / show_default.php which is missing the code:

<div id="hikashop_product_quantity_alt" class="hikashop_product_quantity_main_alt" style="display:none;">
			<?php echo JText::_('ADD_TO_CART_AVAILABLE_AFTER_CHARACTERISTIC_SELECTION'); ?>
		</div>
which was added specifically for that.
That would also explain why the translation override doesn't do anything.
So please check your view overrides.

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
1 month 3 days ago #331568

Hi Nicolas,

I think we are getting there. I removed the override and I see the message that was added to the language file but it's not working properly.

1) When you first go to the page, there is a box with a number in it and the "add to cart" button next to it but when I click on a size a different "add to cart" button is displaying.

2) Also, how can I get back the dropdown and the wishlist button that I have in the "Before" picture?

Thanks!

Attachments:

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

  • Posts: 72738
  • Thank you received: 11091
  • MODERATOR
1 month 2 days ago #331573

Hi,

You need to adapt the translation override to the situation. I just gave a generic example.
For example, I can see that you're using a select quantity input field. So instead of

<input type='text' value='1'/>
which displays an input field with a 1, you could use:
<select><option value='1'>1</option></select>
And for the wishlist button, you could add:
<a href='#' class='hikabtn hikawishlist' onclick='alert(\'Please make a selection first\'); return false;'> </a>
It's really just a matter of adapting the translation override to what you have on your product page.

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

  • Posts: 860
  • Thank you received: 10
  • Hikashop Essential
3 weeks 6 days ago #331716

Just wanted to say that I really appreciate your help with this. It appears to be working beautifully now.

Thanks again!! :)

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

Time to create page: 0.086 seconds
Powered by Kunena Forum