Back to top

Autore Topic: modulo Virtuemart Showcase  (Letto 3624 volte)

Offline cicciofarmaco

  • Appassionato
  • ***
  • Post: 455
  • Sesso: Maschio
    • Mostra profilo
modulo Virtuemart Showcase
« il: 26 Ott 2009, 18:00:40 »
Ciao gente,
sapreste dirmi come modificare il prezzo da € 52.8833 a 52.88 (vedi immagine allegata) e come fare apparire il prezzo ivato, anzichè iva esclusa?

Di seguito vi posto il codice php del modulo!

<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );


$nr_products        = $params->get( 'nr_products', '6' );
$vmchars            = $params->get( 'vmchars', '50' );
$currency           = $params->get( 'currency', '€' );
$image_height       = $params->get( 'image_height', '75px' );
$image_width        = $params->get( 'image_width', '75px' );
$image_align        = $params->get( 'image_align', 'left' );
$ordering           = $params->get('ordering',3);
$show_addcart       = $params->get( 'show_addcart', '1' );
$show_price         = $params->get( 'show_price', '1' );
$slide_width        = $params->get( 'slide_width', '750px' );
$slide_height       = $params->get( 'slide_height', '160px' );
$max_show           = $params->get( 'max_show', '4' );
$bann_itemid      = $params->get( 'bann_itemid', '' );
$bann_catsid        = $params->get( 'bann_catsid', '' );
$vms_durration      = $params->get( 'vms_durration', '500' );
$vms_autoslide      = $params->get( 'vms_autoslide', '3000' );


// DO NOT  EDIT BELOW THIS LINE --------------------------------------
if($ordering == 1){
$order = '#__vm_product.product_id DESC';
}elseif($ordering == 2){
$order = '#__vm_product.product_id ASC';
}elseif ($ordering == 3){
$order = 'RAND()';
}
JHTML::_("behavior.mootools");

$document   =& JFactory::getDocument();
$document->addStyleSheet(JURI :: base().'modules/mod_yj_vm_showcase/css/style.css');
$document->addScript(JURI :: base().'modules/mod_yj_vm_showcase/lib/Showcase.js');

