Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Tanja Petrova
  1. I found the answer on an earlier post. To prevent the discount being applied twice and have the subtotal show without the discount applied, in catalog/includes/classes/discount_coupon.php: (around line 368) replace: 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; } with this: 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'] ); $discount['applied_discount'] = 0; } 'Display subtotal with discount applied' should be set to false. My new problem: Discount codes are working perfectly for 'fixed price' and 'shipping discounts'. I also tested different exclusions and it's functioning flawlessly. However 'percentage discounts' are miscalculated by up to $0.73 (customer is charged $0.73 more than he should have to pay based on discount percentage). I know the installation instructions say that small rounding errors may occur but I don't consider $0.73 to be a small error. Has anyone else had this problem with wrong calculations for percentage discounts? Tanja.
  2. I downloaded and installed DCC 3.3 by kgt (4 June 2007) and I got everything to work. I added two test coupons and the coupon box is appearing on the order page. The ONLY problem is that, for some reason, the subtotal is including the discount. I have the sort order as follows: Subtotal DCC Shipping Tax Total My order looks like this: (Product 1) 40.00 (Product 2) 30.00 (Product 3) 50.00 (3 products add up to 120.00 but the subtotal is showing with the discount already applied even though I have 'display subtotal with discount applied' set to false) Subtotal 108.00 Discount 10% 12.00 Shipping 0.00 Tax 0.00 Total 96.00 So the discount is being applied twice. Any suggestions? After multiple attempts with DCC 3.4 I finally got this to work so I thought I'd post to let other who may be having problems with DCC 3.4 know that DCC 3.3 worked for me. Thank you once again to Tracy for her suggestions. Tanja.
  3. Tracy, Thanks a lot for replying. I will try an earlier version and report back on the result. Tanja.
  4. I downloaded the latest version (Feb 2010) of DCC and followed all the instructions meticulously. My issues: 1. No discount coupon box is showing up on my order page. (I downloaded Winmerge but I haven't compared my files yet; I will do this tonight. If it still does not work, I will do a fresh install of osCommerce on another test domain and try again). Everything works in the admin - I can add/modify coupons and I've used a unique sort order for the discount code. The box just does not appear on the page when I'm placing a test order. 2. Several persons on this thread have talked about an "SQL file" that wasn't run and others have mentioned ensuring that the database is updated. Neither of these things are mentioned in the installation instructions. If there are additional steps to be executed, how is a new user supposed to know? 2. Another user mentioned that the DCC download page contains 'corrections' for some of the files that need to be edited. I downloaded the file that was presented to me on the contribution page. Why would that be considered the 'latest version' if it does not include corrections? The contribution author does not seem to be providing guidance to amateurs like myself. I checked all the discount/promotional contributions and DCC has everything I want and more, so I'm willing to make multiple attempts to get it to work. If at all possible, can anyone advise about the SQL file and the corrections on the download page? If possible, maybe you can post a few guidelines for new users like myself who seem to be missing some of the installation steps. Thank you in advance for any assistance you can provide. Regards, Tanja.
  5. I have the same problem as stated above. I went over the installation instructions and I've placed all the code in the right place. I added a discount coupon in my admin area and I gave the discount coupon a unique sort order. But the discount coupon box is not showing up during the order process. I have no idea why. I would really appreciate some advice. Thanks. Tanja.
  6. TanjaPetro

    Site Search Plus

    Thanks a lot for all your help.
  7. TanjaPetro

    Site Search Plus

    I found TEXT_NO_PRODUCTS like this: <table cellpadding="0" cellspacing="0" class="product"> <tr><td class="padd_22"><?php echo TEXT_NO_PRODUCTS ?></td></tr> </table> Should I insert your code above this and cross my fingers?
  8. TanjaPetro

    Site Search Plus

    Thanks for the prompt response, Jack. After about 6 hours the shop reappeared without me doing anything. So the store is working as before but I still don't have your search box! Step 5 of your instructions say: In the includes/modules/product_listing.php file, FIND (around line 148) $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); ADD ABOVE /************** BEGIN SITESEARCH CHANGE ******************/ if (tep_not_null($keyword)) { $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'form' => tep_draw_form('product_notify', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'post'), 'align' => 'left', 'text' => '<table border="0"><tr><td class="productListing-data" colspan="2">' . TEXT_NO_PRODUCTS_KEYWORD . '</td></tr>' . '<tr><td height="5"></td></tr><tr><td width="25%" class="productListing-data">' . TEXT_PRODUCT_NAME . '</td><td>' . tep_draw_input_field('keywords', '', 'size="40" maxlength="255" ') . '</td></tr>' . '<tr><td height="5"></td></tr><tr><td class="productListing-data">' . TEXT_CUSTOMER_EMAIL . '</td><td>' . tep_draw_input_field('cust_email', '', 'size="40" maxlength="100"', false) . '</td></tr>' . '<tr><td height="5"></td></tr><tr><td class="productListing-data" valign="top">' . TEXT_COMMENTS . '</td><td>' . tep_draw_textarea_field('comments', 'soft', 10, 4, '', '', false) . '</td></tr>' . '<tr><td height="5"></td></tr><tr><td colspan="2" align="center" class="productListing-data"><INPUT type="submit" name="request_submit" value="Submit"></a></td></tr>' . '</table>'); } else /************** BEGIN SITESEARCH CHANGE ******************/ However, the code in my includes/modules/product_listing.php is: if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } I'm not sure where to add your code since my code is different. I installed it in my 'test' store and it functions flawlessly. Tanja.
  9. TanjaPetro

    Site Search Plus

    Hi Everyone, I was trying to install this contribution following the instructions provided. After following all the steps I got 2 warnings and 1 fatal error and I could not access my shop. I retraced my steps and undid all the changes I had made. Now I am getting this error: Fatal error: Call to a member function add_current_page() on a non-object in /home/secretsh/public_html/shop/includes/application_top.php on line 314 While making the changes to add the search box, I did nothing to application_top.php so I'm not sure where there's an error there. Anyway, my store is gone and I don't know why. I would really appreciate some advice from anyone. Thanks in advance to anyone who can offer help. Tanja.
  10. I downloaded osCommerce yesterday and I've been trying to get used to it. I downloaded this contribution and followed the instructions for installing it. I have configured the order total module. The next step says to go to Catalog > Discount Coupons. 1. When I do this (click on Catalog > Discount Coupons, I am directed from the admin area to my store. I am not able to create any discount coupons. I cannot figure out why. 2. I wanted to check to see if the coupon box would be displayed. I 'purchased' an item from my store, created an account and proceeded to checkout. The coupon box is there but when I click continue to confirm the order, this message appears: Installing this coupon code contribution was my first experience with PHP so I am clueless as to where I went wrong. I have 2 distinct problems as described above. Any help will be greatly appreciated. Thank you.