Pas de produit affiche "désolé déjà vendu"
11 years 4 months ago #203649
by recupart
Pas de produit affiche "désolé déjà vendu" was created 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.
-- 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.
11 years 4 months ago #203652
by Xavier
Replied by Xavier on topic Pas de produit affiche "désolé déjà vendu"
Bonjour,
Le code affichant le prix est:
Donc il faut ajouter votre "if / else" autour de ce code.
Le code affichant le prix est:
Code:
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
Please Log in or Create an account to join the conversation.
11 years 4 months ago #203744
by recupart
Comme ça?
Replied by recupart on topic Pas de produit affiche "désolé déjà vendu"
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.
11 years 3 months ago #203753
by Xavier
Replied by Xavier on topic Pas de produit affiche "désolé déjà vendu"
Bonjour,
Plutôt comme ça:
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.
11 years 3 months ago #203829
by recupart
Replied by recupart on topic Pas de produit affiche "désolé déjà vendu"
Parfait!!!!
Merci
Merci
Please Log in or Create an account to join the conversation.
11 years 3 months ago #203830
by recupart
Replied by recupart on topic Pas de produit affiche "désolé déjà vendu"
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?
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.
11 years 3 months ago #203861
by nicolas
Replied by nicolas on topic Pas de produit affiche "désolé déjà vendu"
Vous pouvez ajouter le code:
après le code:
dans le fichier "quantity".
Code:
if($this->row->product_quantity==1 && $this->params->get('show_quantity_field') !=0){
$this->params->set('show_quantity_field',0);
}
Code:
if($this->config->get('show_quantity_field') == -2)
$this->params->set('show_quantity_field', @$this->row->product_display_quantity_field);
The following user(s) said Thank You: recupart
Please Log in or Create an account to join the conversation.
11 years 3 months ago #203865
by recupart
Replied by recupart on topic Pas de produit affiche "désolé déjà vendu"
et je supprime X_ITEM_IN_STOCK
à la ligne $text = JText::sprintf(' ', $this->row->product_quantity);
Que c'est beau comme ça...
Merci.
à 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