Skip to main content

Sold Out Message

More
11 years 6 months ago - 11 years 6 months ago #196190 by MyWorld
Sold Out Message was created by MyWorld
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0

I had addressed this in an older version of Hikashop and am hoping that there is an easier way to do this in the current version.

When an item is sold a message is displayed when the user clicks on the button to select a size. The issue is, when you first go to the item, if the first size listed, which is usually "small" is sold out, it makes it appear that that product is sold out. Please see pic #1.

To get around this I have to add another radio button with the quantity "1" and hide that button so that the message does not show when the user first get to that page.

I am thinking that there must be an easier way to do this or I'm hoping that you can help me find an easier way to do this so that I do not have to add that extra radio button to all the products just to get this to work properly.

I would like that message to show ONLY when the user clicks on the button. Or better yet make the button disabled or have a "sold out" image overlay the button, as per pic #2, or do you have any suggestions?

Please see attached pics.
Last edit: 11 years 6 months ago by MyWorld.

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

More
11 years 6 months ago #196213 by nicolas
Replied by nicolas on topic Sold Out Message
Hi,

The solution you had used previously is still possible.
Alternatively, you can change the way the characteristics selection display in order to not have the issue.
If you select the choice "list" for the "characteristics display method" option of the HikaShop configuration, it will actually display a table of all the in stock variants and that way you don't have that problem anymore.

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

More
11 years 6 months ago #196550 by MyWorld
Replied by MyWorld on topic Sold Out Message
Hi Nicolas,

I looked at the list option but it's not as clean as the radio buttons and it's making the page longer. In addition, when I choose the list option for some reason the product description disappear.

I'm not lazy but I spent a lot of time making these buttons work as I wanted them :( Is there no possibility to add some code to prevent it from defaulting to the first radio button?

When an item is sold a message is displayed when the user clicks on the button to select a size. The issue is, when you first go to the item, if the first size listed, which is usually "small" is sold out, it makes it appear that that product is sold out. Please see pic #1.


I would really like to see if I can continue to use the radio buttons.

Thanks!

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

More
11 years 6 months ago #196554 by nicolas
Replied by nicolas on topic Sold Out Message
Hi,

The only solution I know to do what you want is the solution you're already using.
Otherwise it would require almost a complete rewrite of the characteristics data refresh system.
If you have a PHP/JS programmer on your end who knows what he is doing and has a few weeks in front of him, them it's possible, but without such heavy code modifications the system isn't made to support that.

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

