News:

Looking for documentation? Take a look on our wiki

Main Menu

[SOLVED] Prices disapeared

Started by Poiter, November 09, 2012, 00:13:20 AM

Previous topic - Next topic

Poiter

Hi,

I migrated a Joomla 1.5 site with already vm 2.0 to a Joomla 2.5 site. Everything went well. Just changed de prefix in the database of the old tabels of vm and the shop came visible, with al its products. The problem is that the prices of the product are gone. In the category and product details pages. I use an override, but it's the same as the old version.

The old site:
http://biemold.nl/webshop/2de-hands-fietsen/dames2012-08-07-14-08-39_

The new site (without prices):
http://test.biemold.nl/jupgrade/index.php/webshop/view/category/virtuemart_category_id/80

I put some text (sdsdsd) in the php override file to be sure I got the correct one

This is my category override:

<?php
/**
*
* Show the products in a category
*
* @package    VirtueMart
* @subpackage
* @author RolandD
* @author Max Milbers
* @todo add pagination
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 5120 2011-12-18 18:29:26Z electrocity $
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
JHTML::_'behavior.modal' );
/* javascript for list Slide
  Only here for the order list
  can be changed by the template maker
*/
$js "
jQuery(document).ready(function () {
    jQuery('.orderlistcontainer').hover(
        function() { jQuery(this).find('.orderlist').stop().show()},
        function() { jQuery(this).find('.orderlist').stop().hide()}
    )
});
"
;

$document JFactory::getDocument();
$document->addScriptDeclaration($js);
?>


<div class="category_description">
    <?php echo $this->category->category_description ?>
</div>
<?php
/* Show child categories */

if ( VmConfig::get('showCategory',1) ) {
    if (
$this->category->haschildren) {

        
// Category and Columns Counter
        
$iCol 1;
        
$iCategory 1;

        
// Calculating Categories Per Row
        
$categories_per_row VmConfig::get 'categories_per_row');
        
$category_cellwidth ' width'.floor 100 $categories_per_row );

        
// Separator
        
$verticalseparator " vertical-separator";
        
?>


        <div class="category-view">

        <?php // Start the Output
        
if(!empty($this->category->children)){
        foreach ( 
$this->category->children as $category ) {

            
// Show the horizontal seperator
            
if ($iCol == && $iCategory $categories_per_row) { ?>

            <div class="horizontal-separator"></div>
            <?php }

            
// this is an indicator wether a row needs to be opened or not
            
if ($iCol == 1) { ?>

            <div class="row">
            <?php }

            
// Show the vertical seperator
            
if ($iCategory == $categories_per_row or $iCategory $categories_per_row == 0) {
                
$show_vertical_separator ' ';
            } else {
                
$show_vertical_separator $verticalseparator;
            }

            
// Category Link
            
$caturl JRoute::'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' $category->virtuemart_category_id );

                
// Show Category ?>

                <div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
                    <div class="spacer">
                        <h2>
                            <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                            <?php echo $category->category_name ?>
                            <br />
                            <?php // if ($category->ids) {
                                
echo $category->images[0]->displayMediaThumb("",false);
                            
//} ?>

                            </a>
                        </h2>
                    </div>
                </div>
            <?php
            $iCategory 
++;

        
// Do we need to close the current row now?
        
if ($iCol == $categories_per_row) { ?>

        <div class="clear"></div>
        </div>
            <?php
            $iCol 
1;
        } else {
            
$iCol ++;
        }
    }
    }
    
// Do we need a final closing row tag?
    
if ($iCol != 1) { ?>

        <div class="clear"></div>
        </div>
    <?php ?>
</div>
<?php }
}

// Show child categories
if (!empty($this->products)) {
    if (!empty(
$this->keyword)) {
        
?>

        <h3><?php echo $this->keyword?></h3>
        <?php
    
}
    
?>


<?php // Category and Columns Counter
$iBrowseCol 1;
$iBrowseProduct 1;

// Calculating Products Per Row
$BrowseProducts_per_row $this->perRow;
$Browsecellwidth ' width'.floor 100 $BrowseProducts_per_row );

// Separator
$verticalseparator " vertical-separator";
?>


