Новости Joomla

Вышли релизы безопасности Joomla 5.3.4 и Joomla 4.4.14

Релиз безопасности Joomla 5.3.4

Проект Joomla спешит сообщить о выпуске Joomla 5.3.4 и Joomla 4.4.14. Это релиз безопасности для серии Joomla 5.3 и релиз безопасности для серии Joomla 4.4.

0 Пользователей и 1 Гость просматривают эту тему.
  • 2 Ответов
  • 3406 Просмотров
*

masik_

  • Осваиваюсь на форуме
  • 42
  • 3 / 0
Всем доброго времени, подскажите как в карточке товар vm 2.0.6 переместить цену и кнопки

http://savepic.su/1976716.ht


« Последнее редактирование: 19.05.2012, 19:19:15 от ELLE »
*

masik_

  • Осваиваюсь на форуме
  • 42
  • 3 / 0
Re: перенести кнопку Решено.
« Ответ #1 : 19.05.2012, 16:37:05 »
Открыть файл сайт\components\com_virtuemart\views\productdetails\tmpl\default.php жмешь Ctrl + F для поиска, вводишь      
   Код:
<div class="width50 floatright">
аккуратно вырезаешь весь вот этот код
Код
<div class="width50 floatright">
       <div class="spacer-buy-area">

      <?php
      // TO DO in Multi-Vendor not needed at the moment and just would lead to confusion
      /* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
        $text = JText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
        echo '<span class="bold">'. JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?><a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
       */
      ?>

      <?php
      if ($this->showRating) {
          $maxrating = VmConfig::get('vm_maximum_rating_scale', 5);

          if (empty($this->rating)) {
         ?>
         <span class="vote"><?php echo JText::_('COM_VIRTUEMART_RATING'). ' ' . JText::_('COM_VIRTUEMART_UNRATED')?></span>
             <?php
         } else {
             $ratingwidth = ( $this->rating->rating * 100 ) / $maxrating; //I don't use round as percetntage with works perfect, as for me
             ?>
         <span class="vote">
   <?php echo JText::_('COM_VIRTUEMART_RATING'). ' ' . round($this->rating->rating, 2). '/' . $maxrating; ?><br/>
             <span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE"). $this->rating->rating . '/' . $maxrating)?>" class="vmicon ratingbox" style="display:inline-block;">
            <span class="stars-orange" style="width:<?php echo $ratingwidth.'%'; ?>">
            </span>
             </span>
         </span>
         <?php
          }
      }
      if (is_array($this->productDisplayShipments)) {
          foreach ($this->productDisplayShipments as $productDisplayShipment) {
         echo $productDisplayShipment . '<br />';
          }
      }
      if (is_array($this->productDisplayPayments)) {
          foreach ($this->productDisplayPayments as $productDisplayPayment) {
         echo $productDisplayPayment . '<br />';
          }
      }
      // Product Price
      if ($this->show_prices and (empty($this->product->images[0]) or $this->product->images[0]->file_is_downloadable == 0)) {
          echo $this->loadTemplate('showprices');
      }
      ?>
Артикул: <?php echo $this->product->product_sku ?>
      <?php
      // Add To Cart Button
//          if (!empty($this->product->prices) and !empty($this->product->images[0]) and $this->product->images[0]->file_is_downloadable==0 ) {
      if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices)) {
          echo $this->loadTemplate('addtocart');
      }  // Add To Cart Button END
      ?>

      <?php
      // Availability Image
      /* TO DO add width and height to the image */
      if (!empty($this->product->product_availability)) {
          $stockhandle = VmConfig::get('stockhandle', 'none');
          if ($stockhandle == 'risetime' and ($this->product->product_in_stock - $this->product->product_ordered) < 1) {
         ?>   <div class="availability">
             <?php echo JHTML::image(JURI::root(). VmConfig::get('assets_general_path'). 'images/availability/' . VmConfig::get('rised_availability', '7d.gif'), VmConfig::get('rised_availability', '7d.gif'), array('class' => 'availability')); ?>
         </div>
          <?php } else {
         ?>
         <div class="availability">
         <?php echo JHTML::image(JURI::root(). VmConfig::get('assets_general_path'). 'images/availability/' . $this->product->product_availability, $this->product->product_availability, array('class' => 'availability')); ?>
         </div>
         <?php
          }
      }
      ?>

