[RESupgrade to "business" et perte de mise en page

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #70861

Bonjour,
J'ai acheté la version "business" et suite à la mise à niveau, j'ai perdu la mise en page dans mes catégories.
Avant j'avais le champs "product_code" et le champs "product_name" au-dessus des photos :



et maintenant ils ont disparu :



On constate ici aussi que la mise en page du bas a changé et les termes.

Merci.

Attachments:
Last edit: 10 years 10 months ago by oliv. Reason: réglé

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #70906

Bonjour,

Aviez vous changé les vues en passant par HikaShop > Display > Views ?

Si vous aviez changé cela directement dans les fichier, il est normal que vos précédentes modifications aient été perdues.

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #70908

En effet, il est bien possible que je sois passé par les fichiers au début. :blush:
Si j'ai bien compris, avec la version "business" il vaudrait mieux que je passe directement par HikaShop > Display > Views.
Merci dans ce cas de bien vouloir m'indiquer sur quel fichier je dois opérer.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 6 months ago #70911

Oui c'est le cas. C'est dans le fichier "listing_img_title" de la vue "product" qu'il faut changer cela.

The following user(s) said Thank You: oliv

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #70918

Merci c'est super sympa.
Le soucis à présent c'est que je ne me rappelle plus des codes à entrer pour afficher le champs "product_code" et "product_name".
En plus, le prix ne s'affiche plus.
Je suis désespérant.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #70926

Place the code between the tags "<!-- PRODUCT NAME -->" and "<!-- PRODUCT CODE -->"

Before "if($this->config->get('thumbnail',1)){ ?>"

The variable for the product name is "$this->row->product_name".

The following user(s) said Thank You: oliv

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #70928

Merci,

Du coup j'ai copier

<!-- PRODUCT NAME -->
<span class="hikashop_product_name">
  <?php if($this->params->get('link_to_product_page',1)){ ?>
    <a href="<?php echo $link;?>">
  <?php }
    echo $this->row->product_name;
  if($this->params->get('link_to_product_page',1)){ ?>
    </a>
  <?php } ?>
</span>
<!-- EO PRODUCT NAME -->

et j'ai remplacé par code :
<!-- PRODUCT CODE -->
<span class="hikashop_product_code">
  <?php if($this->params->get('link_to_product_page',1)){ ?>
    <a href="<?php echo $link;?>">
  <?php }
    echo $this->row->product_code;
  if($this->params->get('link_to_product_page',1)){ ?>
    </a>
  <?php } ?>
</span>
<!-- EO PRODUCT CODE -->

Par contre pour l'affichage du prix je dois avoir un réglage qui a flanché puisque je l'avais avant le passage du gratuit au "business" et mon code est bien dans le fichier :
<!-- PRODUCT PRICE -->
<?php
}
if($this->params->get('show_price','-1')=='-1'){
  $config =& hikashop_config();
  $this->params->set('show_price',$config->get('show_price'));
}
if($this->params->get('show_price')){
  $this->setLayout('listing_price');
  echo $this->loadTemplate();
}
?>
<!-- EO PRODUCT PRICE -->
Merci pour votre patience.
J'espère aussi que ma méthode est bonne et qu'elle aidera d'autres utilistateurs.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 6 months ago #71434

Si le prix ne s'affiche pas, c'est que vous avez due le désactiver.
Allez dans l'onglet Affichage de la configuration et activez l'option "afficher les prix".

The following user(s) said Thank You: oliv

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71448

Merci,
"afficher les prix" est bien coché.
C'est peut-être peu orthodoxe mais j'ai collé ce code :

