Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Peper

Members
  • Posts

    611
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Peper reacted to raiwa in Wholesale (SPPC lite)   
    Hello Pierre @Peper,
    You can disable the ot_discount.php module for wholesalers like follows:
    - add $wholesale_group to the globals list
    - disable the whole process function for wholesaler groups with the condition "if ($wholesale_group < 1)"
    It should look like this:
    function process() { global $order, $currencies, $currency, $customer_id, $discount, $sess_discount_code; // wholesale (SPPC) BEGIN global $wholesale_group; if ($wholesale_group < 1) { $discount = 0; $subtotal_correction = 0; $tax_correction = 0; $shipping_discount = 'false'; ............... if (!empty($discount)) { $this->output[] = array('title' => (($shipping_discount == 'true')? TEXT_SHIPPING_DISCOUNT : TEXT_DISCOUNT) . (strpos($check['discount_values'], '%') ? ' ' . $check['discount_values'] . ' ' : '') . (!empty($order_info) ? ' (' . $sess_discount_code . ')' : '') . ':', 'text' => '<font color="#ff0000">-' . $discount_formatted . '</font>', 'value' => -$discount); } } // wholesale (SPPC) END } I didn't test, but it should do it.
    You can also disable the discount code input modules in the same way.
    See also the instructions at the beginning in "Manual file modifications.doc".
    rgds
    Rainer
  2. Like
    Peper reacted to peterpil19 in Support thread for JcM No Stock Header Tags-V1.0   
    You can't go wrong with an addon from @raiwa.  @burt also has one if you contact him.
     
  3. Like
    Peper got a reaction from Patty in Support thread for JcM No Stock Header Tags-V1.0   
    @Patty Thanks, just what i was looking for
    Seems there is no out of stock button or message in stock Phoenix.
  4. Like
    Peper reacted to Jack_mcs in Automatically send data feed to Froogle   
    A new version has been uploaded with these changes:
    Added gtin as an identifier. Added code for Phoenix compatibility. Installation just requires the files to be uploaded for Phoenix. Changed count code to pass php 7.3. Found by member @yahalimu. Changed default http to https in the googlefeeder file. Removed the code to check if mysql is being used. Mysqli is now required.
  5. Like
    Peper reacted to Jack_mcs in Automatically send data feed to Froogle   
    Regarding the warnings, I will try to get an updated version uploaded soon.
    Regarding the tax, I have clients that have shops that use tax and others that don't. But they are using the later version, which has not been released, so that might be the reason.
  6. Like
    Peper reacted to peterpil19 in [Addon] Twitter Typeahead Autocomplete Search for osC 2.3.4 (BS and nonBS)   
    The alternative way to fix the button issue is to change the "input-group" class in bm_search.php and content_header_search.php to "input-group-prepend" at Lines 37 and 46, respectively. Refer documentation on bootstrap forms: https://getbootstrap.com/docs/4.0/components/input-group/
  7. Like
    Peper reacted to raiwa in Wholesale (SPPC lite)   
    Hello Pepper,
    As stated in the instructions of wholesale 4.0.1., the supplied files are compatible and based on Phoenix 1.0.1.x-
    The product listings have been modified for 1.0.2.x (I don't remember the exact point version) and you'll need to apply the modifications in the supplied files comparing with the core files for your Phonix version for 100% compatibility. I'll update as soon as I find some time.
    rgds
    Rainer
  8. Thanks
    Peper reacted to JcMagpie in support thread for JcM New Themes Header Tags-V1.0 Phoenix   
    JcM New Themes Header Tags-V1.0 Phoenix
    JcM New Themes Header Tags-V1.0
    A simple header_tag module to let you change the theme on your Phoenix site.
    This is a standalone add-on and makes no changes to core files.
    Comes with 18 Bootstrap 4 themes to select from. You can make further changes to each by using the color tweak add-on.
    JcM Color Tweak V1.1
    That’s it simply copy all files of the into relevant sections and go to admin modules /header tags and install. You can then select the required theme in admin.
    too many images to post here to show each theme but you can see them here https://bootswatch.com/
    Has been tested on Phoenix 1.0.2.2 only. Enjoy!

     
  9. Thanks
    Peper reacted to raiwa in Holiday-Promotional Message Add-On BS   
    Hello Pierre,
    This code is copied from core modules. You should "untighten" the server security settings. Anyway it's only a warning and will not show under production error settings.
    Or report it in the general 2.3.4.1 BS forum. It's not a specific holiday message module issue.
    rgds
    Rainer
  10. Thanks
    Peper reacted to bonbec in Wholesale (SPPC lite)   
    I have the pro version and I made a thing like this, but I don't know if it is the best way (I am not a programmer) :
    In your admin/includes/languages/THE_LANGUAGE_USED/categories.php :
    // WholeSale add by Fred $wholesalename = array('Revendeur','Club'); // WholeSale add by Fred EOF Do the same thing for all your languages.
    In admin/categories.php (my categories file is very modified, but this is the spirit) :
    <!-- wholesale pro BEGIN--> <?php for ($i=1; $i<=MODULE_STORE_WHOLESALE_GROUPS; $i++) { $products_ws_prices = 'products_ws_price_' . $i; ?> <tr> <td class="main"><?php echo $wholesalename[$i-1] . ' '. constant('MODULE_STORE_WHOLESALE_PRICE_NET_' . strtoupper($language)) . ' ' . $i . ': '; ?></td> <td class="main"><?php echo tep_draw_input_field('products_ws_price_' . $i, $pInfo->$products_ws_prices, 'onkeyup="updateGrossWS' . $i . '()"'); ?></td> <td class="main"><?php echo $wholesalename[$i-1] . ' '. constant('MODULE_STORE_WHOLESALE_PRICE_GROSS_' . strtoupper($language)) . ' ' . $i . ': '; ?></td> <td class="main"><?php echo tep_draw_input_field('products_ws_price_gross_' . $i, $pInfo->$products_ws_prices, 'onkeyup="updateNetWS' . $i . '()"'); ?></td> </tr> <?php } ?> <!-- wholesale pro END-->  
     

  11. Like
    Peper got a reaction from Tsimi in Advanced Specials   
    Thanks Tsimi
    I have sorted this out with ""
    <?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], "");?>"/> <?php echo $percent_select; ?></td>  
  12. Like
    Peper got a reaction from Bobber in One Page Checkout Support   
    Another bug just caught now.
    upon checkout customers is unable to change shipping address - error saving shipping address comes up to contact shop owner.
     
    Anyone know a fix to this?
     
    Found in earlier post following solution to remove the ,
     
    Within the "saveAddress" action in includes/classes/onepage_checkout
     
    At around line 931, find this statement:
    "success": "true",
    }';
     
    Remove the comma. It should look like the following:
    "success": "true"}';
     
    Saved again by the ,
  13. Like
    Peper got a reaction from felix-swiss in Delivery option file needs updating   
    Solved, thanks Burt - line 36 changed to $city = preg_split ('/,/', $zip_up);
    line 69 changed to $table_cost = preg_split("/[:,]/" , MODULE_SHIPPING_DLYC_COST);
  14. Like
    Peper reacted to steve_s in [Contribution] iOSC - mobile version of OSC on your iPhone   
    To get it to goto mobile shopping cart
     
    catalog/mobile_product_info.php
    find

    echo tep_draw_form('cart_quantity', tep_mobile_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
    change it to

    echo tep_draw_form('cart_quantity', tep_mobile_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=mobile_add_product')); ?>
     
    catalog/includes/apllication_top.php
    find

    case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break;
    add under it

    case 'mobile_add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_mobile_link($goto, tep_get_all_get_params($parameters))); break;
    You will also need to follow this post
    http://www.oscommerce.com/forums/topic/327785-contribution-iosc-mobile-version-of-osc-on-your-iphone/page__view__findpost__p__1456042
     
    for ease replace all code in mobile/includes/functions/general.php with code below

    <?php function tep_mobile_link1($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = false) { return tep_href_link($page, $parameters, $connection, $add_session_id,false); } function tep_mobile_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = false) { global $request_type, $session_started, $SID; $module = substr($page,0,-4); // $page = FILENAME_MOBILE; // $parameters = 'module=' . $module . '&' . $parameters; if (substr($page, 0, 6) !== 'mobile' ) { $page = 'mobile_' . $page; } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if (isset($_sid)) { $link .= $separator . tep_output_string($_sid); } return $link; } function tep_mobile_button($text, $params = '') { // return '<div id="mobileButton"><table><tr><td width="1px"><img src="images/greybutton/left.gif"/></td><td>' . $text . '</td><td width="1px"><img src="images/greybutton/right.gif"/></td></tr></table></div>'; return '<input type="submit" value="' . $text . '" ' . $params . '/>'; // return '<div id="mobileButton"><table><tr><td width="1px"><img src="images/greybutton/left.gif"/></td><td>' . $text . '</td><td width="1px"><img src="images/greybutton/right.gif"/></td></tr></table></div>'; } function tep_mobile_path_element($path, $element, $alt=null) { return ($path ? '<a href="' . $path .'">' . $element . '</a>' : ($alt ? $alt : $element)) ; } function tep_mobile_selection($path, $elements) { $ret = '<tr class="categories"'; $ret .= ($path ? ' onclick="window.location.href=\'' . $path .'\'"' : '' ); $ret .= '>'; foreach ($elements as $element) { $ret .= '<td class="categories">' . tep_mobile_path_element($path,$element) . '</td>'; } $ret .= '<td class="categories" align="right">'; $ret .= ($path) ? '<a href="' . $path .'">' . tep_image(DIR_MOBILE_IMAGES . 'arrow_select.png') . '</a>' : '<input type="image" src="' .DIR_MOBILE_IMAGES . 'arrow_select.png' . '" border="0" alt="">'; return $ret; } function tep_print($obj) { print ("<pre>"); print_r ($obj); print ("</pre>\n"); } function tep_debug($obj) { if(MOBILE_DEBUG) { tep_print($obj); } } ?>
     
    Steve
  15. Like
    Peper reacted to TracyS in Master Products - MS2   
    Hmmm - could it be the X-Sell contribution? I have a includes/modules/xsell_cart.php file with this query:

    $xsell_master_query = tep_db_query("SELECT products_master FROM " . TABLE_PRODUCTS . " WHERE products_id = " . $product_id_in_cart['id'] . "");
     
    includes/modules/master_products.php has a similar query - but it uses the "LIKE" statement so I don't think it's the right one- but here it is just in case
    $master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master LIKE '%" . $HTTP_GET_VARS['products_id'] . "%' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0");
     
    These are the only two places I can find the query string
    tep_db_query("select products_master from in the entire site.
     
  16. Like
    Peper got a reaction from Geotex in Master Products - MS2   
    Me again >_<
     
    I see that when showing product on the index.php page and product has got options, if we click on add to cart, it will first redirect us to it's master product.
    Options on the product is however selectable when having master product on top of page, but this would be sort of wrong way - misleading product to wrong page?
     
    So, in index.php showing products, product got options then it need to direct customer to actual product and not it's master
     
    Any help please
  17. Like
    Peper reacted to tgely in Master Products - MS2   
    Hi,
     
    I think the form action is wrong. If I have truth you have to change fom header in the product_info.php. (2 in one)
     

    if ($master_check['products_master_status'] > 0 || $master_check['products_master'] == 0) { // this modify!! echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; } else { echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); } // Master Products EOF
     
    I had to separate this functions some month before. There are two different form action we use. The original and the master (buy_now_) product actions.
     
    Sorry but I didnt examine your codes.
  18. Like
    Peper got a reaction from Geotex in Master Products - MS2   
    Replying to my own threads.
    Still need some little help to finally complete this great addon.
     
    Got everything sorted except the quantity drop down box.
    When displaying product with master the quantity works fine on adding master and slave product.
    When displaying a normal product the quantity selected from drop down is always 1 even if 20 is selected
     
    Anyone had this problem please help
  19. Like
    Peper reacted to TracyS in Seperate Pricing Per Customer v3.5   
    Thank you JanZ!! :D
     
    I compared what you had put up with what I had - made some edits to what I had and got the quantity field back to a field where you just type in the number of products you want rather than a pull down menu and all is working - YAY!!!!! :thumbsup:
     
    Now - I'm curious about this master_sql query. I'm still learning how all of this works so please bear with me :blush: I made a test special product in the wholesale group. If I'm not logged in, or logged in as a retail customer, I see the original price with the slash through it, and then the special price for a product on special in the retail group. When I log in as a wholesaler I get the same thing - only for the products that are on special for the wholesale group. Also, the products add to the cart correctly and show the correct special price in the cart for either group. So all seems to be working correctly.
     
    The original master_sql query is:
    $master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master LIKE '%" . $HTTP_GET_VARS['products_id'] . "%'");
     
    This is, I think, telling the server to get the products whose products_master field is the same as the current products products_id field. This way it knows which slave products it should be showing on the master products page.
     
    If we change it to:

    $master_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_tax_class_id, NULL as specials_new_products_price, p.products_price from ". TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id where p.products_id = pd.products_id and p.products_master = '" . $thisquery['products_master'] . "' and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'";
     
    then how does it know which products have the current product_id as their products_master field?
     
    Also - in the p.products_master = '" . $thisquery['products_master'] . "' part - is $thisquery literally meaning "this query" as in the $master_sql query - or does it mean that there should be another query somewhere named $this_query ?
     
    I am sure you are going to look at my questions and feel the answers should be staring me in the face :blush: But I had just started learning how to create my own PHP / MySQL when we learned we needed to use osC - so this is my first ever osC website, my first full online shopping site, and quite the big plunge into some advanced PHP and MySQL :blink: So now that I'm getting things up and running I'm trying to slow down a little bit here and there and learn "why" they are up and running in hopes that I will be able to become a little more capable with all of this, and hopefully someday be able to offer support and contributions back to the community :)
     
     
    For anyone who may be looking for this in the future - here is my modified for SPPC master_listing.php file :)

    <?php /* $Id: master_listing.php adapted for Separate Pricing Per Customer v4 2005/02/26 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Master Products MS2 - JOHNSON - 05/07/2003 [email protected] Copyright (c) 2003 Suomedia - Dynamic Content Management Released under the GNU General Public License */ $listing_split = new splitPageResults($master_sql, MAX_DISPLAY_SEARCH_RESULTS, 'products_master'); if ( ($listing_split->number_of_rows > 0) && ( (MASTER_PREV_NEXT_BAR_LOCATION == '1') || (MASTER_PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'MASTER_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'MASTER_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'MASTER_LIST_DESCRIPTION': $lc_text = TABLE_HEADING_DESCRIPTION; $lc_align = 'center'; break; case 'MASTER_LIST_ATTRIBUTES': $lc_text = TABLE_HEADING_ATTRIBUTES; $lc_align = 'center'; break; case 'MASTER_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'MASTER_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'MASTER_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'MASTER_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'MASTER_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'MASTER_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; case 'MASTER_LIST_OPTIONS': $lc_text = TABLE_HEADING_OPTIONS; $lc_align = 'align="center"'; break; } if ( ($column_list[$col] != 'MASTER_LIST_BUY_NOW') && ($column_list[$col] != 'MASTER_LIST_IMAGE') && ($column_list[$col] != 'MASTER_LIST_MULTIPLE') && ($column_list[$col] != 'MASTER_LIST_DESCRIPTION') && ($column_list[$col] != 'MASTER_LIST_OPTIONS') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $master_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($master_query); global $sppc_customer_group_id; // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } while ($_listing = tep_db_fetch_array($master_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($no_of_listings > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."' "); // $no_of_pg_products = tep_db_num_rows($pg_query); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; $lc_params = ''; switch ($column_list[$col]) { case 'MASTER_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing[$x]['products_model'] . ' '; break; case 'MASTER_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text = ' ' . $listing[$x]['products_name'] . '</a> '; } break; case 'MASTER_LIST_DESCRIPTION': $lc_align = ''; $lc_text = ' ' . osc_trunc_string(strip_tags($listing[$x]['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), MASTER_LIST_DESCRIPTION_LENGTH) . ' '; break; case 'MASTER_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a> '; break; case 'MASTER_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; } break; case 'MASTER_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'MASTER_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'MASTER_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; case 'MASTER_LIST_BUY_NOW': $lc_align = 'center'; $lc_valign = 'top'; if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing[$x]['products_id']) < 1)) { $lc_text = TEXT_STOCK; } elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing[$x]['products_id']) < 1)) { $qty_array = array(); for ($i=0; $ns = 20, $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); $lc_text = tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '', 'size="4"'); } } else { $quantity = tep_get_products_stock($listing[$x]['products_id']); $qty_array = array(); for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); $lc_text = tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '', 'size="4"'); } } break; case 'MASTER_LIST_OPTIONS': $lc_align = 'align="center"'; $lc_text = ''; // BOF: attribute options $opt_count=0; $products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' ORDER by products_options_id"); while ($products_options_name_values = tep_db_fetch_array($products_options_name)) { $opt_count++; $products_options_array = array(); $lc_text .= '<b>' . $products_options_name_values['products_options_name'] . '</b><br />' . "\n"; $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$listing[$x]['products_id'] . "' and pa.options_id = '" . (int)$products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options_values = tep_db_fetch_array($products_options)) { $products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name'], 'style' => ''); if ($products_options_values['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') '; } } $lc_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array); $lc_text .= '<br />'; } if($opt_count==0) { $lc_text = MASTER_TEXT_NONE; } // EOF: attribute options break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'valign' => $lc_valign, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table> <?php if ( ($listing_split->number_of_rows > 0) && ((MASTER_PREV_NEXT_BAR_LOCATION == '2') || (MASTER_PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?>
  20. Like
    Peper reacted to sbetto in Recover Cart Sales   
    Hi midijay, I experienced this issue too and think I have resolved the issue (at least all appears to be working for me now :-)
    I have V2.23a dated 1DEC2008 installed but am using the file recover_cart_sales.php (catalog/admin) from the 2.0a version dated 11JAN2011 with a change to where the email is sent. I have replaced the code at around line 308 in catalog/admin/recover_cart_sales.php
     
    Replaced this code below:
    //tep_mail($custname, $outEmailAddr, EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, EMAIL_FROM);
    //Let's build a message object using the email class
    $mimemessage = new email(array('X-Mailer: osCommerce'));
    // add the message to the object
    $mimemessage->add_text($email);
    $mimemessage->build_message();
     
    $mimemessage->send($custname, $outEmailAddr, '', EMAIL_FROM, EMAIL_TEXT_SUBJECT);
    With this code:
    tep_mail('', $outEmailAddr, EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, EMAIL_FROM);
     
    *** please note I am no expert in this code but this did work for me to at least get the emails sending. (I found info on this forum helpful - http://www.oscmax.com/forums/oscmax-v2-customization-mods/19425-cant-send-email-recover-cart-sales-2-22-a-2.html) I have not experienced any other fallout as a result of this change as yet but there could well be as its early days of this install for me.
    Cheers, Sarah
  21. Like
    Peper reacted to Guest in [Contribution] iOSC - mobile version of OSC on your iPhone   
    Change it to:
     
  22. Like
    Peper reacted to Jack_mcs in Header Tags SEO   
    Capital letters in an error like that mean the definition that holds the table name (in this case) is missing, not the table itself. Look in the install instrucitons for admin for the change to database_tables.php to find what you need.
  23. Like
    Peper reacted to Jan Zonjee in Seperate Pricing Per Customer v3.5   
    If this is adding a new attribute you could add code to also be able to hide attributes from groups. If you don't you shouldn't use "0" for the value. The default is the at symbol: @. Since it is the default for the column value you should be able to use:
     

    $price_prefix = tep_db_prepare_input('+'); // $attributes_hide_from_groups = tep_db_prepare_input('0'); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', NULL); } // END OF THIS MODULE
  24. Like
    Peper reacted to web-project in Youtube video display   
    have you followed installation steps? as I can see the module should store the YouTube URL in database and the product_info.php php code should generate the code for YouTube and show the video on product pages.
  25. Like
    Peper reacted to darkthal in NEW! Complete Order Editing Tool!   
    Fix for:

    Call to undefined function: tep_get_products_special_price() in /home/.../includes/modules/shipping/freeamount.php on line 74
     
    Open:
    admin/includes/functions/general.php
     
    Add:
     

    function tep_get_products_special_price($product_id) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status"); $product = tep_db_fetch_array($product_query); return $product['specials_new_products_price']; }
    :thumbsup:
     
    Sklep Kaspersky
×
×
  • Create New...