Avisos
Vaciar todo

Hosting WordPress 70% dto Dominios promo

Añadir codigo junto al valor precio en Virtuemart  

 
Fernando
 Fernando
Usuario experto

estoy añadiendo código a mi pagina ya añadí el codigo para que se reconozca titulo y imagen, ahora estoy con precio.

el archivo es templates/ja_tiris/html/com_virtuemart/productdetails/default.php

y se que es por esta parte pero no se donde tengo que colocarlo exactamente

// Product Price
?>
<div class="product-price" id="productPriceproduct->virtuemart_product_id ?>">
product->product_unit && VmConfig::get ( 'price_show_packaging_pricelabel' )) {
echo "" . JText::_ ( 'COM_VIRTUEMART_CART_PRICE_PER_UNIT' ) . ' (' . $this->product->product_unit . "):";
} else {
echo "" . JText::_ ( 'COM_VIRTUEMART_CART_PRICE' ) . ":";
}
if (empty($this->product->prices) and VmConfig::get('askprice', 1)) {
?>
<a class="ask-a-question bold" href="" >
showBasePrice) {
echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );
echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
}
if ($this->product->prices['discountAmount'] != '0' && $this->product->prices['discountAmount'] != '') {
echo $this->currency->createPriceDiv ( 'variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices );
echo $this->currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices );
echo $this->currency->createPriceDiv ( 'discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE', $this->product->prices );
echo $this->currency->createPriceDiv ( 'salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices );
echo $this->currency->createPriceDiv ( 'priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices );
echo $this->currency->createPriceDiv ( 'discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices );
echo $this->currency->createPriceDiv ( 'taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices );
}
echo $this->currency->createPriceDiv ( 'salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices );
echo '

';
}
?>

el código a añadir es el que sale en la captura de pantalla, que es como tiene que quedar al ver el codigo con firebug de la web

URL del sitio: Contenido solo visible a usuarios registrados

Citar
Respondido : 23/07/2013 4:45 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola Fernando

Te sugiero realizar una copia completa de los archivos de la carpeta original, haciendo el overrides de todo

Todos los archivos desde la carpeta
/components/com_virtuemart/views/productdetails/tmpl

Copia a la carpeta de tu template
/templates/ja_tiris/html/com_virtuemart/productdetails/

El código de los precios que quieres reemplazar o cambiar, dependiendo de la versión de virtuemart que estas usando, en algunas versiones puede estar en default.php otras en default_showprices.php

Saludos.

ResponderCitar
Respondido : 23/07/2013 7:04 pm

Gestor de Contraseñas - VPN Conexión Segura - Gestor 2FA (Segundo Factor de Autenticación

Fernando
 Fernando
Usuario experto

era los archivos que estaba tocando pero no se donde colocarlo exactamente hay muchas variables para precio, a ver si me puedes decir cual es. Gracias

archivo delfaul.php

setMetaData('og:title', $this->product->product_name);
$doc->setMetaData('og:description', (strip_tags($this->product->product_desc) != '' ? strip_tags($this->product->product_desc) : $this->product->product_name));
if (!empty($this->product->images[0])) {
$doc->setMetaData('og:image', JURI::root().$this->product->images[0]->file_url);
}
$doc->setMetaData('og:site_name', $config->getValue('sitename'));
$doc->setMetaData('og:url', 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]);

// addon for joomla modal Box
JHTML::_('behavior.modal');
// JHTML::_('behavior.tooltip');
$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component');
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('a.ask-a-question').click( function(){
$.facebox({
iframe: '" . $url . "',
rev: 'iframe|550|550'
});
return false ;
});
/* $('.additional-images a').mouseover(function() {
var himg = this.href ;
var extension=himg.substring(himg.lastIndexOf('.')+1);
if (extension =='png' || extension =='jpg' || extension =='gif') {
$('.main-image img').attr('src',himg );
}
console.log(extension)
});*/
});
");
/* Let's see if we found the product */
if (empty($this->product)) {
echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '

' . $this->continue_link_html;
return;
}
?>

product->neighbours ['previous'][0])) {
$prev_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id);
echo JHTML::_('link', $prev_link, $this->product->neighbours ['previous'][0]
['product_name'], array('class' => 'previous-page'));
}
if (!empty($this->product->neighbours ['next'][0])) {
$next_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id);
echo JHTML::_('link', $next_link, $this->product->neighbours ['next'][0] ['product_name'], array('class' => 'next-page'));
}
?>