<?php
$class ='';
if(!empty($this->row->prices)&& count($this->row->prices)>1){
  $class = ' hikashop_product_several_prices';
} ?>
  <span class="hikashop_product_price_full<?php echo $class; ?>">
  <?php
  if(empty($this->row->prices)){
    echo JText::_('FREE_PRICE');
  }else{
    $first=true;
    echo JText::_('PRICE_BEGINNING');
    $i=0;
    if($this->params->get('price_with_tax',3)==3){
      $config =& hikashop_config();
      $this->params->set('price_with_tax',$config->get('price_with_tax'));
    }
    foreach($this->row->prices as $price){
      if($first)$first=false;
      else echo JText::_('PRICE_SEPARATOR');
      $start = JText::_('PRICE_BEGINNING_'.$i);
      if($start!='PRICE_BEGINNING_'.$i){
        echo $start;
      }
      if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $price->price_min_quantity>1){
        echo '<span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price->price_min_quantity.'">';
      }
      $classes = array('hikashop_product_price hikashop_product_price_'.$i);
      if(!empty($this->row->discount)){
        $classes[]='hikashop_product_price_with_discount';
      }
      if(!empty($this->row->discount)){
        if($this->params->get('show_discount',3)==3){
          $config =& hikashop_config();
          $this->params->set('show_discount',$config->get('show_discount'));
        }
        if($this->params->get('show_discount')==1){
          echo '<span class="hikashop_product_discount">'.JText::_('PRICE_DISCOUNT_START');
          if(bccomp($this->row->discount->discount_flat_amount,0,5)!==0){
            echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id);
          }elseif(bccomp($this->row->discount->discount_percent_amount,0,5)!==0){
            echo -1*$this->row->discount->discount_percent_amount.'%';
          }
          echo JText::_('PRICE_DISCOUNT_END').'</span>';
        }elseif($this->params->get('show_discount')==2){
          echo '<span class="hikashop_product_price_before_discount">'.JText::_('PRICE_DISCOUNT_START');
          if($this->params->get('price_with_tax')){
            echo $this->currencyHelper->format($price->price_value_without_discount_with_tax,$price->price_currency_id);
          }
          if($this->params->get('price_with_tax')==2){
            echo JText::_('PRICE_BEFORE_TAX');
          }
          if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
            echo $this->currencyHelper->format($price->price_value_without_discount,$price->price_currency_id);
          }
          if($this->params->get('price_with_tax')==2){
            echo JText::_('PRICE_AFTER_TAX');
          }
          if($this->params->get('show_original_price','-1')=='-1'){
            $config =& hikashop_config();
            $this->params->set('show_original_price',$config->get('show_original_price'));
          }
          if($this->params->get('show_original_price') && !empty($price->price_orig_value_without_discount_with_tax)){
            echo JText::_('PRICE_BEFORE_ORIG');
            if($this->params->get('price_with_tax')){
              echo $this->currencyHelper->format($price->price_orig_value_without_discount_with_tax,$price->price_orig_currency_id);
            }
            if($this->params->get('price_with_tax')==2){
              echo JText::_('PRICE_BEFORE_TAX');
            }
            if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax') && !empty($price->price_orig_value_without_discount)){
              echo $this->currencyHelper->format($price->price_orig_value_without_discount,$price->price_orig_currency_id);
            }
            if($this->params->get('price_with_tax')==2){
              echo JText::_('PRICE_AFTER_TAX');
            }
            echo JText::_('PRICE_AFTER_ORIG');
          }
          echo JText::_('PRICE_DISCOUNT_END').'</span>';
        }elseif($this->params->get('show_discount')==3){
        }
      }
      echo '<span class="'.implode(' ',$classes).'">';
      if($this->params->get('price_with_tax')){
        echo $this->currencyHelper->format($price->price_value_with_tax,$price->price_currency_id);
      }
      if($this->params->get('price_with_tax')==2){
        echo JText::_('PRICE_BEFORE_TAX');
      }
      if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
        echo $this->currencyHelper->format($price->price_value,$price->price_currency_id);
      }
      if($this->params->get('price_with_tax')==2){
        echo JText::_('PRICE_AFTER_TAX');
      }
      if($this->params->get('show_original_price','-1')=='-1'){
        $config =& hikashop_config();
        $this->params->set('show_original_price',$config->get('show_original_price'));
      }
      if($this->params->get('show_original_price') && !empty($price->price_orig_value)){
        echo JText::_('PRICE_BEFORE_ORIG');
        if($this->params->get('price_with_tax')){
          echo $this->currencyHelper->format($price->price_orig_value_with_tax,$price->price_orig_currency_id);
        }
        if($this->params->get('price_with_tax')==2){
          echo JText::_('PRICE_BEFORE_TAX');
        }
        if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
          echo $this->currencyHelper->format($price->price_orig_value,$price->price_orig_currency_id);
        }
        if($this->params->get('price_with_tax')==2){
          echo JText::_('PRICE_AFTER_TAX');
        }
        echo JText::_('PRICE_AFTER_ORIG');
      }
      echo '</span> ';
      if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
        if($price->price_min_quantity>1){
          echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
        }else{
          echo JText::_('PER_UNIT');
        }
      }
      if($this->params->get('show_price_weight')){
        if(!empty($this->element->product_id) && isset($this->row->product_weight) && bccomp($this->row->product_weight,0,3)){
          echo JText::_('PRICE_SEPARATOR').'<span class="hikashop_product_price_per_weight_unit">';
          if($this->params->get('price_with_tax')){
            $weight_price = $price->price_value_with_tax / $this->row->product_weight;
            echo $this->currencyHelper->format($weight_price,$price->price_currency_id).' / '.JText::_($this->row->product_weight_unit);
          }
          if($this->params->get('price_with_tax')==2){
            echo JText::_('PRICE_BEFORE_TAX');
          }
          if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
            $weight_price = $price->price_value / $this->row->product_weight;
            echo $this->currencyHelper->format($weight_price,$price->price_currency_id).' / '.JText::_($this->row->product_weight_unit);
          }
          if($this->params->get('price_with_tax')==2){
            echo JText::_('PRICE_AFTER_TAX');
          }
          echo '</span>';
        }
      }
      if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $price->price_min_quantity>1){
        echo '</span>';
      }
      $end = JText::_('PRICE_ENDING_'.$i);
      if($end!='PRICE_ENDING_'.$i){
        echo $end;
      }
      $i++;
    }
    echo JText::_('PRICE_END');
  }
  ?></span>
