Jump to content
Sign in to follow this  
stefan1959

Call For Price module, need it to work with CE

Recommended Posts

Posted (edited)

I was install the Call For Price module but ran into code issue but matching the instructions, can any one help.

Below code doesn't match in CE, looks like a total rewrite has been done. Any one got a clue?

Steve

In catalog/product_info.php

FIND: 

<div class="buttonSet row">
    <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'fa fa-commenting', tep_href_link('product_reviews.php', tep_get_all_get_params())); ?></div>
    <?php

<div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'fa fa-shopping-cart', null, 'primary', array('params' => 'data-has-attributes="' . (($products_attributes['total'] > 0) ? '1' : '0') . '" data-in-stock="' . (int)$product_info['products_quantity'] . '" data-product-id="' . (int)$product_info['products_id'] . '"'), 'btn-success btn-product-info btn-buy'); ?></div>
<?php

REPLACE WITH:

<div class="buttonSet row">
    <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'fa fa-commenting', tep_href_link('product_reviews.php', tep_get_all_get_params())); ?></div>
    <?php
    if ($product_info['products_price'] == CALL_FOR_PRICE_VALUE){
?>
    <span class="buttonAction">
    <a href="javascript:history.go(-1)"><?php echo tep_draw_button(IMAGE_BUTTON_BACK,'Back',null,'primary'); ?></a></span>
<?php
} else {
?>
   <div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'fa fa-shopping-cart', null, 'primary', array('params' => 'data-has-attributes="' . (($products_attributes['total'] > 0) ? '1' : '0') . '" data-in-stock="' . (int)$product_info['products_quantity'] . '" data-product-id="' . (int)$product_info['products_id'] . '"'), 'btn-success btn-product-info btn-buy'); ?></div>
<?php

* SAVE AND CLOSE FILE

Edited by stefan1959
typo

Share this post


Link to post
Share on other sites

newer CE versions, went to a more moulder design.

if you goto includes/modules/content/product_info/templates

you will see a file called

tpl_cm_pi_buy_button.php

you can make the changes within that file.

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Not sure what forum best to post to about this. Just post on other on the payment module-other.

Maybe someone can do a rewrite, I haven't a clue how the system works to write the code.

Screenshot on what it does on the old system. When price is set to 0 it displays call for price and removes the Buy button.

Can't be that hard!!! :)

Steve

 

image.png.1be66a8022fad6d1b83520427d3b5eaf.png

image.png.08ad474d3a1021d258f4dd0dfb7a808f.png

 

Edited by stefan1959
typo

Share this post


Link to post
Share on other sites

Two discussions merged.

Please don't create multiple discussions about the same thing, thx.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×