Stock display

  • Posts: 13
  • Thank you received: 0
13 years 3 months ago #23998

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.

Time to create page: 0.053 seconds
Powered by Kunena Forum