Forum HikaShop General Talk about HikaShop Stock level not displayed on productpage
Bienvenue, Invité
Nom d'utilisateur: Mot de passe: Se souvenir de moi
  • Page:
  • 1

SUJET: Stock level not displayed on productpage

Stock level not displayed on productpage il y a 10 mois 20 heures #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>
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 10 mois 18 heures #58641

  • Mohamed Thelji
  • Portrait de Mohamed Thelji
  • En ligne
  • Messages: 2392
  • Remerciements reçus 380
  • MODERATOR
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.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 10 mois 1 heure #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.
Pièces jointes:
Dernière édition: il y a 10 mois 59 minutes par Micke_skane.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 10 mois 52 minutes #58741

  • Mohamed Thelji
  • Portrait de Mohamed Thelji
  • En ligne
  • Messages: 2392
  • Remerciements reçus 380
  • MODERATOR
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"
Dernière édition: il y a 10 mois 48 minutes par Mohamed Thelji.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 10 mois 48 minutes #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"
Dernière édition: il y a 10 mois 45 minutes par Micke_skane.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #58755

  • Mohamed Thelji
  • Portrait de Mohamed Thelji
  • En ligne
  • Messages: 2392
  • Remerciements reçus 380
  • MODERATOR
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.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #58762

  • Xavier
  • Portrait de Xavier
  • En ligne
  • Messages: 4470
  • Remerciements reçus 773
  • MODERATOR
Hi Micke_skane,

Do you have variants for this product ?
If yes, you have do edit the quantity of the variants.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #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?
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #58821

  • Mohamed Thelji
  • Portrait de Mohamed Thelji
  • En ligne
  • Messages: 2392
  • Remerciements reçus 380
  • MODERATOR
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.
Dernière édition: il y a 9 mois 4 semaines par Mohamed Thelji.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #58907

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

Where/What is the "Remove customization button"?
Dernière édition: il y a 9 mois 4 semaines par Micke_skane.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 4 semaines #58956

  • nicolas
  • Portrait de nicolas
  • En ligne
  • Messages: 30027
  • Remerciements reçus 2401
  • MODERATOR
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.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 2 semaines #60224

Same problem here,.. I did all the steps mentioned above, no result.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 2 semaines #60287

  • nicolas
  • Portrait de nicolas
  • En ligne
  • Messages: 30027
  • Remerciements reçus 2401
  • MODERATOR
I suppose that you solved your problem:
www.hikashop.com/en/forum/4-how-to/60204...n-stock-problem.html
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 9 mois 2 semaines #60288

nicolas écrit:
Yes i did.
Thx for the great shop!
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 8 mois 4 semaines #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
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 8 mois 4 semaines #62162

  • Mohamed Thelji
  • Portrait de Mohamed Thelji
  • En ligne
  • Messages: 2392
  • Remerciements reçus 380
  • MODERATOR
Hello Micke,

I think that you'll find your answer there.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Stock level not displayed on productpage il y a 8 mois 4 semaines #62163

Thanks for the link but we have instead chosen to set the stocklevel to unlimited.
L'administrateur à désactivé l'accès en écriture pour le public.
  • Page:
  • 1
Temps de génération de la page: 0.545 secondes

Follow hikashop on Twitter