0 Пользователей и 1 Гость просматривают эту тему.
  • 0 Ответов
  • 1523 Просмотров
*

iZacNT

  • Осваиваюсь на форуме
  • 29
  • 0 / 0
Доброго времени суток!

Не работает удаление товара из корзины. нажимаю на кнопку удалить и ни чего не происходит VirtueMart 2.0.12f
Собственно сделал кноку добавить в корзину на странице категорий таким вот образом:
Код
			<div class="addtocart-area">

<form method="post" class="product js-recalculate" action="<?php echo JRoute::_ ('index.php'); ?>">
<?php // Product custom_fields
if (!empty($product->customfieldsCart)) {
?>
<div class="product-fields">
<?php foreach ($product->customfieldsCart as $field) { ?>
<div class="product-field product-field-type-<?php echo $field->field_type ?>">
<span class="product-fields-title-wrapper"><span class="product-fields-title"><strong><?php echo JText::_ ($field->custom_title)?></strong></span>
<?php if ($field->custom_tip) {
echo JHTML::tooltip ($field->custom_tip, JText::_ ($field->custom_title), 'tooltip.png');
} ?></span>
<span class="product-field-display"><?php echo $field->display ?></span>

<span class="product-field-desc"><?php echo $field->custom_field_desc ?></span>
</div><br/>
<?php
}
?>
</div>
<?php
}
/* Product custom Childs
* to display a simple link use $field->virtuemart_product_id as link to child product_id
* custom_value is relation value to child
*/

if (!empty($this->product->customsChilds)) {
?>
<div class="product-fields">
<?php foreach ($product->customsChilds as $field) { ?>
<div class="product-field product-field-type-<?php echo $field->field->field_type ?>">
<span class="product-fields-title"><strong><?php echo JText::_ ($field->field->custom_title)?><br></strong></span>
<span class="product-field-desc"><?php echo JText::_ ($field->field->custom_value)?></span>
<span class="product-field-display"><?php echo $field->display ?></span>

</div><br/>
<?php } ?>
</div>
<?php } ?>
<br />
<div class="addtocart-bar">

<?php // Display the quantity box

$stockhandle = VmConfig::get ('stockhandle', 'none');
if (($stockhandle == 'disableit' or $stockhandle == 'disableadd') and ($product->product_in_stock - $product->product_ordered) < 1) {
?>
<a href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=' . $product->virtuemart_product_id); ?>" class="notify"><?php echo JText::_ ('COM_VIRTUEMART_CART_NOTIFY')?></a>

<?php } else { ?>
<!-- <label for="quantity<?php echo $product->virtuemart_product_id; ?>" class="quantity_box"><?php echo JText::_ ('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
<span class="quantity-box">
<input type="text" class="quantity-input js-recalculate" name="quantity[]" value="<?php if (isset($product->min_order_level) && (int)$product->min_order_level > 0) {
echo $product->min_order_level;
} else {
echo '1';
} ?>"/>
    </span>
<!-- <span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus"/>
<input type="button" class="quantity-controls quantity-minus"/>
    </span> -->
<?php // Display the quantity box END ?>

<?php
// Display the add to cart button
?>
<span class="addtocart-button">
<?php echo shopFunctionsF::getAddToCartButton($product->orderable); ?>
</span>
<?php } ?>

<div class="clear"></div>
</div>

<?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 ?>" />
</form>

<div class="clear"></div>
</div>
Вставил код в нужное место.
Товар добавляется. Выводится в корзине. Могу изменить количество в корзине. А удалить не могу. возвращается на эту же страницу и ни чего не происходит. страница обновляется и все товары на месте
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться