Jump to content

Search the Community

Showing results for tags 'oscommerce'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News and Announcements
    • News and Announcements
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Real Name




Found 26 results

  1. Features: Password protect migration utility to avoid usage from third parties Link to OSCommerce MySQL Database Link to CE Phoenix MySQL Database Link to file structure for OSCommerce Export Link to file structure for CE Phoenix Import Test server to make sure PHP and MySQL are setup correctly Tests read/write/delete security Upgrade old OSCommerce Data Detects OSCommerce data version by the state of what upgrades are missing. Applies upgrades to the database to upgrade OSCommerce to 2.3.4 Choose what data to migrate Queries the OSCommerce tables and allows you to choose any tables you want to transfer, including custom tables that your mods have created Check targeted tables in CE Phoenix to make sure table is empty Will use the selected tables from the “Choose what data to migrate” and compare those against the target CE Phoenix tables and alert you to any required changes Transfer MySQL Data Now Will apply any required changes based on previous alerts in previous steps All targeted tables in CE Phoenix will be emptied before being populated. There are warnings beside tables in previous steps to avoid this on some tables like “configuration” table Any missing tables will be created to match the OSCommerce specs for that table Any missing columns will be added to tables prior to import to make sure any custom data is not lost All data from OSCommerce database will be migrated to CE Phoenix database Transfer Images Now All image files and folders will be migrated from OSCommerce to CE Phoenix English language file for all text (Language Switch functionality to come if enough interest) You can refer to phoenixaddons.com for more info. Find it here in Marketplace: https://apps.oscommerce.com/jZAuB&osc-to-cephoenix-migration-utility-0-1-6&c=other All feedback, problems, suggestions welcome. Zipur
  2. Hi, When i checkout the order but does not get any response it directly redirect to order page but order created with empty value. Sometime this issue is created in order table. all field are empty. i had lot of searching but i did not get any solution. Thanxs
  3. I have an already developed Magento shipping module extension. I would like to replicate that same feature into oscommerce add-on. How should I go about it? Is there an easier way to convert it, considering the magento extension code is quite complex? Atleast, I need to know where to start from.
  4. Hello, everyone. I have some problems and I need your help! I currently use OSCommerce latest version, I have a problem where I search union keyword but page not working and gives HTTP 500 errors. if I search uNion keyword it's work nicely... You can try the following URL : 👉 https://www.socomtactical.net/ See Attachment as well: for better understanding
  5. Hi, Good Day! I having trouble getting the updated logo on my site. I updated it in-store tab logo but it's not showing. what I'm thinking is to updated to header.php file. how can I view the PHP file on admin OSCommerce? hope someone can help me regarding this issue. thanks Regards, Vincent
  6. Hello, I'm using v2.3.4, and I was looking to have free shipping but also other options for express shipping. Currently I have zones and table but when free shipping is enable it disabled both and only show the free shipping option. Does anyone knows how I can show free shipping and table option for express shipping? (they pay a bit more but it's faster delivery).
  7. Hallo, ich habe eine Version von OSCommerce entdeckt, die 2.3.4 ist und voll angepasst auf deutsch und auf die Gesetzesgebung in Deutschland. Das gleiche hätte ich gern mit einem voll funktionsfähigen Paypal Payment Module, das einwandfrei funktioniert und nicht so viel Stress macht, wie viele andere Paypal Module in Verbindung mit OSCommerce. Weiß da zufällig jemand etwas? :-)
  8. Hello, friends. We have many customers from different countries but we also want to hear their and your feedback about our work. We want to become much better ;) Here is our partner page, our site, and our envato page Thank you!
  9. Hello, friends! I`m Serhii, from Solomono. And I`m glad to introduse you our first templates: demo.solomono.net and clo.solomono.net This templates are completely diferent from standart oscommerce. Its php 7.1 ready, SEO ready, mobile friendly(bootstrap), has unlimited images for products, unlimited information pages, completely different admin panel (you can try if for free, just put your email on top of page here ), very fast attribute filter, and optimized DB queries and MANY other. Our main features comparing to default oscommerce: 1. Mobile ready! 2. Modern Adaptive Layout (with ability to edit main site colors, edit blocks in left column, main page and other places) 3. Unlimited Information pages! 4. High Site Speed (faster than standart oscommerce, opencart, magento, wordpress and other) 5. SEO READY (SEO-urls, editable meta tags for products, categories and main page, texts for categories pages, editable robots.txt, generating Sitemap.xml, html-sitemap, ) 6. Fast Onepage Checkout 7. Ajax-functions (adding to cart, wishlist, comparing, search, filtering, sorting, sliders and other) 8. All new Admin panel! 9. Unlimited images for products 10. CSV import-export ..and MANY other! https://solomono.net/advantages-a-104.htm Also you can change your site colors, phones, meta tags, footer information, mainpage modules directly from admin panel. Its easy to change website design, our version has template system sililar to BTS. Also we can move your old oscommerce website to our new versions with full DB importing (products, categories, manufacturers, attributes, orders, customers, admins and other) Look more about us: https://solomono.net/about-company-a-99.html Solomono on Envato: https://codecanyon.net/user/solomono Solomono on Oscommerce: https://www.oscommerce.com/Services&developers&solomono So, tell us your reviews and questions pls. If you want to order template or some help, we would like to help you: https://solomono.net/contacts-a-76.html
  10. Hi Everbody, Modal Cart (Upsell base content module) for Bootstraped osCommerce. Popup could help to display prefered/upcoming/specials/connected/Featured/Xsell/also_purchased and so on products with modal cart page. Basicly its not figured out yet but would be appreciated some advices. Addon: http://addons.oscommerce.com/info/9334
  11. i have using the module for Ultimate_SEO_URL its working it all part just when i am going to click category its showing 404 error please help here is my website http://b-kraft.com/ website is online so i have currently disable it when i am going to enable seo url the category going to stop working but url showing correct please check screenshot . Thanks
  12. Roaddoctor

    Google Trusted Stores

    I was hoping to already see a module for Google Trusted Stores but no luck. There has to be someone here who has added this to their shop already? If anyone has already accomplished the feed creation and code placement on a 2.2rc2a or 2.3 shop, it would be great if you could share! All about Google Trusted Stores If not, would anyone here be able to work on developing this? It should not be too difficult. Creating the feeds seems to be the tricky part beyond my ability. Integrating the final google code should be simpler and I can probably do that part; but without the feed part sorted first I am stuck. Anyone willing or able to knock this out? Thanks!
  13. Hi all, I tried to install Ultimate email to Paypal Standard. I copied the following part in paypal_standard.php under module After: // lets start with the email confirmation //--- Beginning of addition: Ultimate HTML Emails ---// if (EMAIL_USE_HTML == 'true') { require(DIR_WS_MODULES . 'UHtmlEmails/Green/checkout_process.php'); $email_order = $html_email; }else{//Send text email //--- End of addition: Ultimate HTML Emails ---// AND Before: tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); //--- Beginning of addition: Ultimate HTML Emails ---// } if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){ //Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout. $TheFileName = 'Last_mail_from_checkout_process.php.htm'; $TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file"); fwrite($TheFileHandle, $email_order); fclose($TheFileHandle); } //--- End of addition: Ultimate HTML Emails ---// The after paying in Paypal and rediction to the shop, I receive a blank window in IE. I was redicted to shopping_process. I assume, that I need to check in my Paypal account isn'it? I do not receive a confirmation mail too, after this error. Thanks for your support
  14. As more and more people are browsing the web on mobile devices like phones and tablets, we have quickly made the jump to mobile responsive design and development. However, we have decided to go that one step further and create a mobile version of osCommerce, which as you may have guessed, is going to make it a lot easier for your customers to shop with you not just from their computer, but also their tablets and phones. Thanks to App stores people are used to purchasing products with their mobile devices and we don't see why it shouldn't be a common experience through osCommerce also. We have created a modified version of osCommerce v2.3.1 and it is compatible with all major modules. It will work on iPhone, Android and any other browser based mobile device. his is the first time we believe it has been done with osCommerce, and we're so happy that we have made a major contribution to the osCommerce community that we are offering it for free! You can download it through github. We hope that people will contribute to it's development and help evolve this valuable piece of software. If you're thinking about upgrading an existing osCommerce website or building a new one from scratch, we highly suggest making it mobile responsive to increase your sales by giving your customers more access to your store despite their browsing device.
  15. WePay has decided to cancel its hosted payments solution. For OSCommerce users plugged into WePay and still needing a hosted payment solution, 2Checkout is accepting applications now for these clients and will work to get the applications a higher priority in our queue. Use the OSCommerce link if you or a client needs to get underwritten for a hosted solution quickly and we will prioritize it as high as possible in the list to get you underwritten more quickly and back up and selling. The link is: 2checkout.com . Thanks,
  16. the url looking like normal url, there is no seo url. http://www.yoursite.com/product_info.php?cPath=1_4&products_id=1 not changing to : http://www.yoursite.com/Hardware/Graphics-Cards/Matrox-G200-MMS/
  17. **** ENGLISH **** With this contrib you will be able to add a poll box to your store, and show its results! Download this add-on on the attached files. **** ESPAÑOL **** Con esta contribución podrás añadir un box de encuestas en tu tienda, y mostrar sus resultados! Descarga la contribución en los archivos adjuntos. http://addons.oscommerce.com/info/8614
  18. alessandro.cacchione

    Overlay on menu elements

    Hi everyone, i need to display store information in overlay using an external html page. The problem :if i try to call jquery overlay function inside "menu.php" nothing happens on screen. Can somebody tell me the wich is the easiest way to put overlay effect on menù elements? Can somebody tell me in wich part of the oscommerce filesystem the jquery library is included? Thanks for help
  19. Hi, this is a rare occurrence but it's happened a couple of times now and it's resulted in a customer not receiving their order. The module we are using is SagePay Form 1.2. What has happened is the customer has gone to place their order and checked out as normal, we've received the payment from the customer but order hasn't appeared on our admin orders page and the customers basket is still full of what they intended to buy. Has this ever happened to anyone else, and does anyone know a solution? Thanks.
  20. Hello, I have an Os Commerce shop and included the contribution:discount coupons. The contribution allows me to set a minimum order and maximal use for the coupon. But I want that the coupon can only used for one article. So I added in the admin menu a maximum order input and also in the sql table. Now I can input a maximum order 1. So my problem is the discount_coupon.php, where I need the sequence to check the maximum_order option. I tried something, by using the min_order lines and changed into max_order. But I don`t get an error message when I buy 2 or more articles with that coupon code. I`m quite a beginner in PhP and don`t know much. So please if somebody can help me to make this one work, I would be glad. The PhP. code is as follows: <?php /* * discount_coupon.php * August 4, 2006 * author: Kristen G. Thorson * ot_discount_coupon_codes version 3.0 * * * Released under the GNU General Public License * */ class discount_coupon { var $messages, $coupon, $applied_discount, $cart_info; function discount_coupon( $code, $delivery ) { $this->messages = array(); $this->coupon = array(); $this->applied_discount = array(); $this->cart_info = array( 'valid_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ), 'total_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ), 'exclusions' => array() ); $this->get_coupon( $code, $delivery ); //get the module configuration values for debugging if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) { $check_values_query = tep_db_query( $sql = "SELECT configuration_key, configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key LIKE 'MODULE_ORDER_TOTAL_DISCOUNT_COUPON%' OR configuration_key = 'DISPLAY_PRICE_WITH_TAX' OR configuration_key = 'MODULE_SHIPPING_TABLE_STATUS' OR configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING'" ); while( $row = tep_db_fetch_array( $check_values_query ) ) { $this->message( 'INFO: '.$row['configuration_key'].' = '.$row['configuration_value'], 'debug' ); } } } function verify_code() { //check the global number of discounts that may be used if( $this->coupon['coupons_number_available'] != 0 ) { $this->check_num_available(); } //if coupons_max_use==0, then use is unlimited, otherwise, we need to verify the customer hasn't used this coupon more than coupons_max_use times if( $this->coupon['coupons_max_use'] != 0 ) { $this->check_coupons_max_use(); } } function get_coupon( $code, $delivery ) { global $customer_id; //needed for customer_exclusions $check_code_query = tep_db_query( $sql = "SELECT dc.* FROM " . TABLE_DISCOUNT_COUPONS . " dc WHERE coupons_id = '".tep_db_input( $code )."' AND ( coupons_date_start <= CURDATE() OR coupons_date_start IS NULL ) AND ( coupons_date_end >= CURDATE() OR coupons_date_end IS NULL )" ); if( tep_db_num_rows( $check_code_query ) != 1 ) { //if no rows are returned, then they haven't entered a valid code $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message } else { //customer_exclusions $check_user_query = tep_db_query( $sql = 'SELECT dc2u.customers_id FROM '.TABLE_DISCOUNT_COUPONS_TO_CUSTOMERS.' dc2u WHERE customers_id='.(int)$customer_id.' AND coupons_id="'.tep_db_input( $code ).'"' ); if( tep_db_num_rows( $check_user_query ) > 0 ) { $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message //use this to debug exclusions: //$this->message( 'Customer exclusion check failed' ); } //shipping zone exclusions $check_user_query = tep_db_query($sql = 'SELECT dc2z.geo_zone_id FROM '.TABLE_DISCOUNT_COUPONS_TO_ZONES.' dc2z LEFT JOIN '.TABLE_ZONES_TO_GEO_ZONES.' z2g USING( geo_zone_id ) WHERE ( z2g.zone_id='.(int)$delivery['zone_id'].' or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id='.(int)$delivery['country_id'].' or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="'.tep_db_input( $code ).'"' ); if (tep_db_num_rows( $check_user_query ) > 0 ) { $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message //use this to debug exclusions: //$this->message( 'Shipping Zones exclusion check failed' ); } //end shipping zone exclusions $row = tep_db_fetch_array( $check_code_query ); //since there is one record, we have a valid code $this->coupon = $row; } } function check_coupons_min_order() { switch( $this->coupon['coupons_min_order_type'] ) { //minimum number of products: case 'quantity': global $cart; $total = $this->cart_info['valid_products']['count']; if( $this->coupon['coupons_min_order'] > $total ) { //make sure there are enough products in the cart $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_QUANTITY_ERROR, $this->coupon['coupons_min_order'] ) ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' ); return false; } break; //minimum price: case 'price': default: global $order, $currencies; $total = $this->cart_info['valid_products']['total']; //if we display the subtotal without the discount applied, then just compare the subtotal to the minimum order if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' && $this->coupon['coupons_min_order'] > $total ) { $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' ); return false; //if we display the subtotal with the discount applied, then we need to compare the subtotal with the discount added back in to the minimum order } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'true' ) { $subtotal = $total; foreach( $this->applied_discount as $discount ) { $subtotal += $discount; } if( $this->coupon['coupons_min_order'] > $subtotal ) { $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $subtotal='.$subtotal, 'debug' ); return false; } } break; } return true; } function check_coupons_max_order() { switch( $this->coupon['coupons_max_order'] ) { //minimum number of products: case 'quantity': global $cart; $total = $this->cart_info['valid_products']['count']; if( $this->coupon['coupons_max_order'] <= $total ) { //make sure there are enough products in the cart $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MAX_QUANTITY_ERROR, $this->coupon['coupons_max_order'] ) ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_max_order(): $total='.$total, 'debug' ); return false; } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'true' ) { $subtotal = $total; foreach( $this->applied_discount as $discount ) { $subtotal += $discount; } return false; } } return true; } function check_coupons_max_use() { global $customer_id; $check_use_query = tep_db_query($sql = "SELECT COUNT(*) AS cnt FROM ".TABLE_ORDERS." AS o INNER JOIN ".TABLE_DISCOUNT_COUPONS_TO_ORDERS." dc2o ON dc2o.orders_id=o.orders_id AND o.customers_id = '".(int)$customer_id."' AND dc2o.coupons_id='".tep_db_input( $this->coupon['coupons_id'] )."'"); $use = tep_db_fetch_array( $check_use_query ); //show error message if coupons_max_use is equal to the number of times this customer has used the code if( $this->coupon['coupons_max_use'] <= $use['cnt'] ) { $this->message( sprintf( ENTRY_DISCOUNT_COUPON_USE_ERROR, $use['cnt'], $this->coupon['coupons_max_use'] ) ); //display the error message for number of times used return false; } return true; } function check_num_available() { //count the number of times this coupon has been used $check_use_query = tep_db_query( $sql = 'SELECT COUNT(*) AS cnt FROM '.TABLE_DISCOUNT_COUPONS_TO_ORDERS.' WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' ); $use = tep_db_fetch_array( $check_use_query ); if( $this->coupon['coupons_number_available'] <= $use['cnt'] ) { $this->message( ENTRY_DISCOUNT_COUPON_AVAILABLE_ERROR ); //display error that this coupon is no longer valid return false; } return true; } function is_recalc_shipping() { global $order, $language; //calculate the order total: $order_total = $order->info['total'] - $order->info['shipping_cost']; if( DISPLAY_PRICE_WITH_TAX != 'true' ) $order_total -= $order->info['tax']; //check if there is free shipping if( strtolower(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING) == 'true' ) { include( DIR_WS_LANGUAGES.$language.'/modules/order_total/ot_shipping.php' ); //if free shipping is enabled, make sure the discount does not bring the order total below free shipping limit if( $order->info['shipping_method'] == FREE_SHIPPING_TITLE ) { //if free shipping is the selected shipping method if( $order_total < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ) { //if the discount lowers the total below the free shipping limit return true; } } } //check if table rate shipping has changed if( strtolower(MODULE_SHIPPING_TABLE_STATUS) == 'true' ) { include( DIR_WS_LANGUAGES.$language.'/modules/shipping/table.php' ); if( substr($order->info['shipping_method'], 0, strlen(MODULE_SHIPPING_TABLE_TEXT_TITLE)) == MODULE_SHIPPING_TABLE_TEXT_TITLE && MODULE_SHIPPING_TABLE_MODE == 'price' ) { $table_cost = split( "[:,]", MODULE_SHIPPING_TABLE_COST ); for( $i = 0; $i < count( $table_cost ); $i += 2 ) { if( $order_total <= $table_cost[$i] ) { $shipping = $table_cost[$i+1]; break; } } if( $order->info['shipping_cost'] != $shipping ) { //if the discount lowers the total below the table rate return true; } } } return false; } function is_allowed_product( $product_id ) { //category exclusion if( !is_array( $this->cart_info['exclusions']['categories'] ) ) { //only create the array when we need to and only once //check to see if the product is in one of the limited categories $check_category_query = tep_db_query( $sql = 'SELECT categories_id FROM '.TABLE_DISCOUNT_COUPONS_TO_CATEGORIES.' WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' ); $this->cart_info['exclusions']['categories'] = array(); if( tep_db_num_rows( $check_category_query ) > 0 ) { //for each category, get all the child categories while( $categories = tep_db_fetch_array( $check_category_query ) ) { $this->cart_info['exclusions']['categories'][] = $categories['categories_id']; tep_get_subcategories( $this->cart_info['exclusions']['categories'], $categories['categories_id'] ); } //$this->excluded_categories are all categories and subcategories excluded from use with the coupon code $this->cart_info['exclusions']['categories'] = array_unique( $this->cart_info['exclusions']['categories'] ); } } if( count( $this->cart_info['exclusions']['categories'] ) > 0 ) { $c_path = tep_get_product_path( $product_id ); //get the product's cPath $this_products_catgeory_array = tep_parse_category_path( $c_path ); //convert the product's cPath into an array //if the product's cPath and the excluded categories array have elements in common, then the product is excluded $intersection = array_intersect( $this_products_catgeory_array, $this->cart_info['exclusions']['categories'] ); if( is_array( $intersection ) && count( $intersection ) > 0 ) { //use this to debug exclusions: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$category.' failed manufacturer exclusion check', 'debug' ); return false; } } //end category exclusion //product exclusion if( !is_array( $this->cart_info['exclusions']['products'] ) ) { //only create the array when we need to and only once //check to see if the product is in one of the limited categories $check_product_query = tep_db_query( $sql = 'SELECT products_id FROM '.TABLE_DISCOUNT_COUPONS_TO_PRODUCTS.' WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' ); $this->cart_info['exclusions']['products'] = array(); if( tep_db_num_rows( $check_product_query ) > 0 ) { while( $products = tep_db_fetch_array( $check_product_query ) ) { $this->cart_info['exclusions']['products'][] = $products['products_id']; } } } if( count( $this->cart_info['exclusions']['products'] ) > 0 ) { if( in_array( $product_id, $this->cart_info['exclusions']['products'] ) ) { //use this to debug exclusions: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product_id.' failed product exclusion check', 'debug' ); return false; } } //end product exclusion //manufacturer exclusion if( !is_array( $this->cart_info['exclusions']['manufacturers'] ) ) { //only create the array when we need to and only once //check to see if the product is in one of the limited categories $check_manufacturer_query = tep_db_query( $sql = 'SELECT manufacturers_id FROM '.TABLE_DISCOUNT_COUPONS_TO_MANUFACTURERS.' WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' ); $this->cart_info['exclusions']['manufacturers'] = array(); if( tep_db_num_rows( $check_manufacturer_query ) > 0 ) { while( $manufacturers = tep_db_fetch_array( $check_manufacturer_query ) ) { $this->cart_info['exclusions']['manufacturers'][] = $manufacturers['manufacturers_id']; } } } if( count( $this->cart_info['exclusions']['manufacturers'] ) > 0 ) { $check_manufacturer_query = tep_db_query( $sql = 'SELECT manufacturers_id FROM '.TABLE_PRODUCTS.' WHERE products_id="'.(int)$product_id.'"' ); if( tep_db_num_rows( $check_manufacturer_query ) > 0 ) { $manufacturers = tep_db_fetch_array( $check_manufacturer_query ); if( in_array( $manufacturers['manufacturers_id'], $this->cart_info['exclusions']['manufacturers'] ) ) { //use this to debug exclusions: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product_id.' failed manufacturer exclusion check', 'debug' ); return false; } } } //end manufacturer exclusion //specials exclusion if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_EXCLUDE_SPECIALS == 'false' ) { if( ( $special_price = tep_get_products_special_price( $product_id ) ) !== null ) { $this->cart_info['exclusions']['products'][] = $product_id; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'false' ) $this->message( 'INFO: Product '.$product_id.' failed specials exclusion check. Adding product to excluded products array.', 'debug' ); return false; } } //end specials exclusion return true; } function is_exists_exclusions() { if( $this->cart_info['valid_products']['total'] != $this->cart_info['total_products']['total'] ) return true; if( $this->cart_info['valid_products']['count'] != $this->cart_info['total_products']['count'] ) return true; return false; } //this function is for tracking the product totals and count so that we can correctly calculate the discount function total_valid_products( $products = array() ) { global $cart; for( $i = 0; $i < count( $products ); $i++ ) { if (DISPLAY_PRICE_WITH_TAX == "true"){ $product_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']); $price = ( tep_add_tax($products[$i]['price'], $product_tax) + $cart->attributes_price( $products[$i]['id'] ) ) * $products[$i]['quantity']; }else{ $price = ( $products[$i]['price'] + $cart->attributes_price( $products[$i]['id'] ) ) * $products[$i]['quantity']; } $this->cart_info['total_products']['total'] += $price; $this->cart_info['total_products']['count'] += $products[$i]['quantity']; $this->cart_info['total_products']['line_items']++; if( $this->is_allowed_product( tep_get_prid( $products[$i]['id'] ) ) ) { //not an excluded product $this->cart_info['valid_products']['count'] += $products[$i]['quantity']; $this->cart_info['valid_products']['total'] += $price; $this->cart_info['valid_products']['line_items']++; } } } function calculate_discount( $product = array(), $current_product = 0 ) { if( !$this->is_allowed_product( tep_get_prid( $product['id'] ) ) ) { //check that the product isn't excluded $applied_discount = 0; //don't apply a discount if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Excluded product '.$product['id'].'. Discount of '.$applied_discount.' not applied.', 'debug' ); } else { switch( $this->coupon['coupons_discount_type'] ) { case 'shipping': $applied_discount = 0; break; case 'fixed': //get the percentage of the total discount to apply to this item: $percentage_applied = $this->coupon['coupons_discount_amount'] / $this->cart_info['valid_products']['total']; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Percentage of discount applied to product '.$product['id'].': '.$percentage_applied.'.', 'debug' ); //calculate the applied discount: $applied_discount = $product['final_price'] - $percentage_applied; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Fixed discount applied to product '.$product['id'].': '.$applied_discount.'.', 'debug' ); //this section is to make sure that both the fixed discount and the tax are correct: if( $this->cart_info['valid_products']['line_items'] == ( $current_product + 1 ) ) { $difference = $this->coupon['coupons_discount_amount'] - ( array_sum( $this->applied_discount ) + $applied_discount ); if( $difference != 0 ) { if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Fixed adjustment for product '.$product['id'].': difference: '.$difference.' unadjusted applied_discount: '.$applied_discount, 'debug' ); $applied_discount += $difference; } } //end code to ensure accurate fixed discount and tax break; case 'percent': $applied_discount = $product['final_price'] * $this->coupon['coupons_discount_amount'] * $product['qty']; break; } if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product['id'].' passed exclusion check. Discount '.$applied_discount.' applied. ('.$this->coupon['coupons_discount_type'].')', 'debug' ); } //now determine how we need to handle tax: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_TAX != 'None' ) { $discount_tax = $this->apply_tax( $applied_discount, $product['tax'], false, true ) - $applied_discount; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Tax not applied to product '.$product['id'].': '.$discount_tax, 'debug' ); } else $discount_tax = 0; //tally the discount tax amount for each tax group if( isset( $this->discount_tax[$product['tax_description']] ) ) $this->discount_tax[$product['tax_description']] += $discount_tax; else $this->discount_tax[$product['tax_description']] = $discount_tax; //tally the discount amount for each tax group if( isset( $this->applied_discount[$product['tax_description']] ) ) $this->applied_discount[$product['tax_description']] += $applied_discount; else $this->applied_discount[$product['tax_description']] = $applied_discount; $discount = array('applied_discount' => $applied_discount, 'discount_tax' => $discount_tax); return $discount; } function calculate_shown_price( $discount, $product ) { $actual_shown_price = null; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Discount of '.( $discount['applied_discount'] + $discount['discount_tax'] ).' applied to product '.$product['id'].' ($'.$product['final_price'] * $product['qty'].').', 'debug' ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; $shown_price = $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty']; //$product['final_price'] * $product['qty']; } else { $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } //if we need to display the subtotal without the discount applied, then add the shown price to the subtotal, then change shown price to the price with the applied discount in order to properly calculate taxes if( !isset( $actual_shown_price ) ) $actual_shown_price = $shown_price; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Calculating tax on '.$actual_shown_price.'. Displayed price '.$shown_price.'.', 'debug' ); $shown_price_array = array( 'shown_price' => $shown_price, 'actual_shown_price' => $actual_shown_price ); return $shown_price_array; } function finalize_discount( $info ) { //make sure we meet the order minimum if( !$this->check_coupons_min_order() ) { $this->applied_discount = array(); if( $this->is_exists_exclusions() ) $this->message( ENTRY_DISCOUNT_COUPON_EXCLUSION_ERROR ); //add on to the min_order error message since we have excluded items } if( !$this->check_coupons_max_order() ) { $this->applied_discount = array(); if( $this->is_exists_exclusions() ) $this->message( ENTRY_DISCOUNT_COUPON_EXCLUSION_ERROR ); //add on to the min_order error message since we have excluded items } if( !$this->is_errors() ) { //if there are no errors, we can apply the discount if( $this->coupon['coupons_discount_type'] == 'shipping' ) { //discount shipping if the coupon type is shipping //bugfix by xinxi if($this->cart_info['valid_products']['count']>0){ $this->applied_discount['shipping'] = $info['shipping_cost'] * $this->coupon['coupons_discount_amount']; $this->applied_discount['shipping'] = $this->applied_discount['shipping']; $info['total'] -= $this->applied_discount['shipping']; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Shipping Discount of '.$this->applied_discount['shipping'].' applied.', 'debug' ); }//end bugfix by xinxi } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //subtract the discount from the order total if it's not displayed in the subtotal foreach( $this->applied_discount as $discount ) { $info['total'] -= $discount; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Discount of '.$discount.' applied to order total.', 'debug' ); } } if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_ALLOW_NEGATIVE == 'false' && $info['total'] < 0 ) $info['total'] = 0; } return $info['total']; } //this function is for making sure rounding doesn't happen except when desired function apply_tax( $price, $tax, $round = false, $force = false ) { if( DISPLAY_PRICE_WITH_TAX == 'true' || $force ) { if( $tax != 0 ) $price = tep_add_tax( $price, $tax ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Applied tax of '.$tax.' to: '.$price, 'debug' ); } if( $round ) { global $currencies; $price = tep_round( $price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'] ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Rounded price: '.$price, 'debug' ); } return $price; } function format_display( $tax_group = '' ) { global $order, $currencies; //if using multiple languages, get the language format string from the proper language file, otherwise, use the module configuration field $display = ( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_USE_LANGUAGE_FILE == 'true' ? MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_FILE : MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_CONFIG ); switch( $this->coupon['coupons_discount_type'] ) { case 'shipping': $discount_amount = ( $this->coupon['coupons_discount_amount'] * 100 ).'% '.MODULE_ORDER_TOTAL_DISCOUNT_COUPON_TEXT_SHIPPING_DISCOUNT; break; case 'percent': $discount_amount = ( $this->coupon['coupons_discount_amount'] * 100 ).'%'; break; case 'fixed': $discount_amount = $currencies->format( $this->coupon['coupons_discount_amount'] ); break; } $min_order = ( $this->coupon['coupons_min_order'] != 0 ? ( $this->coupon['coupons_min_order_type'] == 'price' ? $currencies->format( $this->coupon['coupons_min_order'] ) : (int)$this->coupon['coupons_min_order'] ) : '' ); $max_order = ( $this->coupon['coupons_max_order'] != 0 ? ( $this->coupon['coupons_max_order'] == 'price' ? $currencies->format( $this->coupon['coupons_max_order'] ) : (int)$this->coupon['coupons_max_order'] ) : '' ); //replace the variables with their proper values: $display = str_replace( '[code]', $this->coupon['coupons_id'], $display ); $display = str_replace( '[discount_amount]', $discount_amount, $display ); $display = str_replace( '[coupon_desc]', $this->coupon['coupons_description'], $display ); $display = str_replace( '[min_order]', $min_order, $display ); $display = str_replace( '[number_available]', $this->coupon['coupons_number_available'], $display ); $display = str_replace( '[tax_desc]', $tax_group, $display ); return $display; } function is_errors() { if( count( $this->messages['error'] ) > 0 ) return true; return false; } function message( $message, $error_level = 'error' ) { $this->messages[$error_level][] = $message; } function get_messages( $error_level = 'error' ) { if( $error_level == 'debug' ) return $this->messages; return $this->messages[$error_level]; } } ?> If you need more information, please feel free to ask me! Thank you!
  21. I realise what I am looking for probably doesn't exist, but I think if someone would take on the challenge it could make an interesting addon. Also it would take oscommerce to a whole new level !!! I am looking for an addon that allows for a subdomain that can be added to an oscommerce site which has the same database / log in details for customers, whilst being operated on the same css / template, and from the same admin page as the main site. This could allow the main page to be for sales of products and the subdomain to cater for hire / rental of products via means of a booking calendar or a blog to promote your site. Thus giving handy information to customers whilst also attracting extra traffic through added searchable content. This could be product releases, upcoming events or some other useful info. I realise there is a lot in this and will probably need two parts : 1) the addon for the oscommerce subdomain that shares template / css / database / admin with the main site and 2) a booking calendar addon for rental of products / hotel rooms / cars ..... but if anyone has any ideas I think it could make an interesting conversation piece or an epic pair of addons ????
  22. Hi, I have installed a fresh store in localhost. I am in need of complete contribution (step by step procedure) of Credit Card module with CVV2 for osCommerce version 2.3.1. Kindly suggest me the proper link which gives perfect support for beginners. Thanks in Advance Mohammed
  23. Hello to all. I hope i am posting this in the right section since i am new here. I have an eshop that i would like it to display some weather information on the main page.I searched for OScommerce addons and i only found one (Weather Box) that only displays french cities and american cities so it doesnt work for me. So while i was searching i found another widget called Weather Widget FX that does exactly what i want it to (like input from user) and looks nice as well. My question since i am kinda new in OSCommerce is if it can be installed on OScommerce and if yes how exactly.On the picture attached you can see the files that i have regarding Weather Widget FX. Thank you.
  24. I deployed oscommerce through Webuzo virtual machine I downloaded last night. I have a customised addon which I wish to integrate with my current installation. I have an instance of OSCommerce running on the Webuzo Amazon Cloud. The VM provides me a testing environment. Please me he with a guide. Has anybody used apps on cloud. Need a company as well.
  25. Hi Experts, I tried to install Color Swatches from http://addons.oscommerce.com/info/8117 to OSC 2.3. It required some adoption to the code, the add-on does not give me any error, however, it does not too :) I added new product and attributes for it but when I log on to Color Swatches under Catalog menu, it retrieves no product to me. It shows the head of the table, but it is empty. Has anyone successfully adopted Color Swatches for OSC 2.3? I would appreciate your help! Kind Regards, Kirill