Adding Cart2Quote to a custom theme (adding the quote button)

warning-icon.pngThis article will be removed shortly. Please take a look at our updated Cart2Quote theme integration manual.

----------

 Before you start:

Clear and disable all the cache (also external cache and php cache if enabled).

Looking for an easy way out, consider buying our theme implementation service.

 

Integrating Cart2Quote to a custom theme

Step 1: Go to your Magento root

1. Connect with (s)FTP to your Magento (dev) store

2. Go to your Magento root directory

Step 2: Copy the theme files to your computer.

1. Go to: app/design/frontend/ <your interface> / <your theme> /template/catalog/product

2. Copy list.phtml and view.phtml temporarily to your computer.

listandviewFTP.png

Step 3: Create a Cart2Quote directory and copy your theme files in that directory.

1. Go to: app/design/frontend/ <your interface> / <your theme> /template

2. Press right mouse button and press Create Directory

3. Replace /New directory with /qquoteadv/catalog/product

 Screen_Shot_2014-08-12_at_16.14.43.png

4. From current folder go to: qquoteadv/catalog/product/

5. Copy the list.phtml and view.phtml

listviewcopyBack.png

 

 Step 4: Add the Add to Quote button to the list and grid view

1. Open list.phtml: right mouse button and press View/Edit. 

2. Look up this part of code:

<?php // List Mode ?>

 

3. After that scroll down and search for the following code:

<?php if($_product->isSaleable()): ?>
    <p>
        <button type="button" title="<?php echo $this->__('Add to Cart'?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product?>')">
            <span>
                <span>
                    <?php echo $this->__('Add to Cart'?>
                </span>
            </span>
        </button>
    </p>
<?php else: ?>
    <p class="availability out-of-stock">
        <span>
            <?php echo $this->__('Out of stock'?>
        </span>
    </p>
<?php endif; ?>

 

4. Replace the previous code with the following code:

<?php echo Mage::app()->getLayout()->createBlock('qquoteadv/qquotebtn')
                            ->
setData('product'$_product)
                            ->
setTemplate('qquoteadv/catalog/product/c2qBtnList.phtml')
                            ->
toHtml(); ?>

 

5. Look up this part of code:

<?php // Grid Mode ?>

 

6. After that scroll down and search for the following code:

<?php if ($_product->isSaleable()): ?>
    <button type="button" title="<?php echo $this->__('Add to Cart'?>" class="button btn-cart<?php echo $btnClass?>" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product?>')">
        <span>
            <span>
                <?php echo $this->__('Add to Cart'?>
            </span>
        </span>
    </button>
<?php else: ?>
    <p class="availability out-of-stock<?php echo $btnClass?>">
        <span>
            <?php echo $this->__('Out of stock'?>
        </span>
    </p>
<?php endif; ?>

 

7. Replace the previous code with the following code:

<?php echo Mage::app()->getLayout()->createBlock('qquoteadv/qquotebtn')
      ->
setData('product'$_product)
      ->
setTemplate('qquoteadv/catalog/product/c2qBtnGrid.phtml')
      ->
toHtml(); ?>

 

8. After that, save your document and upload/update this on your FTP.

Step 5: Add the Add to Quote button to the detail view.

1. Open view.phtml: right mouse button and press View/Edit. 

2. Look up this part of code:

<?php if($_product->isSaleable()): ?>                   
    <div class="add-to-box">                       
        <?php echo $this->getChildHtml('addtocart'?>                   
    </div>               
<?php endif; ?>

 

3. Paste direct after the ?> the following code: 

 <!-- Cart2Quote button -->
                <?php if(!$_product->isSaleable()): ?> 
                    <?php echo Mage::app()->getLayout()->createBlock('qquoteadv/qquotebtn')
                                    ->
setData('product'$_product)
                                    ->
setTemplate('qquoteadv/catalog/product/view/addtoquoteadv.phtml')
                                    ->
toHtml(); ?>
               <?php endif; ?>

 

4. After that, save your document and upload/update this on your FTP. 

 

Step 6: Testing and configuring

You are done editing the code. Now it is time to test your quote button.

You need to check the following settings:

Go to: Magento back-end > System > Configuration > CART2QUOTE

General:

    • Enable Cart2Quote set to Yes
    • Licence key is added (You can buy one at: http://www.cart2quote.com/magento-quotation-module-pricing.html)
    • Use Built-In Template Files

Frontend visibility

    • Product Page Activation Yes
    • Category Page Activation Yes

 

Go to: Magento back-end > Catalog > Manage Products > <Desired product for Quotation>

General:

    • Enable Quotations > Add the customer group you like to show the button to
    • Depending on your version: Allow Quotations Requests set to Yes


Now test your front-end to see if there is a button available.

 

------

Note: You may have to customize your CSS to fit the button into your design.

 

 

 

 

Have more questions? Submit a request

2 Comments

  • 1
    Avatar
    Darren

    Hello...

    Anyone out there using Bootstrap in their theme?

    If so, please contact me: darren AT 1800wheelchair DOT com. 

    We need to reformat our C2Q pages in Bootstrap. We're happy to compensate you for the work.

  • 0
    Avatar
    Brijesh Patel

    hi

    i'm done this like in details and also done Cart2quot  but it's not working perfect 

    there is show Add to Quote button on out of stock but still available products there is show only Add to cart button Demo  and i'm submitted ticket we want $300 for support i'm already pay him $1500 for extensions but we not provide support any one can help me

    Thank you

Please sign in to leave a comment.
Powered by Zendesk