Stock display

  • Posts: 13
  • Thank you received: 0
13 years 4 months ago #23996

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...

<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.

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
13 years 4 months ago #24000

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.

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

  • Posts: 13
  • Thank you received: 0
13 years 4 months ago #24002

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 :)

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

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
13 years 4 months ago #24003

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.

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

  • Posts: 13
  • Thank you received: 0
13 years 4 months ago #24004

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 :)

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

  • Posts: 46
  • Thank you received: 1
13 years 1 week ago #34706

How did you change the colors of your stock message?

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

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
13 years 1 week ago #34761

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

Time to create page: 0.075 seconds
Powered by Kunena Forum