product->product_name ?>

product->event->afterDisplayTitle ?>

edit_link;
// Product Edit Link END
?>

product->product_s_desc)) {
?>

product->product_s_desc);
?>

product->customfieldsSorted['ontop'])) {
$this->position = 'ontop';
echo $this->loadTemplate('customfields');
} // Product Custom ontop end
?>

product->virtuemart_product_id;
$MailLink = 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component';

if (VmConfig::get('pdf_icon', 1) == '1') {
echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_button_enable', false);
}
echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'show_emailfriend');
?>

product->virtuemart_vendor_id);
$text = JText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
echo ''. JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). ''; ?><a class="modal" href="">

*/
?>

showRating) {
$maxrating = VmConfig::get('vm_maximum_rating_scale', 5);

if (empty($this->rating)) {
?>

rating->rating * 100 ) / $maxrating; //I don't use round as percetntage with works perfect, as for me
?>

rating->rating, 2) . '/' . $maxrating; ?>
<span title=" rating->rating . '/' . $maxrating) ?>" class="vmicon ratingbox" style="display:inline-block;">
<span class="stars-orange" style="width:">



productDisplayShipments)) {
foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment . '
';
}
}
if (is_array($this->productDisplayPayments)) {
foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment . '
';
}
}
// 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');

// Product Price
?>
<div class="product-price" id="productPriceproduct->virtuemart_product_id ?>">
product->product_unit && VmConfig::get ( 'price_show_packaging_pricelabel' )) {
echo "" . JText::_ ( 'COM_VIRTUEMART_CART_PRICE_PER_UNIT' ) . ' (' . $this->product->product_unit . "):";
} else {
echo "" . JText::_ ( 'COM_VIRTUEMART_CART_PRICE' ) . ":";
}
if (empty($this->product->prices) and VmConfig::get('askprice', 1)) {
?>
<a class="ask-a-question bold" href="" >
showBasePrice) {
echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );
echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
}
if ($this->product->prices['discountAmount'] != '0' && $this->product->prices['discountAmount'] != '') {
echo $this->currency->createPriceDiv ( 'variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices );
echo $this->currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices );
echo $this->currency->createPriceDiv ( 'discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE', $this->product->prices );
echo $this->currency->createPriceDiv ( 'salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices );
echo $this->currency->createPriceDiv ( 'priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices );
echo $this->currency->createPriceDiv ( 'discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices );
echo $this->currency->createPriceDiv ( 'taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices );
}
echo $this->currency->createPriceDiv ( 'salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices );
echo '

';
}
?>

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
?>

product->virtuemart_manufacturer_id)) {
?>

product->virtuemart_manufacturer_id . '&tmpl=component');
$text = $this->product->mf_name;

/* Avoid JavaScript on PDF Output */
if (strtolower(JRequest::getWord('output')) == "pdf") {
echo JHTML::_('link', $link, $text);
} else {
?>

<a class="button" href="" >
<!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="">-->

product->product_availability)) {
$stockhandle = VmConfig::get('stockhandle', 'none');
if ($stockhandle == 'risetime' and ($this->product->product_in_stock - $this->product->product_ordered)

'availability')); ?>
product->product_availability, $this->product->product_availability, array('class' => 'availability')); ?>

<a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="">






product->event->beforeDisplayContent; ?>

product->product_desc)) {
?>


product->product_desc; ?>

product->customfieldsSorted['normal'])) {
$this->position = 'normal';
echo $this->loadTemplate('customfields');
} // Product custom_fields END
// Product Packaging
$product_packaging = '';
if ($this->product->packaging || $this->product->box) {
?>

product->packaging) {
$product_packaging .= JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING1') . $this->product->packaging;
if ($this->product->box)
$product_packaging .= '
';
}
if ($this->product->box)
$product_packaging .= JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING2') . $this->product->box;
echo str_replace("{unit}", $this->product->product_unit ? $this->product->product_unit : JText::_('COM_VIRTUEMART_PRODUCT_FORM_UNIT_DEFAULT'), $product_packaging);
?>

