News:

Looking for documentation? Take a look on our wiki

Main Menu

Problematic product details and order

Started by chiduke, March 04, 2012, 03:32:56 AM

Previous topic - Next topic

chiduke

I have just upgraded to latest virtuemart 2 but it developed problem
when users click the product details it gives this message

Fatal error: Call to undefined method shopFunctionsF::PdfIcon() in /home/afrishoc/public_html/templates/hot_ecommerce/html/com_virtuemart/productdetails/default.php on line 77

what can i do to solve the problem

SamF

Could you try it with another template? Will the error retain?

PRO

Quote from: chiduke on March 04, 2012, 03:32:56 AM

Fatal error: Call to undefined method shopFunctionsF::PdfIcon() in /home/afrishoc/public_html/templates/hot_ecommerce/html/com_virtuemart/productdetails/default.php on line 77

what can i do to solve the problem

1st You read the error.
2nd You notice you are using a template override. templates/hot_ecommerce/html/com_virtuemart/productdetails/default.php
3rd You take the PDF code from the regular com_virtuemart/views/productdetails/default.php file.
4th you place that code in the template override, and delete the old PDF code.


chiduke

I cant find the template overide code
where is is in the code;


// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );

// addon for joomla modal Box
JHTML::_ ( 'behavior.modal' );
JHTML::_('behavior.tooltip');

/* Let's see if we found the product */
if (empty ( $this->product )) {
   echo JText::_ ( 'COM_VIRTUEMART_PRODUCT_NOT_FOUND' );
   echo '<br /><br />  ' . $this->continue_link_html;
   return;
}
?>

<script type='text/javascript'>
   jQuery(function() {   
      jQuery("#product-tabs").organicTabs({
         "speed": 200
      });
   });
</script>

<div class="productdetails-view">

   <?php // Product Navigation
   // if (VmConfig::get ( 'product_navigation', 1 )) { ?>
      <!-- <div class="product-neighbours"> -->
      <?php
      /* if (! empty ( $this->product->neighbours ['previous'] )) {
         $prev_link = JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['previous'] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id );
         echo JHTML::_ ( 'link', $prev_link, $this->product->neighbours ['previous'] ['product_name'], array ('class' => 'previous-page' ) );
      }
      if (! empty ( $this->product->neighbours ['next'] )) {
         $next_link = JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['next'] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id );
         echo JHTML::_ ( 'link', $next_link, $this->product->neighbours ['next'] ['product_name'], array ('class' => 'next-page' ) );
      } */
      ?>
      <!--<div class="clear"></div>
      </div>-->
   <?php // } // Product Navigation END ?>

   <?php // Product Title ?>
   <h1><?php echo $this->product->product_name ?></h1>
   <?php // Product Title END ?>

   <?php // Product Edit Link
   echo $this->edit_link;
   // Product Edit Link END ?>

   <?php // PDF - Print - Email Icon
   if (VmConfig::get('pdf_button_enable', 1) == '1' || VmConfig::get('show_emailfriend', 1) == '1' || VmConfig::get('show_printicon', 1) == '1') { ?>
   <div class="icons">
      <?php $link = (VmConfig::isJ15()) ? 'index2.php' : 'index.php';
      $link .= '?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id;
      $pdflink= JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&format=pdf');
      //echo shopFunctionsF::PdfIcon($pdflink );
      echo shopFunctionsF::PrintIcon($link.'&print=1');
      echo shopFunctionsF::EmailIcon($this->product->virtuemart_product_id); ?>
   <div class="clear"></div>
   </div>
   <?php } // PDF - Print - Email Icon END ?>

   <?php // Product Short Description
   if (!empty($this->product->product_s_desc)) { ?>
   <div class="product-short-description">
      <?php /** @todo Test if content plugins modify the product description */
      echo $this->product->product_s_desc; ?>
   </div>
   <?php } // Product Short Description END ?>

   <div>
      <div class="width50 floatleft">

      <?php // Product Main Image
      if (!empty($this->product->images[0])) { ?>
         <div class="main-image">
         <?php echo $this->product->images[0]->displayMediaFull('class="product-image"',false); ?>
         </div>
      <?php } // Product Main Image END ?>
       
        <?php

SamF

#4
Quote from: chiduke on March 07, 2012, 00:19:20 AM
I cant find the template overide code
where is is in the code

It is here:

Quote from: chiduke on March 04, 2012, 03:32:56 AM
/templates/hot_ecommerce/html/com_virtuemart/productdetails/default.php

Follow BanquetTables.pro algorithm, or simply switch to another template. In this case the detail view will not be (hopefully:) overridden. Suspect, that you may have different version of detail view in your hot_ecommerce template, then your Virtuemart installation.

chiduke


SamF

#6
Quote from: chiduke on March 11, 2012, 04:49:38 AM
which template do you suggest i use

Any template of your standard Joomla setup. The purpose is to make sure, that the "fatal error" was caused by custom template override, not VM. In this case, your hot_ecommerce can be adopted to new version of VM.

In fact, there is pretty easy way to fix it, see above:

Quote from: BanquetTables.pro on March 04, 2012, 14:43:10 PM
3rd You take the PDF code from the regular com_virtuemart/views/productdetails/default.php file.
4th you place that code in the template override, and delete the old PDF code.

chiduke

when iclick confirm order is shows some code i dont understand