NodsDorf Posted March 12, 2012 Share Posted March 12, 2012 For example in the min order contribution the language file echoes: define('MINIMUM_ORDER_NOTICE', "Minimum order amount for %s is %d. Your cart has been updated to reflect this."); I need to change %s to model number instead of product name. I think this was asked before but didn't see an answer and of course searching for %s isn't going to give me any results on these forums. Any help is appreciated. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 12, 2012 Share Posted March 12, 2012 You need to search the code for where MINIMUM_ORDER_NOTICE is used. It will have something like this: sprintf(MINIMUM_ORDER_NOTICE, $a, $B); The $a and $b could be text, like 'hello,' or some variable or defined constant. If the latter, you need to locate the source, again with the search, and change it there. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
NodsDorf Posted March 12, 2012 Author Share Posted March 12, 2012 That was painless. Instructions say: //Minimum quantity code if(MINIMUM_ORDERS == 'true'){ $min_order_query = tep_db_query("select p.minorder as min_quant FROM " . TABLE_PRODUCTS . " p where p.products_id = '".$products[$i]['id']."'"); while ($min_order = tep_db_fetch_array($min_order_query)) { if ($products[$i]['quantity'] < $min_order['min_quant'] ) { $products[$i]['min_quant']=$min_order['min_quant']; } } if ($products[$i]['quantity'] < $products[$i]['min_quant'] ) { $products[$i]['quantity']=$products[$i]['min_quant']; $cart->add_cart($products[$i]['id'],$products[$i]['quantity'],$products[$i]['attributes']); $cart_notice = sprintf(MINIMUM_ORDER_NOTICE, $products[$i]["name"], $products[$i]["min_quant"]); } } //End Minimum quantity code Just changed last line $cart_notice = sprintf(MINIMUM_ORDER_NOTICE, $products[$i]["name"], $products[$i]["min_quant"]); to $cart_notice = sprintf(MINIMUM_ORDER_NOTICE, $products[$i]["model"], $products[$i]["min_quant"]); Thank you Jack! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.