Toggle Nav The S Group Ecommerce Development
  • Experience
    • Catalog Enhancements
    • Cart / Checkout
    • Customers
    • Shipping
    • Payments
  • Management
    • Sales / Fulfillment
    • Catalog
    • Customer Support
    • Marketing / Promotions
    • Content
    • Reporting & Analytics
  • Optimization
    • Performance
    • Monitoring
    • Troubleshooting / Debugging
  • Blog
  • My Account
  • Sign Out
  • Sign In

You have no items in your shopping cart.

Call For Price Installation Manual

1. Disable Compiler

Go to System > Tools > Compilation and click the Disable button. Once installation is complete, you can re-enable compilation.

Install the extension package from the admin panel under System > Magento Connect > Magento Connect Manager by choosing the package file from your local folder and uploading it.

2. Open file: /app/design/frontend/{your_package}/{your_theme}/templates/catalog/product/list.phtml

Find the two lines containing the following (the first is for list view, the second is for grid view):

echo $this->getPriceHtml($_product, true)

Replace each of them with:

<?php /* echo $this->getPriceHtml($_product, true) */ /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listprice')->setProduct($_product)->setPrefix('')->toHtml(); /* Sashas_Callfor_Price */ ?>

Find the two lines containing the following (the first is for list view, the second is for grid view):

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span>....</span></span></button>

Replace each of them with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listcart')->setProduct($_product)->setAddUrl($this->getAddToCartUrl($_product))->toHtml(); /* Sashas_Callfor_Price */ ?>

3. Open file: /app/design/frontend/{your_package}/{your_theme}/templates/catalog/product/view.phtml

Find the line containing:

echo $this->getChildHtml('product_type_data')

Add the following after it:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/callforprice')->toHtml(); /* Sashas_Callfor_Price */ ?>

Next, find the line containing:

echo $this->getChildHtml('addtocart')

Replace it with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/productaddto')->toHtml(); /* Sashas_Callfor_Price */ ?>

4. Open file: /app/design/frontend/{your_package}/{your_theme}/templates/catalog/product/view/options/wrapper/bottom.phtml

Find the line:

echo $this->getChildHtml('', true, true);

Replace it with:

<?php /* echo $this->getChildHtml('', true, true); */ echo $this->getLayout()->createBlock('callforprice/productaddto')->toHtml(); echo $this->getChildHtml('product.info.addto', true, true); ?>

5. Edit file: /app/design/frontend/{your_package}/{your_theme}/templates/catalog/product/new.phtml

Find the line containing:

echo $this->getPriceHtml($_product, true, '-new')

Replace it with:

<?php /* echo $this->getPriceHtml($_product, true, '-new') */ /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listprice')->setProduct($_product)->setPrefix('-new')->toHtml(); /* Sashas_Callfor_Price */ ?>

Find the line containing:

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span>...</span></span></button>

Replace it with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listcart')->setProduct($_product)->setAddUrl($this->getAddToCartUrl($_product))->toHtml(); /* Sashas_Callfor_Price */ ?>

6. Repeat these changes for the following two files:

  • /app/design/frontend/{your_package}/{your_theme}/template/catalog/product/widget/new/content/new_grid.phtml
  • /app/design/frontend/{your_package}/{your_theme}/template/catalog/product/widget/new/content/new_list.phtml

Find the line containing:

echo $this->getPriceHtml($_product, true, '-widget-new-grid')

Replace it with:

<?php /* echo $this->getPriceHtml($_product, true, '-widget-new-grid') */ /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listprice')->setProduct($_product)->setPrefix('-new')->toHtml(); /* Sashas_Callfor_Price */ ?>

Find the line containing:

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span>...</span></span></button>

Replace it with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listcart')->setProduct($_product)->setAddUrl($this->getAddToCartUrl($_product))->toHtml(); /* Sashas_Callfor_Price */ ?>

7. Edit file: /app/design/frontend/{your_package}/{your_theme}/template/wishlist/sidebar.phtml

Find the line containing:

echo $this->getPriceHtml($product, false, '-wishlist')

Replace it with:

<?php /* echo $this->getPriceHtml($product, false, '-wishlist') */ /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/wishlistprice')->setProduct($product)->setPrefix('-wishlist')->toHtml(); /* Sashas_Callfor_Price */ ?>

Find the line containing:

<a href="<?php echo $this->getItemAddToCartUrl($_item) ?>" class="link-cart"><?php echo $this->__('Add to Cart') ?></a>

Replace it with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/wishlistcart')->setProduct($product)->setAddUrl($this->getItemAddToCartUrl($_item))->setSidebar(1)->toHtml(); /* Sashas_Callfor_Price */ ?>

8. Edit file:

/app/design/frontend/{your_package}/{your_theme}/template/wishlist/item/column/cart.phtml or /app/design/frontend/{your_package}/{your_theme}/template/wishlist/view.phtml (depending on the Magento version, one of these will contain the target code).

Find the line containing:

echo $this->getPriceHtml($product)

Replace it with:

<?php /* echo $this->getPriceHtml($product) */ /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listprice')->setProduct($product)->setPrefix('')->toHtml(); /* Sashas_Callfor_Price */ ?>

Find the line containing:

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span>...</span></span></button>

Replace it with:

<?php /* Sashas_Callfor_Price */ echo $this->getLayout()->createBlock('callforprice/listcart')->setProduct($product)->setAddUrl($item->getId())->setWishlist(1)->toHtml(); /* Sashas_Callfor_Price */ ?>

9. In case you encounter this error:

Fatal error: Call to a member function getStoreLabel() on a non-object in ...template/catalog/product/price.phtml on line 50

Copy the file app/design/frontend/base/default/template/catalog/product/price.phtml to your theme directory and apply the changes below.

Find the line containing:

$_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();

Replace it with:

if ($special_price = $this->getProductAttribute('special_price')){ $_specialPriceStoreLabel = $special_price->getStoreLabel(); }

Call For Price Guide & Detailed Overview

Table of Contents

  • Getting Started Guide
  • a. Installation Steps
  • b. Bulk Upload CSV
  • c. Use Magento Inline Translation

Getting Started Guide

If you are using an extension version prior to 1.0.0, you must perform the manual theme template integration steps detailed in the code tables above.

You can refer to the pre-modified base code files repository at GitHub: github.com/sashas777/callforprice_files.

a. Installation Steps

STEP 1: Disable the cache under System > Cache Management and disable compilation under System > Tools > Compilation.

STEP 2: Extract the files from the package archive into a temporary folder on your local machine.

STEP 3: Copy the contents of the STEP_1 directory to your Magento root directory. Additionally, copy files from STEP_1/app/design/frontend/base/default/ to your active template package directory: app/design/frontend/{your_package}/{your_theme}/.

Then, copy the contents of the STEP_2 folder into your Magento root directory.

STEP 4: Log out of the Magento Admin Panel, log back in, and refresh all database indexes under System > Index Management.

b. Bulk Upload CSV Setup

To batch upload Call For Price values, generate a CSV file.

CSV Field Descriptions:

  • sku: SKU of the product.
  • callforprice_enabled: Set to 1 to enable Call For Price for the product, 0 to disable.
  • callforprice_addtocart_enabled: Set to 1 to keep the Add to Cart button visible, 0 to hide it.
  • callforprice_text: The custom message displayed in place of the price.
  • customer_groups: Comma-separated list of Customer Group IDs to exclude from this rule. Set to -1 to apply to all customer groups. You can locate Customer Group IDs in the admin panel under Customers > Customer Groups.

Upload Screen: Navigate to Catalog > Call For Price Upload in the admin menu to submit the CSV.

c. Use Magento Inline Translation

Magento features a native "Translate Inline" tool that allows storefront text modifications directly from the frontend browser view. Follow these steps to configure it:

  • Ensure your Magento store environment mode is set to Developer Mode.
  • Temporarily clear or disable your cache under System > Cache Management (specifically the Block HTML and Translation caches).
  • In the Admin Panel, navigate to System > Configuration > Advanced > Developer.
  • Expand the Translate Inline panel, and set Enabled for Storefront to Yes. Save the configuration.
  • Navigate to the frontend page. Hovering over translatable text will expose a red dotted border or book icon. Click the icon to enter your custom replacement prompt.
  • Once finished, remember to disable the Translate Inline tool and re-enable caches.

Below is the walkthrough video guide illustrating Magento inline translation:

G_T5Bh7pSdA

  • Contac Us
  • Privacy Policy
  • Refund Policy
© The S Group. All Rights Reserved.