product->images as $fkey => $file) {
// Todo add downloadable files again
// if( $file->filesize > 0.5) $filesize_display = ' ('. number_format($file->filesize, 2,',','.')." MB)";
// else $filesize_display = ' ('. number_format($file->filesize*1024, 2,',','.')." KB)";

/* Show pdf in a new Window, other file types will be offered as download */
// $target = stristr($file->file_mimetype, "pdf") ? "_blank" : "_self";
// $link = JRoute::_('index.php?view=productdetails&task=getfile&virtuemart_media_id='.$file->virtuemart_media_id.'&virtuemart_product_id='.$this->product->virtuemart_product_id);
// echo JHTMl::_('link', $link, $file->file_title.$filesize_display, array('target' => $target));
// }
if (!empty($this->product->customfieldsRelatedProducts)) { ?>

product->customfieldsRelatedCategories)) { ?>

loadTemplate('showcategory');
}
if (!empty($this->product->customfieldsSorted['onbot'])) {
$this->position='onbot';
echo $this->loadTemplate('customfields');
} // Product Custom ontop end
?>

product->event->afterDisplayContent; ?>

loadTemplate('reviews');
?>

Y este es default_showprices.php

<div class="product-price" id="productPriceproduct->virtuemart_product_id ?>">
product->prices);
if (!empty($this->product->prices)) {
echo "" . JText::_ ('COM_VIRTUEMART_CART_PRICE') . "";
}
//vmdebug('view productdetails layout default show prices, prices',$this->product);
if (empty($this->product->prices['salesPrice']) and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
?>
<a class="ask-a-question bold" href="askquestion_url ?>">
showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['basePriceVariant'][1]) != $this->product->prices['basePriceVariant']) {
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices);
}

}
echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices);
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "";
}
if (round($this->product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices);
}
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices);
echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);
$unitPriceDescription = JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', JText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$this->product->product_unit));
echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $this->product->prices);
}
?>

ResponderCitar
Respondido : 23/07/2013 7:38 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola Fernando

A partir de las sentencias : if ($this->showBasePrice) , se muestra los precios.

Sin embargo tus archivos de virtuemart ya deben incluir código para mostrar el precio, por lo que no tiene sentido repetir el código, indícanos exactamente que es lo que quieres conseguir al poner este codigo.

Para dar un comportamiento diferente a los precios se requiere tener conocimiento de programación. Ten en cuenta que a través de este foro no atendemos consultas de programación.

Saludos.

ResponderCitar
Respondido : 23/07/2013 9:05 pm

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

Fernando
 Fernando
Usuario experto

quiero añadirle lo que sale en amarillo dentro del recuadro de la imagen adjunta.

Son las etiquetas para inidcar el microdato precio para indicar a google que es ese dato es un precio

ResponderCitar
Respondido : 23/07/2013 9:59 pm
Johnny Heredia Montiel
 Johnny Heredia Montiel
Miembro Moderator

Hola Fernando,

No atendemos consultas de CSS ni Programación en el foro, después de nuestra experiencia de varios años atendiendo consultas sobre Joomla nos encontramos que la mayoría de usuarios que quieren modificar CSS acaban "estropeando" sus webs o bien por hacer modificaciones que luego no funcionan en los diferentes navegadores o bien por hacer modificaciones que acaban empeorando el diseño original de la plantilla.

Creemos que los clientes que no tienen conocimientos de CSS es mejor que usen joomla, para sacarle más partido a los contenidos y funcionalidades que permite joomla o sus extensiones y no creemos que sea recomendable realizar cambios CSS, para ello recomendamos usar plantillas profesionales de los diferentes clubes que desarrollan plantillas para joomla y partiendo de una buena plantilla rara vez es necesario tener que cambiar CSS.

Los clubes que actualmente más recomendamos para plantillas profesionales Joomla son http://www.gavick.com y http://www.joomlart.com

En todo caso, si prefieres cambiar CSS te recomendamos que aprendas a usar Firebug con el que podrás aprender a modificar CSS, aquí tienes un vídeo de ejemplo que le ayudará a utilizarlo:

También te recomendamos estos libros gratuitos sobre CSS que te permitirán iniciarte en CSS, tienes el libro de introducción y el avanzado:
http://www.librosweb.es/

Podemos recomendarle que consulte disponibilidad, condiciones y coste con nuestras empresas colaboradoras, especializadas en personalizaciones para Joomla.
Aquí tiene el Directorio de Empresas colaboradoras de webempresa.com:
https://www.webempresa.com/directorio-colaboradores.html

Saludos.

ResponderCitar
Respondido : 24/07/2013 12:17 am

Cursos Gratuitos WordPress