<div class="browse-view">

    <h1><?php echo $this->category->category_name?></h1>
        <form action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&limitstart=0&virtuemart_category_id='.$this->category->virtuemart_category_id ); ?>" method="get">
        <?php if ($this->search) { ?>
        <!--BEGIN Search Box --><div class="virtuemart_search">
        <?php echo $this->searchcustom ?>
        <br />
        <?php echo $this->searchcustomvalues ?>
        <input style="height:16px;vertical-align :middle;" name="keyword" class="inputbox" type="text" size="20" value="<?php echo $this->keyword ?>" />
        <input type="submit" value="<?php echo JText::_('COM_VIRTUEMART_SEARCH'?>" class="button" onclick="this.form.keyword.focus();"/>
        </div>
                <input type="hidden" name="search" value="true" />
                <input type="hidden" name="view" value="category" />


        <!-- End Search Box -->
        <?php ?>
            <div class="orderby-displaynumber">
                <div class="orderByList">
                    <?php echo $this->orderByList['orderby']; ?>
                    <?php echo $this->orderByList['manufacturer']; ?>
                </div>
                <div class="display-number"><div><?php echo $this->vmPagination->getResultsCounter();?></div><?php echo $this->vmPagination->getLimitBox(); ?></div>
<div class="clear"></div>
            </div><div id="bottom-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?></div><div style="text-align:center;"><?php echo $this->vmPagination->getPagesCounter(); ?></div>
        </form>
<?php // Start the Output
foreach ( $this->products as $product ) {

    
// Show the horizontal seperator
    
if ($iBrowseCol == && $iBrowseProduct $BrowseProducts_per_row) { ?>

    <div class="horizontal-separator"></div>
    <?php }

    
// this is an indicator wether a row needs to be opened or not
    
if ($iBrowseCol == 1) { ?>

    <div class="row">
    <?php }

    
// Show the vertical seperator
    
if ($iBrowseProduct == $BrowseProducts_per_row or $iBrowseProduct $BrowseProducts_per_row == 0) {
        
$show_vertical_separator ' ';
    } else {
        
$show_vertical_separator $verticalseparator;
    }

        
// Show Products ?>

        <div class="produkt floatleft<?php echo $Browsecellwidth $show_vertical_separator ?>">
            <div class="spacer">
                <div class="nadpis">
                <h2><?php echo JHTML::link($product->link$product->product_name); ?></h2>
                    <div class="obrazek">
          <?php /** @todo make image popup */
                            
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');
                        
?>


             </div>
                        <!-- The "Average Customer Rating" Part -->
                        <?php if (VmConfig::get('pshop_allow_reviews') == 1) { ?>
                        <span class="contentpagetitle"><?php echo JText::_('COM_VIRTUEMART_CUSTOMER_RATING'?>:</span>
                        <br />
                        <?php
                        
// $img_url = JURI::root().VmConfig::get('assets_general_path').'/reviews/'.$product->votes->rating.'.gif';
                        // echo JHTML::image($img_url, $product->votes->rating.' '.JText::_('COM_VIRTUEMART_REVIEW_STARS'));
                        // echo JText::_('COM_VIRTUEMART_TOTAL_VOTES').": ". $product->votes->allvotes; 
?>

                        <?php ?>

                        <?php if (!VmConfig::get('use_as_catalog')){?>
                        <div class="paddingtop8">
                             <span class="vmicon vm2-<?php /*echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip */?>"></span>
                            <span class="stock-level"><?php /* echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') */?></span>
                        </div>
                        <?php }?>
                </div>

<div class="popis">
                        <?php // Product Short Description
                        
if(!empty($product->product_s_desc)) { ?>

                        <p class="product_s_desc">
                        <?php echo shopFunctionsF::limitStringByWord($product->product_s_desc40'...'?>
                        </p>
                        <?php ?>

                    <div class="product-price marginbottom12" id="productPrice<?php echo $product->virtuemart_product_id ?>">
                    <?php
                    
if ($this->show_prices == '1') {
                        if( 
$product->product_unit && VmConfig::get('vm_price_show_packaging_pricelabel')) {
                            echo 
"<strong>"JText::_('COM_VIRTUEMART_CART_PRICE_PER_UNIT').' ('.$product->product_unit."):</strong>";
                        }
                        if(empty(
$product->prices) and VmConfig::get('askprice',1) and empty($product->images[0]->file_is_downloadable) ){
                            echo 
JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                        }

                        
//todo add config settings
                        
if( $this->showBasePrice){
                            echo 
$this->currency->createPriceDiv('basePrice','COM_VIRTUEMART_PRODUCT_BASEPRICE',$product->prices);
                            echo 
$this->currency->createPriceDiv('basePriceVariant','COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT',$product->prices);
                            }
                        echo 
$this->currency->createPriceDiv('variantModification','COM_VIRTUEMART_PRODUCT_VARIANT_MOD',$product->prices);
                        echo 
$this->currency->createPriceDiv('basePriceWithTax','COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX',$product->prices);
                        echo 
$this->currency->createPriceDiv('discountedPriceWithoutTax','COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE',$product->prices);
                        echo 
$this->currency->createPriceDiv('salesPriceWithDiscount','COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT',$product->prices);
                        echo 
$this->currency->createPriceDiv('salesPrice','COM_VIRTUEMART_PRODUCT_SALESPRICE',$product->prices);
                        echo 
$this->currency->createPriceDiv('priceWithoutTax','COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX',$product->prices);
                        echo 
$this->currency->createPriceDiv('discountAmount','COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT',$product->prices);
                        echo 
$this->currency->createPriceDiv('taxAmount','COM_VIRTUEMART_PRODUCT_TAX_AMOUNT',$product->prices);
                        
                        echo 
$this->currency->createPriceDiv('PricesalesPrice','COM_VIRTUEMART_PRODUCT_PRICE_SALES_PRICE',$product->prices);
                    } 
?>

                    dsdsds
                    </div>
                    <div class="dbox">
                    <?php // Product Details Button
                    
echo JHTML::link($product->linkJText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name,'class' => 'product-details'));
                    
?>
    </div>
      <div class="cbox"> <form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
            <?php // Display the quantity box ?>
                <input style="display:none;" type="text" class="quantity-input" name="quantity[]" value="1" />   
            <?php // Display the quantity box END ?>

            <?php // Add the button
            
$button_lbl JText::_('COM_VIRTUEMART_CART_ADD_TO');
            
$button_cls ''//$button_cls = 'addtocart_button';
            
if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
                
$button_lbl JText::_('COM_VIRTUEMART_CART_NOTIFY');
                
$button_cls 'notify-button';
            } 
?>


            <?php // Display the add to cart button ?>
            <span class="addtocart-button">
                <input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
            </span>



        <?php // Display the add to cart button END ?>
        <input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
        <input type="hidden" name="option" value="com_virtuemart" />
        <input type="hidden" name="view" value="cart" />
        <noscript><input type="hidden" name="task" value="add" /></noscript>
        <input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>" />
        <?php /** @todo Handle the manufacturer view */ ?>
        <input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
        <input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
     </form>
                    </div>

           
            <div class="clear"></div>
            </div>     </div>
        </div>
    <?php
    $iBrowseProduct 
++;

    
// Do we need to close the current row now?
    
if ($iBrowseCol == $BrowseProducts_per_row) { ?>

    <div class="clear"></div>
    </div>
        <?php
        $iBrowseCol 
1;
    } else {
        
$iBrowseCol ++;
    }
}
// Do we need a final closing row tag?
if ($iBrowseCol != 1) { ?>

    <div class="clear"></div>
    </div>
<?php
}
?>

    <div id="bottom-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?><div style="text-align:center"><?php echo $this->vmPagination->getPagesCounter(); ?></div></div>
</div>
<?php ?>


Does anyone know a answer?
Thanks in advance!

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

gpessoa

Or does an upgrade to version 2.0.13
I think it already have the problem solved...
http://dev.virtuemart.net/projects/virtuemart/files
J 3.10.5; VM 3.4.2; PHP 7.2.34

Poiter

Bytelord,

Thank you that fixed it!