Здравствуйте.

Установлена Joomla! 2.5.6 + VirtueMart 2.0.10 все работает, думаю не плохо:

http://eda2.realsvyaz.ru/index.php/%D0%B1%D0%B0%D0%BA%D0%B0%D0%BB%D0%B5%D1%8F/%D0%BC%D1%83%D0%BA%D0%B0/1%D0%BA%D0%B3-%D0%BC%D1%83%D0%BA%D0%B0-%D0%B2-%D1%81-%D0%BC%D0%B0%D0%BA%D1%84%D0%B02012-07-31-12-58-35_-detail
Столкнулся с такой проблемой: при добавлении товара в корзину, всплывает модальное окно, что товар добавлен и предлагает нам пройти в корзину или продолжить совершать покупки.
! Кто подскажет, как поместить в это модальное окно кнопку "Добавить товар"? Что бы кнопка была и на странице и в модальном окне.
Надо что было вот так:
--------------------------------------------------------------------------------------------------------------------
!
Копаю вот этот файл /components/com_virtuemart/controllers/cart.php
По сути делаю все правильно, но где косяк?
Вот код:
/**
* Add the product to the cart, with JS: PML
*
*/
public function addJS() {
//maybe we should use $mainframe->close(); or jexit();instead of die;
/* Load the cart helper */
//require_once(JPATH_VM_SITE.DS.'helpers'.DS.'cart.php');
$this->json = null;
$cart = VirtueMartCart::getCart(false);
if ($cart) {
// Get a continue link */
$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
if ($virtuemart_category_id) {
$categoryLink = '&view=category&virtuemart_category_id=' . $virtuemart_category_id;
} else
$categoryLink = '';
$continue_link = JRoute::_('index.php?option=com_virtuemart' . $categoryLink);
$virtuemart_product_ids = JRequest::getVar('virtuemart_product_id', array(), 'default', 'array');
$errorMsg = JText::_('COM_VIRTUEMART_CART_PRODUCT_ADDED');
if ($cart->add($virtuemart_product_ids, $errorMsg )) {
$this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING'). '</a>';
$this->json->msg .= '<a class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart"). '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL'). '</a>';
//pml1 - Тут я пробую вставить кнопку но ни чего не получается.
$this->json->msg .= '<p>' . JText::_('<input type="submit" name="<?php echo $button_name ?>" class="<?php echo $button_cls ?>" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />'). '</p>';
//pml end
if ($errorMsg) $this->json->msg .= '<div>'.$errorMsg.'</div>';
$this->json->stat = '1';
} else {
// $this->json->msg = '<p>' . $cart->getError(). '</p>';
$this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING'). '</a>';
$this->json->msg .= '<div>'.$errorMsg.'</div>';
$this->json->stat = '2';
}
} else {
$this->json->msg = '<a href="' . JRoute::_('index.php?option=com_virtuemart'). '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING'). '</a>';
$this->json->msg .= '<p>' . JText::_('COM_VIRTUEMART_MINICART_ERROR'). '</p>';
$this->json->stat = '0';
}
//$this->json->msg='<img src="http://eda2.realsvyaz.ru/images/stories/virtuemart/product/resized/6409_250px6_190x190.jpg">';
echo json_encode($this->json);
jExit();
}
//END PML