More
11 years 6 months ago #196708 by MyWorld
Replied by MyWorld on topic Sold Out Message
OK, option 2 then :(

The first issue is why does the product description disappear when I switch it to use "List" option?

Will PM the URL so that you can see what I mean.

Thanks!

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

More
11 years 6 months ago #196719 by MyWorld
Replied by MyWorld on topic Sold Out Message
Can you also please let me know what "view" the circled are in the attachment is in please. I've been going through them but cannot find it.

Thanks!

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

More
11 years 6 months ago #196728 by nicolas
Replied by nicolas on topic Sold Out Message
Hi,

From what I can see, the issue comes from the customization that was done on the product page layout (probably from an old version of HikaShop where the "list" mode didn't exist).

It's the file show_block_characteristics which handles the display of the variants listing.

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

More
11 years 6 months ago #196813 by MyWorld
Replied by MyWorld on topic Sold Out Message
So just to make sure that I am doing this correctly..

Do I copy the product template file that I need from any of the templates, except the one that I am using? Would that give me the newer version which includes the list mode?

Thanks!

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

More
11 years 6 months ago #196872 by Jerome
Replied by Jerome on topic Sold Out Message
Hi,

For sure the best is to make a copy of your current overrides.
You will find them in your template folder, under "html/com_hikashop/".
Then you will be able to remove some view override and be safe that you won't loose anything (because you will be able to restore the override if required).

But the idea is that yes, to remove some old overrides which are generating the issue due to a little incompatibility.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 6 months ago #197346 by MyWorld
Replied by MyWorld on topic Sold Out Message
Thanks Jerome.

The variants are at the bottom of the product, how can I get it to go below the price, the way I have it now on the live site.

Please see attached pics. Thanks

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

More
11 years 6 months ago #197376 by nicolas
Replied by nicolas on topic Sold Out Message
Hi,

You can remove the code:
Code:
if($this->params->get('characteristic_display') == 'list') { $this->setLayout('show_block_characteristic'); echo $this->loadTemplate(); }
from the "show" file and move it to the "show_default" file of the view "product" before the code:
Code:
if($this->params->get('characteristic_display') != 'list') { $this->setLayout('show_block_characteristic'); echo $this->loadTemplate(); ?> <br /> <?php }

You also need to remove the line:
<form action="<?php echo hikashop_completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form" enctype="multipart/form-data">
and the line:
</form>
from the "show" view file.

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

More
11 years 5 months ago #198454 by MyWorld
Replied by MyWorld on topic Sold Out Message
Hi Nicolas,

Looks like something when wrong moving the code.

When I click on "add to wishlist" it adds the item to the cart instead of the wishlist

I will PM you the link that I am working on right now so that you can see what I mean.

Thanks!!

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

More
11 years 5 months ago #198523 by Xavier
Replied by Xavier on topic Sold Out Message
Hi,

In the view "product / quantity", please replace:
Code:
$wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';
By:
Code:
$wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ document.getElementById("hikashop_cart_type_'.(int)@$this->row->product_id.'_0").value = "wishlist"; return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }'; $cartAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ document.getElementById("hikashop_cart_type_'.(int)@$this->row->product_id.'_0").value = "cart"; return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'cart\','.$module_id.'); } else { return false; }';

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

More
11 years 3 months ago #204113 by MyWorld
Replied by MyWorld on topic Sold Out Message
Just another question from the client...

I was wondering if it is possible to have a "sold out" badge displayed ONLY when ALL items are sold out for a particular product?

Thanks!

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

More
11 years 3 months ago #204176 by Jerome
Replied by Jerome on topic Sold Out Message
Hi,

I'm afraid that the badge system does not allow to check the product stock of all variants.
So it will require some modifications/improvements in the HikaShop core.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 3 months ago #204384 by MyWorld
Replied by MyWorld on topic Sold Out Message
OK. Thank you :(

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

More
11 years 3 months ago #204416 by nicolas
Replied by nicolas on topic Sold Out Message
It's actually possible.
It requires that you enter the total quantity of all the variants of the product in the main product quantity field. The system will update it as well as the variant quantity when you buy a variant and thus, when it reaches 0, it will mean that all the variants of the product also reached 0.
And then, you can have your badge based itself on that maint product quantity to display a sold out icon for products with a quantity of 0

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

More
11 years 3 months ago #204549 by MyWorld
Replied by MyWorld on topic Sold Out Message
I think I may be missing a step...

It requires that you enter the total quantity of all the variants of the product in the main product quantity field. The system will update it as well as the variant quantity when you buy a variant and thus, when it reaches 0, it will mean that all the variants of the product also reached 0.
I did this.

And then, you can have your badge based itself on that maint product quantity to display a sold out icon for products with a quantity of 0
I set the badge quantity to 0

What is unclear is I don't want the size to display on the page if that size is sold out. So if I have S M L and S is sold out then it would only show M and L. But when ALL sizes are sold out it shows the sold out badge and of course none of the sizes.

By choosing "Display out of stock products = YES" the size is still showing on the site.

Hope I didn't confuse you. Thanks!

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

More
11 years 3 months ago #204552 by nicolas
Replied by nicolas on topic Sold Out Message
Hi,

I'm not following you. You gave the answer to your question yourself.
If you don't want to have variants displaying when they are not available, you need to turn off that "Display out of stock products" setting. If you keep that option on, the out of stock variants will display, but still, users won't be able to purchase the variants and the badge will display.

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

More
11 years 3 months ago #204605 by MyWorld
Replied by MyWorld on topic Sold Out Message
Ok I see... so what I am asking is not possible then.

Because I don't want the sold out messages on each variant when they are sold out -I prefer if they disappear - but I want a sold out message when all the variants, of that product, is sold out.

Does that make sense.

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

Time to create page: 0.359 seconds
Powered by Kunena Forum