Me rappelle plus où je l'ai trouvé mais celui-là affiche effectivement les prix?

et pas celui-ci :
<?php
}
if($this->params->get('show_price','-1')=='-1'){
  $config =& hikashop_config();
  $this->params->set('show_price',$config->get('show_price'));
}
if($this->params->get('show_price')){
  $this->setLayout('listing_price');
  echo $this->loadTemplate();
}
?>

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 6 months ago #71449

Il suffisait de mettre juste cela sinon :
<?php
$this->setLayout('listing_price');
echo $this->loadTemplate();
?>

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71452

Merci,

Quand je colle ça :



Ca me donne ça en frontend :

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #71580

Bonjour,

Généralement cette erreur est retournée lorsqu’il manque une parenthèse ou une accolade dans le code.
Pouvez vous vérifier si il en manque ?

Je ne pense pas que ce code en soit la cause, il semble être correct.

The following user(s) said Thank You: oliv

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71629

Merci Xavier, mon niveau en php ne me permet pas de vérifier s'il manque une parenthèse ou une accolade dans le code.

Par contre voici ce que me donne Dreamweaver :


Attachments:

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71630

.

Last edit: 11 years 6 months ago by oliv. Reason: pb serveur forum

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #71767

Bonjour,

Cela m'étonne que le problème vienne de cette partie de code, si vous la retirez vous n'avez plus d'erreur ?
Ce que je vous suggère de faire, c'est de supprimer les modifications apportées à cette vue, et de les recommencer.

Vous pouvez au préalable enregistrer ce que vous avez déjà modifié sur votre ordinateur.

The following user(s) said Thank You: oliv

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71776

Xavier bonjour,
Si je la retire ça ne change rien, si je ne m'abuse, c'est un commentaire donc ça n'a rien à voir.
Lorsque je "supprime la personnalisation", le prix ne s'affiche toujours pas.
Merci.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #71817

Êtes vous sûr d'avoir activé l'option pour afficher les prix dans la configuration générale, mais aussi dans vos menus et modules ? (HikaShop > Display > Content Menus / Modules).

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #71820

Bravo!
Afficher les prix était décoché.
Le fait est que je n'ai pas bien saisi le fonctionnement de HikaShop.
"Associated products listing for category listing menu 265" dans affichage/module de contenu. Ca ne me parle pas. Mais ça va rentrer! Passer de Virtuemart à HikaShop demande un certain apprentissage. Mais je sens bien qu'à l'avenir mon travail sera bien facilité par ce composant.
Merci encore.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 6 months ago #71915

C'est assez simple en fait. Un listing de catégories affiche les catégories de la catégories courante.
Ensuite, c'est un module associé qui se charge d'afficher les produits de la catégories courante en dessous des catégories.
Donc quand vous faite un menu de listing de catégories, il y a un module listing de produit qui y est rataché pour tout afficher. Les options d'affichage des catégories sont dans les options hikashop du menu. Les options d'affichage des produits sont dans les options hikashop du module.

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

  • Posts: 257
  • Thank you received: 7
11 years 6 months ago #72085

Ouaich!
C'est sûrement simple quand on a le nez dans le guidon mais je rame un peu.
J'appelle mon magasin par un menu Joomla, j'ai sélectionné "Liste des catégories" et ça me va bien.
Après je me demande si ce que vous appelez menu n'est pas un autre concept par rapport aux menus Joomla?
Mais bon, ça rentrera avec le temps.
Merci en tout cas.

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

Time to create page: 0.122 seconds
Powered by Kunena Forum