// Load the virtuemart main parse code
if( file_exists(dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' )) {
require_once( dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' );
} else {
require_once( dirname(__FILE__).'/../components/com_virtuemart/virtuemart_parser.php' );
}
require_once( CLASSPATH . 'ps_product.php');
$ps_product = new ps_product;
$db =& new ps_DB;     
global $VM_LANG, $vm_mainframe;
global $database;
if($bann_itemid != '') $restrict_product = "AND #__vm_product.product_id NOT IN (".$bann_itemid.")";
if($bann_catsid != '') $restrict_category  = "AND category_id NOT IN (".$bann_catsid.")";

$sql = "SELECT  #__vm_product.product_id,category_id,product_thumb_image,product_name,product_price,product_desc FROM #__vm_product"
."\n INNER JOIN #__vm_product_price ON #__vm_product.product_id  = #__vm_product_price.product_id"
."\n INNER JOIN #__vm_product_category_xref ON #__vm_product.product_id = #__vm_product_category_xref.product_id"
."\n WHERE product_publish = 'Y' ".$restrict_category." ".$restrict_product." ORDER BY ".$order." LIMIT ".$nr_products  ."";

$database->setQuery( $sql );
$load_prices = $database->loadObjectList();

$sql2 = "SELECT id FROM #__menu WHERE link ='index.php?option=com_virtuemart' ";
$database->setQuery( $sql2 );
$load_itemid = $database->loadObjectList();
foreach ( $load_itemid as $vmitemid ) {
$WMItemid = $vmitemid->id;
}

?>
<script language="javascript" type="text/javascript">
   window.addEvent('load', function(){
      new Showcase({
         container : 'overall_container',
         items :'.yjwm_scproduct',
         itemWidth : <?php  echo $slide_width / $max_show  ?>,
         visibleItems: <?php  echo $max_show  ?>,
         effectDuration : <?php echo $vms_durration  ?>,
         autoSlide : <?php echo $vms_autoslide ?>,
         mouseEventSlide: 1000,
         navigation: {
            'forward':'linkForward',
            'back':'linkBackward'
         }
      });
   })
</script>


<!-- http://www.Youjoomla.com  Youjoomla Virtuemart Showcase Module for Joomla 1.5 starts here -->

<div id="overall_container" style="height:<?php echo $slide_height ?>;width:<?php echo $slide_width + 124 ?>px;">
    <div class="right_nav_link" style="height:<?php echo $slide_height ?>;"><a class="linkForward" id="linkForward" style="height:<?php echo $slide_height ?>;">[/url]</div>
    <div class="yjwm_showcase_holder" style="width:<?php echo $slide_width ?>; height:<?php echo $slide_height ?>;">
    <?php
   foreach ( $load_prices as $produkti ) {
$productlink = "index.php?page=shop.product_details&amp;flypage=".$ps_product->get_flypage($db->f("product_id"))."&amp;product_id=".$produkti->product_id."&amp;category_id=".$produkti->category_id."&amp;option=com_virtuemart&amp;Itemid=".$WMItemid;
$productintro    = substr(strip_tags($produkti->product_desc),0,$vmchars);
$ptitle         = $produkti->product_name;
$pimage         =  'components/com_virtuemart/shop_image/product/'.$produkti->product_thumb_image.'';
$pimageatt      = ' height="'.$image_height.'" width= "'.$image_width.'" alt="'.$ptitle.'" title="'.$ptitle.'" ';
$pprice =  $currency.$produkti->product_price;
?>
        <div class="yjwm_scproduct" style="height:<?php echo $slide_height ?>; width:<?php  echo $slide_width / $max_show  ?>px;">
        <div class="yjwm_sc_in" style="height:<?php echo $slide_height - 2 ?>px; width:<?php  echo $slide_width / $max_show -5  ?>px;">
       <h3><a href="<?php echo JRoute::_($productlink) ?>"><?php echo $ptitle  ?>[/url]</h3>

        <p style="height:<?php echo $slide_height - 90 ?>px;">        <a href="<?php echo JRoute::_($productlink) ?>">
        <img src="<?php echo $pimage ?>" <?php echo $pimageatt ?>  align="<?php echo $image_align  ?>" />[/url]<?php echo $productintro ?></p>
<?php if ($show_price == 1 || $show_addcart == 1){ ?>       
        <div class="yjvmsc_price_cart">
        <?php if ($show_price == 1){ ?>
        <div class="price"><?php echo $pprice?></div>  <?php } ?>
         <div class="yjwmsc_moreinfo"><a href="<?php echo JRoute::_($productlink) ?>">more info[/url]</div>
<?php if ($show_addcart == 1){ ?>
<div class="yjvmsc_products_cart">
<form action="index.php?option=com_virtuemart&amp;Itemid=<?php echo $WMItemid ?>" method="post">
    <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="page" value="shop.cart" />
    <input type="hidden" name="Itemid" value="<?php echo $WMItemid ?>" />
    <input type="hidden" name="func" value="cartAdd" />
    <input type="hidden" name="prod_id" value="<?php echo $produkti->product_id ?>" />
    <input type="hidden" name="product_id" value="<?php echo $produkti->product_id ?>" />
    <input type="hidden" name="quantity" value="1" />
    <input type="hidden" name="set_price[]" value="" />
    <input type="hidden" name="adjust_price[]" value="" />
    <input type="hidden" name="master_product[]" value="" />
    <input type="submit" class="yjvmsc_addtocart_button" value="Add to Cart" title="Add to Cart" />
    </form>
    </div>
    <?php } ?>
        </div>
      <?php } ?> 
        </div>
        </div>
       
       
       
       
        <?php } ?>
    </div>
   <div class="left_nav_link" style="height:<?php echo $slide_height ?>;" > <a class="linkBackward"  id="linkBackward" style="height:<?php echo $slide_height ?>;" >[/url]</div>
</div>





Grazie,
Francesco
« Ultima modifica: 26 Ott 2009, 20:06:12 da cicciofarmaco »
My photostream web site - My Flickr

Offline jk4nik

  • Instancabile
  • ******
  • Post: 6517
  • Sesso: Maschio
    • Mostra profilo
Re:modulo Virtuemart Showcase
« Risposta #1 il: 26 Ott 2009, 19:16:46 »
hai guardato nel pannello di controllo?
sono lì le opzioni.

ciao
jk
Sta per essere approvata la nuova nomenclatura per le taglie dei reggiseni: essi saranno d'ora in poi descritti con le lettere dell'alfabeto ABCDEF: A - Apprezzabile B - Buona C - Cannonata D - Discreta E - Esagerata F - Falsa

Offline cicciofarmaco

  • Appassionato
  • ***
  • Post: 455
  • Sesso: Maschio
    • Mostra profilo
Re:modulo Virtuemart Showcase
« Risposta #2 il: 26 Ott 2009, 20:05:36 »
Si, sono andato su Componenti > Virtuemart > Modifica negozio > Stile Visualizzazione Valuta ed ho impostato "Decimali: 0", tuttavia ancora il modulo visualizza le cifre decimali (es. €67.33000).



« Ultima modifica: 27 Ott 2009, 17:16:58 da cicciofarmaco »
My photostream web site - My Flickr

 



Web Design Bolzano Kreatif