Stock level not displayed on productpage

  • Posts: 56
  • Thank you received: 0
11 years 9 months ago #58625

Hey,

How can I show the stock level on my productpage in Hikashop?
I've set the quantity to 1 for a product but it doesn't shows on the productpage.
Isn't this something that should been showed automatic?

The code that decides what should been showed on the productpage have I figured out should be this part:

if($this->row->product_quantity==-1){

					?>

					<div class="hikashop_product_stock">

					<?php

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

					}elseif($this->row->product_quantity>0){

					?>

					<div class="hikashop_product_stock">

					<?php

						echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';

						$config =& hikashop_config();

						if($config->get('button_style','normal')=='css'){

							echo '<br />';

						}

						if($this->row->product_max_per_order<=0 || $this->row->product_max_per_order>$this->row->product_quantity) $this->row->product_max_per_order = $this->row->product_quantity;

						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');
						$waitlist = $this->config->get('product_waitlist',0);

						if(hikashop_level(1) && ($waitlist==2 || ($waitlist==1 && !empty($this->element->product_waitlist)))){ ?>

							</div><div id="hikashop_product_waitlist_main" class="hikashop_product_waitlist_main">

							<?php

							$empty='';

							$params = new JParameter($empty);

							echo $this->cart->displayButton(JText::_('ADD_ME_WAITLIST'),'add_waitlist',$params,hikashop_completeLink('product&task=waitlist&cid='.$this->row->product_id),'window.location=\''.str_replace("'","\'",hikashop_completeLink('product&task=waitlist&cid='.$this->row->product_id)).'\';return false;');

						}

					}?>

					</div>

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

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #58641

Hello,

You'll maybe find your answer there :

If you entered a quantity for your product, it should appear automatically on the product page along with the add to cart button. If you don't have the add to cart button, that would explain that you don't see the stock.
If you don't see the add to cart button, it's probably because you activated the "catalogue mode" option or deactivated the option "Display 'Add to cart' button" option in the Display tab of the configuration.

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

  • Posts: 56
  • Thank you received: 0
11 years 9 months ago #58734

The Add to cart-button are there.

I'll look into the Config-tab to see if I missed something...

EDIT:
I've added a image of the configuration and productpage for the show of stocklevel for a product.

Attachments:
Last edit: 11 years 9 months ago by Micke_skane.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #58741

Can you tell me what quantity did you set for your product ?

/


EDIT
\

Can you tell me if you have the line :
X_ITEMS_IN_STOCK="%s items in stock"
in your translation file in "Hikashop->System->Configuration->Language"

Last edit: 11 years 9 months ago by Mohamed Thelji.

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

  • Posts: 56
  • Thank you received: 0
11 years 9 months ago #58742

On Productpage I set 1 as quantity, see orange mark for Productpage.
Isn't that right way to do it?

EDIT:
I've got this line:
NO_STOCK="Inte i lager"
X_ITEMS_IN_STOCK="%s produkter i lager"

Last edit: 11 years 9 months ago by Micke_skane.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #58755

Hello,

Can you :

- Save your "show_default" and "quantity" file of your "product" view
- Use the Remove customization button for each file

and tell me if it works.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #58762

Hi Micke_skane,

Do you have variants for this product ?
If yes, you have do edit the quantity of the variants.

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

  • Posts: 56
  • Thank you received: 0
11 years 9 months ago #58763

Save your "show_default" and "quantity" file of your "product" view
- Use the Remove customization button for each file

What ;)
Do you mean if I can save the files under "Display -> Views"?

Do you have variants for this product ?
If yes, you have do edit the quantity of the variants.

So if I got a product Porsche 911 and several variants like 911 Turbo, 911 Targa, 911 Carrera and put 1 as quantity for 911 Turbo but nothing for the other variants, the stock level(quantity) for 911 Turbo isn't shown on the productpage?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #58821

Did you change the "show_default" and "quantity" file of your "product" view ? (in "Hikashop->Display->Views").
If yes, can you make a save of this 2 files and use the Remove customization button.

Last edit: 11 years 9 months ago by Mohamed Thelji.

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

  • Posts: 56
  • Thank you received: 0
11 years 9 months ago #58907

I haven't changed anything in those files but I can save them in the "View".

Where/What is the "Remove customization button"?

Last edit: 11 years 9 months ago by Micke_skane.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 9 months ago #58956

When you are on the listing of views, you have a column "remove customization" with a little icon for each row which have been customized.

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

  • Posts: 4
  • Thank you received: 0
11 years 8 months ago #60224

Same problem here,.. I did all the steps mentioned above, no result.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 8 months ago #60287

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

  • Posts: 4
  • Thank you received: 0
11 years 8 months ago #60288

nicolas wrote: I suppose that you solved your problem:
www.hikashop.com/en/forum/4-how-to/60204...n-stock-problem.html


Yes i did.
Thx for the great shop!

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

  • Posts: 56
  • Thank you received: 0
11 years 8 months ago #62154

Hi,

Now I've look into it again and I could display stocklevel on productpage but if there are just 1 product i can't order more than just 1. Even if there just 1 in stocklevel i would like to have the possibility to order more than 1!
What setting should i change for this situation?

And if there is 0 in stocklevel the textfield for number of products to order isn't displayed!
I want to have the possibility to order even if there is 0 in stocklevel.
What setting should I change for this situation?

/Micke

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

  • Posts: 12953
  • Thank you received: 1778
11 years 8 months ago #62162

Hello Micke,

I think that you'll find your answer there .

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

  • Posts: 56
  • Thank you received: 0
11 years 8 months ago #62163

Thanks for the link but we have instead chosen to set the stocklevel to unlimited.

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

Time to create page: 0.115 seconds
Powered by Kunena Forum