Jump to content
Latest News: (loading..)

helenium7

Members
  • Content count

    6
  • Joined

  • Last visited

Profile Information

  • Real Name
    Martin
  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Omar, just to give you a bit of feedback on the above changes affecting the product_info page and also your out of stock ribbon contribution, both work nicely and the changes above mean that the product_info page also reflect the out of stock status though not with the ribbon but that does not matter. The code in my Edge version was not quite as shown above and I had to change (around line 203) <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> TO <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('product_id' => $product_info['products_id']), 'btn-success'); ?></div> and my original product_listing was (around line 169) if (PRODUCT_LIST_BUY_NOW > 0) { $prod_list_contents .= ' <div class="col-xs-6 text-right">'; $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . ((tep_has_product_attributes((int)$listing['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-success btn-product-listing btn-buy'); $prod_list_contents .= ' </div>'; } and is now (as you advised) if ( tep_get_products_stock($listing['products_id']) > 0 ) { $prod_list_contents .= ' <div class="col-xs-6 text-right">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), NULL, NULL, 'btn-success btn-sm') . '</div>'; } else { $prod_list_contents .= ' <div class="ribbon red"><span> '. TABLE_HEADING_OUT_OF_STOCK . '</span></div>'; } great stuff Omar, many thanks.
  2. helenium7

    State Selector for BS

    Might be of use to someone else, I could not get the v2.4.4 to configure and got a database error when I tried to install but 2.3.3. seems to function OK. It was the lines starting tep_db_query("insert into cconfiguration . . . which gave the problem whereas the previous was tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title . . . Not sure if its that double "cc" or is that a php 7 issue? - I am running 5.6 currently
×