News:

Support the VirtueMart project and become a member

Main Menu

changing add to cart popup

Started by r_ekkie, August 14, 2013, 15:40:03 PM

Previous topic - Next topic

r_ekkie

I'm using the great fancybox for the add to cart.

but is there allready anybody that knows how I can add the following things in padded.php?:

product picture, and price for the added product


add to cart button and prices for the related products in the fancybox

Thanks

Maxim Pishnyak

Did you try to dig that file? Maybe you saw there row that displays product sku?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

r_ekkie

openingen the file. I cannot see any row displaying the product sku. I only see the related product and the row telling product is added or the number being changed.

thanks

Maxim Pishnyak

Just checked. I saw there words about product name. Now try to go further.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

jenkinhill

#4
Quote from: r_ekkie on August 14, 2013, 15:40:03 PM
add to cart button and prices for the related products in the fancybox

I don't think that can be done as it will be using nested AJAX calls - would need extensive JavaScript rewriting.

As for showing product image & price I suppose that could be coded as the product id and price are available in the session, but it would take some time - how long depends on your skill level. Maybe see if any of these calls work on padded.php - http://forum.virtuemart.net/index.php?topic=92756.0
Personally I can't see the need for it as the product image and price will be visible behind the popup.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Zegenrijk

See this solution to add related products price, discount amount, salesprice.

<?php
/**
*
* Layout for the add to cart popup
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
*
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2013 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: cart.php 2551 2010-09-30 18:52:40Z milbo $
*/

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

echo 
'<a class="continue" href="' $this->continue_link '" >' JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo 
'<a class="showcart floatright" href="' $this->cart_link '">' JText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
if(
$this->product){
echo '<h4>'.JText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$this->product->product_name,$this->product->quantity).'</h4>';
}

if (
$this->errorMsg) echo '<div>'.$this->errorMsg.'</div>';




defined '_JEXEC' ) or die ( 'Restricted access' );
$model = new VirtueMartModelProduct();
$calculator calculationHelper::getInstance();
$currency CurrencyDisplay::getInstance();
?>

        <div class="product-related-products">
   

    <?php
    
foreach ($this->product->customfieldsRelatedProducts as $field) {
    if(!empty($field->display)) {
?>
<div class="product-field product-field-type-<?php echo $field->field_type ?>">
    <span class="product-field-display" style="min-height:200px"><?php echo $field->display ?></span>

  <span class="product-field-desc"><?php

echo jText::_($field->custom_field_desc);

$product $model->getProductSingle($field->custom_value,false);
$price $calculator -> getProductPrices($product);
echo 
'<span class="rel_sp" >' .  $currency->priceDisplay($price['salesPrice']) . "</span>";
echo 
'<span class="rel_price-cros" >' .  $currency->priceDisplay($price['basePriceWithTax']) . "</span>";
echo 
'<span class="rel_discount" >SAVE: ' .  $currency->priceDisplay($price['discountAmount']) . "</span>";
?>

</span>

</div>


<?php }
    } ?>

        </div>

<br style="clear:both">

wdad

Hallo Zegenrijk,

wich file is this?

Thanks, Helmut
www.kueche1a.eu
VirtueMart 4.2.0 10905 , Joomla! 3.10.12

wdad

now i found padded.php
Is it possible to insert a button like "add to cart"?
www.kueche1a.eu
VirtueMart 4.2.0 10905 , Joomla! 3.10.12