Skip to main content

Pas de produit affiche "désolé déjà vendu"

More
11 years 4 months ago #203649 by recupart
-- url of the page with the problem -- : galerie-vintage.com/index.php/product/74...OVIER%20ET%20TOSO%20
-- HikaShop version -- : essential
-- Joomla version -- : 2.5.28

Bonjour,
dans les fiches produit affichage "reversed"
j'ai ajouté au product / show_reversed.php

<?php
//LAYOUT listing_price
if($this->element->product_quantity == 0){
echo '<strong><span style="color:#f00;">Désolé déjà vendu</span></strong><br/>';
}
?>
Mais je ne vois pas comment faire disparaître alors le prix...

Je souhaite en fait que si la quantité est 0 alors pas de prix affiché et à la place "Désolé déjà vendu"
Merci pour votre aide.
Pierre.

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

More
11 years 4 months ago #203652 by Xavier
Bonjour,

Le code affichant le prix est:
Code:
if ($this->params->get('show_price')) { $this->row = & $this->element; $this->setLayout('listing_price'); echo $this->loadTemplate(); }
Donc il faut ajouter votre "if / else" autour de ce code.

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

More
11 years 4 months ago #203744 by recupart
Code:
<?php //LAYOUT listing_price if($this->element->product_quantity == 0){ echo '<strong><span style="color:#f00;">Désolé déjà vendu</span></strong><br/>'; } else ($this->params->get('show_price')) { $this->row = & $this->element; $this->setLayout('listing_price'); echo $this->loadTemplate(); } ?>

Comme ça?

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

More
11 years 3 months ago #203753 by Xavier
Bonjour,

Plutôt comme ça:
Code:
if($this->element->product_quantity == 0){ echo '<strong><span style="color:#f00;">Désolé déjà vendu</span></strong><br/>'; }else if ($this->params->get('show_price')) { $this->row = & $this->element; $this->setLayout('listing_price'); echo $this->loadTemplate(); }
The following user(s) said Thank You: recupart

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

More
11 years 3 months ago #203829 by recupart
Parfait!!!!
Merci ;)

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

More
11 years 3 months ago #203830 by recupart
Dans le même ordre d'idée:
Quand il n'y a qu'un seul exemplaire en vente j'ai

1 item in stock
et puisque c'est ce que j'ai choisi le petit rectangle d’incrément.

j'ai déjà un

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

dans le listing price.
Comment supprimer aussi ici cette notion de quantité quand je n'ai qu'un seul exemplaire?

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

More
11 years 3 months ago #203861 by nicolas
Vous pouvez ajouter le code:
Code:
if($this->row->product_quantity==1 && $this->params->get('show_quantity_field') !=0){ $this->params->set('show_quantity_field',0); }
après le code:
Code:
if($this->config->get('show_quantity_field') == -2) $this->params->set('show_quantity_field', @$this->row->product_display_quantity_field);
dans le fichier "quantity".
The following user(s) said Thank You: recupart

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

More
11 years 3 months ago #203865 by recupart
et je supprime X_ITEM_IN_STOCK
à la ligne $text = JText::sprintf(' ', $this->row->product_quantity);
Que c'est beau comme ça...
Merci.

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

Time to create page: 0.249 seconds
Powered by Kunena Forum