- Posts: 3
- Thank you received: 0
Cart Module additions - $ sign, refresh and clear
13 years 11 months ago - 13 years 11 months ago #72192
by suebardak
Cart Module additions - $ sign, refresh and clear was created by suebardak
Hi helpers out there!
I want my customers to be able to check their cart as they go. They therefore need to update the cart (on page that is separate to the checkout). They can change the quantity field but how do I get the "refresh" functionality there? At the moment if you press return you get taken to the checkout. I don't want that.
Also, I would like to show the $ sign. Format $ 0.00 AUD. I read the FAQ on this and it said to switch off the suppress the dollar sign extension but which extension?? I cannot find it.
Do you have a "clear cart" button that can be inserted on this module?
Sue
I want my customers to be able to check their cart as they go. They therefore need to update the cart (on page that is separate to the checkout). They can change the quantity field but how do I get the "refresh" functionality there? At the moment if you press return you get taken to the checkout. I don't want that.
Also, I would like to show the $ sign. Format $ 0.00 AUD. I read the FAQ on this and it said to switch off the suppress the dollar sign extension but which extension?? I cannot find it.
Do you have a "clear cart" button that can be inserted on this module?
Sue
Last edit: 13 years 11 months ago by suebardak. Reason: Added another item and made title clearer
Please Log in or Create an account to join the conversation.
13 years 11 months ago #72305
by Xavier
Replied by Xavier on topic Re: Cart Module additions - $ sign, refresh and clear
Hi,
To display the refresh button in the cart module, edit the view "product / cart" in HikaShop > Display > Views and paste the code:
Before:
Actually there is no "Clear cart" button, but you can add something like:
In the previous view.
To display the refresh button in the cart module, edit the view "product / cart" in HikaShop > Display > Views and paste the code:
Code:
<div class="hikashop_cart_product_quantity_refresh">
<a href="#" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">
<img src="<?php echo HIKASHOP_IMAGES . 'refresh.png';?>" border="0" alt="<?php echo JText::_('HIKA_REFRESH'); ?>" />
</a>
</div>
Code:
<input id="hikashop_cart_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); " />
Actually there is no "Clear cart" button, but you can add something like:
Code:
<a href="<?php echo hikashop_completeLink('cart&task=newCart&cart_type=cart'.$Itemid); ?>">
<span class="icon-32-add_cart" title="<?php echo JText::_('NEW_CART'); ?>">
</span>
<?php echo JText::_('NEW_CART'); ?>
</a>
Please Log in or Create an account to join the conversation.
Time to create page: 0.197 seconds