Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Call For Price module, need it to work with CE


Recommended Posts

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

Link to comment
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.

 

 

 

Phoenix support now at https://phoenixcart.org/forum/
App created for phoenix
TinyMCE editor for admin

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...