Call For Price Installation Manual

You also can view installation Manual & Guide at Google Docs

Please notice that since Call For Price version 1.0.0 It doesn't require following installation.

If you dont have any file in your templace copy it from /app/design/frontend/base/default/templates/ folder and make changes in it or you can take this file from example of modified files package. Download Examples of modified files

In case you you have difficulty with installation you can download example of modified files for base theme. Download

Example of modified files packaged in zip archive, to extract files from the archive you may need WinRar.

1. Disable compiler

System > Tools > Compilation page and click on Disable button. After Installation you can enable compilation back.

Install extension archives from admin System->Magento Connect-> Magento Connect Manager after that choose package from folder and upload it.

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

Find two rows containing (first row for list view, second for grid view):

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

Replace each of it with:

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

Find two rows containing (first row for list view, second for grid view):

	

Replace each of it 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 row containing:

	echo $this->getChildHtml('product_type_data')

Add after it:

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

Next find row 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 row:

	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. Please edit file /app/design/frontend/{your_package}/{your_theme}/templates/catalog/product/new.phtml according to original:

Modified Base file: http://sashas.org/docs/callforprice/new.txt (Rename extension to .phtml file if you need copy it into your theme)

Find row containing:

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

Replace 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 row containing:

	

Replace with:

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

6. Please repeat these changes for 2 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 row containing:

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

Replace 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 row containing:

	

Replace with:

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

7. Please edit file:

/app/design/frontend/{your_package}/{your_theme}/template/wishlist/sidebar.phtml

Find row containing:

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

Replace 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 row containing:

	<?php echo $this->__('Add to Cart') ?>

Replace with:

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

8. Please 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

(ver. 1.6). WHich one have these values. It may vary depend on magento versions.

Find row containing:

	 echo  $this->getPriceHtml($product) 

Replace with:

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

Find row containing:

	

Replace 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 have error:

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

Copy file app/design/frontend/base/default/template/catalog/product/price.phtml to your theme and make changes in it

Find row containing:

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

Replace with:

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