- Posts: 13
- Thank you received: 0
Stock display
- Maoartland
-
Topic Author
- Offline
Less
More
15 years 1 month ago #23996
by Maoartland
Stock display was created by Maoartland
Hi there
First, have to say thanks for this great tool : )
Running the essential version, very happy so far.
I have looked on the forum but didn't find exactly what i am looking for so sorry if double post...
_First question:
I have different colors (characteristics) for a product.
I would like to have as defaut something like "Choose your color".
easy way would be to have the default characteristic named 'choose your color' and and have 0 stock but it isn't ideal...
Is it possible to have a kind of pop up window saying "you have to choose a color" ?
_ Second question,
I would like a pre-order system so that people can buy and pay but that they are aware that they will have to wait longer.
I figured out how display 'low in stock (yellow)' 'out of stock, pre order only" (red) and 'in stock" (green) but i would like to display "Pre-order" button instead of 'add to card' when have 0 stock, with a message saying "Will be dispatched in 2 to 3 weeks"...
I don't know just yet if it is really necessary but my client asked for a pre-order option so...
I have tried to different thing but gets completely messed up result!
I guess it is not complicated but getting lost with php..
Thanks in advance!
First, have to say thanks for this great tool : )
Running the essential version, very happy so far.
I have looked on the forum but didn't find exactly what i am looking for so sorry if double post...
_First question:
I have different colors (characteristics) for a product.
I would like to have as defaut something like "Choose your color".
easy way would be to have the default characteristic named 'choose your color' and and have 0 stock but it isn't ideal...
Is it possible to have a kind of pop up window saying "you have to choose a color" ?
_ Second question,
I would like a pre-order system so that people can buy and pay but that they are aware that they will have to wait longer.
I figured out how display 'low in stock (yellow)' 'out of stock, pre order only" (red) and 'in stock" (green) but i would like to display "Pre-order" button instead of 'add to card' when have 0 stock, with a message saying "Will be dispatched in 2 to 3 weeks"...
I don't know just yet if it is really necessary but my client asked for a pre-order option so...
Code:
<div class="hikashop_product_stock">
<?php
if($this->row->product_quantity>10){
echo '<span class="hikashop_product_stock_count_green">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
}else{
echo '<span class="hikashop_product_stock_count_yellow">'.JText::sprintf('X_ITEMS_IN_STOCK_LOW_QTY',$this->row->product_quantity).'</span><br/>';
}
$config =& hikashop_config();
if($config->get('button_style','normal')=='css'){
echo '<br />';
}
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$this->row->product_max_per_order,$this->row->product_min_per_order);
}else{
?>
<div class="hikashop_product_no_stock">
<?php
echo JText::_('NO_STOCK');
}?>
</div>
I have tried to different thing but gets completely messed up result!
I guess it is not complicated but getting lost with php..
Thanks in advance!
Please Log in or Create an account to join the conversation.
15 years 1 month ago #24000
by nicolas
Replied by nicolas on topic Re: Stock display
1 That would be the solution I would have recommended. IF you want to add a popup on top of that, that's always possible by editing the view and adding some javascript to display the popup...
2 Unfortunately, modifying the view for that won't be enough. The system won't allow users to add a product to the cart if the quantity of the product is 0. You would have to modify the quantity check system in the cart class of HikaShop as well to allow that.
2 Unfortunately, modifying the view for that won't be enough. The system won't allow users to add a product to the cart if the quantity of the product is 0. You would have to modify the quantity check system in the cart class of HikaShop as well to allow that.
Please Log in or Create an account to join the conversation.
- Maoartland
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
15 years 1 month ago #24002
by Maoartland
Replied by Maoartland on topic Re: Stock display
thanks for the quick answer!
1) The problem i have with this solution is that if i use a the characteristic "choose your color" with 0 qty (to not have the add to cart button, i will have the message "No stock" ... Do you have a work around?
2) Will try that once everything else done
1) The problem i have with this solution is that if i use a the characteristic "choose your color" with 0 qty (to not have the add to cart button, i will have the message "No stock" ... Do you have a work around?
2) Will try that once everything else done
Please Log in or Create an account to join the conversation.
15 years 1 month ago #24003
by nicolas
Replied by nicolas on topic Re: Stock display
1. You can change any text in HikaShop by overriding it:
www.hikashop.com/download/languages.html#modify
That way, you can change that no stock message to something else or remove it.
That way, you can change that no stock message to something else or remove it.
Please Log in or Create an account to join the conversation.
- Maoartland
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
15 years 1 month ago #24004
by Maoartland
Replied by Maoartland on topic Re: Stock display
Yeah, i know that.. already modified this.
I want to keep it for when product are not in stock, but not when the variant with "Choose a color" is selected. (this variant should be at 0 stock to disable add to cart..)
I think i will leave it as it is for now and choose a real variant by default..
Thanks anyway
I want to keep it for when product are not in stock, but not when the variant with "Choose a color" is selected. (this variant should be at 0 stock to disable add to cart..)
I think i will leave it as it is for now and choose a real variant by default..
Thanks anyway
Please Log in or Create an account to join the conversation.
14 years 8 months ago #34706
by AZTacGear
Replied by AZTacGear on topic Re: Stock display
How did you change the colors of your stock message?
Please Log in or Create an account to join the conversation.
14 years 8 months ago #34761
by nicolas
Replied by nicolas on topic Re: Stock display
Like explained there:
www.hikashop.com/en/support/forum/4-how-...of-stockq.html#34754
www.hikashop.com/en/support/forum/4-how-...of-stockq.html#34754
Please Log in or Create an account to join the conversation.
Time to create page: 0.170 seconds