<?php
// Ask a question about this product
if (VmConfig::get('ask_question', 1) == '1') {
    ?>
          <div class="ask-a-question">
              <a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL')?></a>
              <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL')?></a>-->
          </div>
      <?php }
      ?>

      <?php
      // Manufacturer of the Product
      if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
          echo $this->loadTemplate('manufacturer');
      }
      ?>

       </div>
   </div>
и вставляем его ниже следующего блока
  <div class="width50 floatleft">
<?php
echo $this->loadTemplate('images');
?>
   </div>

затем в обоих этих блоках меняем width50 на width96 то есть должно получиться следующее:

Код
 <div class="width98 floatleft">
<?php
echo $this->loadTemplate('images');
?>
   </div>

   <div class="width98 floatright">
       <div class="spacer-buy-area">

      <?php
      // TO DO in Multi-Vendor not needed at the moment and just would lead to confusion
      /* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
        $text = JText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
        echo '<span class="bold">'. JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?><a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
       */
      ?>

      <?php
      if ($this->showRating) {
          $maxrating = VmConfig::get('vm_maximum_rating_scale', 5);

          if (empty($this->rating)) {
         ?>
         <span class="vote"><?php echo JText::_('COM_VIRTUEMART_RATING'). ' ' . JText::_('COM_VIRTUEMART_UNRATED')?></span>
             <?php
         } else {
             $ratingwidth = ( $this->rating->rating * 100 ) / $maxrating; //I don't use round as percetntage with works perfect, as for me
             ?>
         <span class="vote">
   <?php echo JText::_('COM_VIRTUEMART_RATING'). ' ' . round($this->rating->rating, 2). '/' . $maxrating; ?><br/>
             <span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE"). $this->rating->rating . '/' . $maxrating)?>" class="vmicon ratingbox" style="display:inline-block;">
            <span class="stars-orange" style="width:<?php echo $ratingwidth.'%'; ?>">
            </span>
             </span>
         </span>
         <?php
          }
      }
      if (is_array($this->productDisplayShipments)) {
          foreach ($this->productDisplayShipments as $productDisplayShipment) {
         echo $productDisplayShipment . '<br />';
          }
      }
      if (is_array($this->productDisplayPayments)) {
          foreach ($this->productDisplayPayments as $productDisplayPayment) {
         echo $productDisplayPayment . '<br />';
          }
      }
      // Product Price
      if ($this->show_prices and (empty($this->product->images[0]) or $this->product->images[0]->file_is_downloadable == 0)) {
          echo $this->loadTemplate('showprices');
      }
      ?>
Артикул: <?php echo $this->product->product_sku ?>
      <?php
      // Add To Cart Button
//          if (!empty($this->product->prices) and !empty($this->product->images[0]) and $this->product->images[0]->file_is_downloadable==0 ) {
      if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices)) {
          echo $this->loadTemplate('addtocart');
      }  // Add To Cart Button END
      ?>

      <?php
      // Availability Image
      /* TO DO add width and height to the image */
      if (!empty($this->product->product_availability)) {
          $stockhandle = VmConfig::get('stockhandle', 'none');
          if ($stockhandle == 'risetime' and ($this->product->product_in_stock - $this->product->product_ordered) < 1) {
         ?>   <div class="availability">
             <?php echo JHTML::image(JURI::root(). VmConfig::get('assets_general_path'). 'images/availability/' . VmConfig::get('rised_availability', '7d.gif'), VmConfig::get('rised_availability', '7d.gif'), array('class' => 'availability')); ?>
         </div>
          <?php } else {
         ?>
         <div class="availability">
         <?php echo JHTML::image(JURI::root(). VmConfig::get('assets_general_path'). 'images/availability/' . $this->product->product_availability, $this->product->product_availability, array('class' => 'availability')); ?>
         </div>
         <?php
          }
      }
      ?>

<?php
// Ask a question about this product
if (VmConfig::get('ask_question', 1) == '1') {
    ?>
          <div class="ask-a-question">
              <a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL')?></a>
              <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL')?></a>-->
          </div>
      <?php }
      ?>

      <?php
      // Manufacturer of the Product
      if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
          echo $this->loadTemplate('manufacturer');
      }
      ?>

       </div>
   </div>
*

Sergio111

  • Захожу иногда
  • 175
  • 0 / 0
Re: Перенести кнопки и цену[Решено].
« Ответ #2 : 29.05.2012, 12:03:59 »
Спасибо!
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться