X hide

Magento Cart Reservation v1.x Developer's Guide & API Reference

From Plumrocket Documentation

You are viewing:  Cart-res-icon-32.png  Cart Reservation

Configuring Independent Elements

Sometimes you may need to change default module messages concerning reserved items. Below you will learn how to do it.


The texts "This item is no longer reserved.", "The cart is no longer reserved.", "The cart is reserved forever" can be changed in the following file.

 /web/app/locale/en_US/Plumrocket_Cartreservation.csv


As you edit the text, you should enter the existing word in inverted commas, then put a comma and enter the new word or sentence in inverted commas too. For example:

"This item is no longer reserved.","Oops.. Your item is no longer reserved."


Attention green.png Important Information: Don't forget to clear the cache after you edit the text. (To learn how to clear the cache read The Installation section of the module)


Our Magento Cart Extension will automatically add timers on Cart and Checkout Page if enabled in back-end. However, you can change standard timer display or position in the front-end. To do this follow the instructions below.

Changes to be made Website Frontend - Checkout Page

The following code can be placed on any page of the website. It is universal and will display different timer depending on the store page.

For example:

  • If used anywhere on "Shopping Cart Page" - the code will display "Global timer for all items in cart" (if global cart timer is enabled in back-end).
  • If used anywhere on "Checkout Page" - the code will display "Checkout timer" (if checkout timer is enabled in back-end).
  • If used anywhere else on the website (homepage, product list, product page, etc...) - the code will display "Global timer for all items in cart" (if global cart timer is enabled in back-end).

In order to add Timer anywhere on the website, edit the corresponding layout file

For example to change position of timer on Checkout Page, add following code:

theme_path/default/default/layout/checkout.xml
<block type="cartreservation/cart" name="cart.reservation" 
template="cartreservation/cart.phtml" as="cartreservation" />

and the corresponding html file:

 theme_path/default/default/template/checkout/onepage.phtml
<?php echo $this->getChildHtml('cartreservation') ?>


  1. Checkout Page Timer.

Cart-Rez-code-4.png


Changes to be made Website Frontend - Shopping Cart Page
To change position or design of single product reservation timer, edit following file:


theme_path/default/template/checkout/cart/item/default.phtml


And place the following code in desired place on page:


<?php if ($this->modeReserveItem()) { ?>
<div class="reserved-item">
 <span class="cntdown"></span>
 <span class="cntdown-source" style="display: none;">
<?php echo $this->getTime($_item); ?>
</span>
</div>
<?php } ?>

Please note, the above code showing single product reservation can be used only on Shopping Cart Page (e.g. default.phtml file).

  1. Shoping Cart Page (Independent timer for each item)

Cart-Rez-code-3.png

API Reference

API allows launching extension features from any place in the code. All requests are carried via Mage::helper('cartreservation/customer').

Мethod Description
resetReservationTime Restarts reservation timer.
  • $type

    @var $type string
    Chooses the timers to be launched. Possible variants:

    - 'cart' - Cart reservation timer;
    - 'checkout' - Checkout timer;
    - 'all' - Both of the timers;

  • @return none
Mage::helper('cartreservation/customer')->resetReservationTime($type);

Navigation