Jump to content

suhy

Members
  • Content count

    97
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by suhy


  1. For example:
    VAT: 22%
    Discount level 1: 10% at 50€
    Shopping cart value: 58€ (47,50€ + VAT)
    The discount was showed as activated, but it was not deducted in shopping cart at checkout as the Shopping cart value was in fact 47,50€ + VAT ...

    After update:
    Discount level 1: 10% at 61€
    Discount not triggered yet.

    Discount table in ADMIN must be treated as w/o WAT now ...


    Solution for having one tax rate:
    includes/modules/boxes/shopping_cart.php

     

    For SPPC when showing prices including VAT. We have to look in session for ...show_tax rule. If not logged in, prices includes VAT, so we have to add VAT to discount price table breaks. The same for normal user, where prices are including VAT.

    if (($suhi_customer_group_show_tax == '1') || ($suhi_customer_group_show_tax == null))
    

    For SPPC groups not showing VAT we skip this and continue as before ...

    Hope someone finds this useful ..


  2. Better late reply than none, I suppose ... as I've found one mistake when showing prices including VAT. The discount table that you input in Admin area behaves as w/o VAT and is not added in the front end shop. The discount break limits were off for VAT amount ...
     
    Solution for having one tax rate:
    includes/modules/boxes/shopping_cart.php
     
    add to $suhi_query:
    (SELECT tax_rate FROM " . TABLE_TAX_RATES ." WHERE tax_rates_id = '1' ) AS ddv_tax_rate

    so it looks like:

    $suhi_query = tep_db_query("select 
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_1') AS popust_nivo_1,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_2') AS popust_nivo_2,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_3') AS popust_nivo_3,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_4') AS popust_nivo_4,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_5') AS popust_nivo_5,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_1') AS popust_nivo_proc1,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_2') AS popust_nivo_proc2,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_3') AS popust_nivo_proc3,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_4') AS popust_nivo_proc4,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_5') AS popust_nivo_proc5,
    (SELECT tax_rate FROM " . TABLE_TAX_RATES ." WHERE tax_rates_id = '1' ) AS ddv_tax_rate
    ");
    

    find bellow it:

        $suhi_popust = tep_db_fetch_array($suhi_query);
    	
    	$popust_nivo_1 = $suhi_popust['popust_nivo_1'];
    	$popust_nivo_2 = $suhi_popust['popust_nivo_2'];
    	$popust_nivo_3 = $suhi_popust['popust_nivo_3'];
    	$popust_nivo_4 = $suhi_popust['popust_nivo_4'];
    	$popust_nivo_5 = $suhi_popust['popust_nivo_5'];
    

    and REPLACE with:

    $suhi_popust = tep_db_fetch_array($suhi_query);
    	
    	$ddv_tax_rate = ($suhi_popust['ddv_tax_rate'] / 100) + 1;
    	
    		
    	$popust_nivo_1 = round($suhi_popust['popust_nivo_1'] * $ddv_tax_rate);
    	$popust_nivo_2 = round($suhi_popust['popust_nivo_2'] * $ddv_tax_rate);
    	$popust_nivo_3 = round($suhi_popust['popust_nivo_3'] * $ddv_tax_rate);
    	$popust_nivo_4 = round($suhi_popust['popust_nivo_4'] * $ddv_tax_rate);
    	$popust_nivo_5 = round($suhi_popust['popust_nivo_5'] * $ddv_tax_rate);
    

    if you are using SPPC, you can do the following:

    $suhi_popust = tep_db_fetch_array($suhi_query);
    	
    $suhi_customer_group_show_tax = $_SESSION['sppc_customer_group_show_tax'];
    	$ddv_tax_rate = ($suhi_popust['ddv_tax_rate'] / 100) + 1;
    	
    		if (($suhi_customer_group_show_tax == '1') || ($suhi_customer_group_show_tax == null)) {
    	$popust_nivo_1 = round($suhi_popust['popust_nivo_1'] * $ddv_tax_rate);
    	$popust_nivo_2 = round($suhi_popust['popust_nivo_2'] * $ddv_tax_rate);
    	$popust_nivo_3 = round($suhi_popust['popust_nivo_3'] * $ddv_tax_rate);
    	$popust_nivo_4 = round($suhi_popust['popust_nivo_4'] * $ddv_tax_rate);
    	$popust_nivo_5 = round($suhi_popust['popust_nivo_5'] * $ddv_tax_rate);
    		} else {
    	
    	$popust_nivo_1 = $suhi_popust['popust_nivo_1'];
    	$popust_nivo_2 = $suhi_popust['popust_nivo_2'];
    	$popust_nivo_3 = $suhi_popust['popust_nivo_3'];
    	$popust_nivo_4 = $suhi_popust['popust_nivo_4'];
    	$popust_nivo_5 = $suhi_popust['popust_nivo_5'];
    		}
    

  3. Google sign in kind of works , Facebook it doesnt and returns an error ...

     

    Cant check FB login details because of an error ..

     

    For the Login with Google:

    While it sounds good to be able to login with Google account.....  I still don't see any point logging in with Google if ONLY Name, Surname and Email are retreived from an usual Google account setup .. while oscommerce needs also other Required fields for most shops in order to send the goods somewhere ...

     

    In this way the customer only gets confused as we give him/her a feeling that the login / create account proceedure will be somehow shorten, but .. than the customer still needs to enter most of the rquired info anyway ..


  4. Hello !

     

    This is probably the easiest contribution to apply some dynamic discount option to order total and I love it for my heavy modified shop :D

     

    So, I have made a little addon for it when using % rate discount with order total amount. Thought it would be nice to show a customer which level of discount he already achieved and of course he must also see how little gap there is to the next level if any. It may boost the order for a few € ;).

     

    Please also note above post for TAX settings. I'm using SPPC and the way to set it is TAX inclusive and recalculate tax and select tax class, so also tax exclusions works fine.

     

    The addon grabs the Discount level and Discount Amount from database as set in admin module, for all 5 levels.

    Then we play with some ifs and css classes to display it dinamicaly in relation to order total amount ...

    I placed it under the shopping cart box as its cool to be always visible where right column is visible also ..

     

    It could probably be done in another, maybe simpler way, but these are my current coding skills, still learning, any suggestion appriciated :).

     

    To avoid some additional code, please respect the following !:

    - Dont skip levels. Levels NOT in use should be at the end. If you delete level 3 for example, than move level 4 to 3 and 5 to 4 and leave level 5 empty.

    - Its kind of logical this way, but you never know.. If you skip levels, css breaks, no need for extra conditions, we have a rule now :D

    This is a simple way for css to work fine as we have to move discount indicator up down within levels limits and stll watch for not activated levels.

    Example: level 3 can also be the last level of course, it would not display properly if the order total is higher than the level 3 limits, but if we know its the last level to show, we also now that level 4 is null in this case ....so we add another check for if llevel = null and if yes, we can set behaviour as the last level ... I had a feeling that I have to explain this :/

     

    Here's a short video of addon in action :

    https://youtu.be/C6I8vlrDLxA

     

     

    Hope that somebody finds it as useful as I do :D

     

    Installation proceedure: oscommerce 2.3.4

     

    1#

    Install original contribution

     

    2#

    catalog/includes/modules/boxes/bm_shopping_cart.php

     

    find:

    $data = '<div class="ui-widget infoBoxContainer">' .
            '  <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' .
            '  ' . $cart_contents_string .
            '</div>';
    

    replace with:

    $data = '<div class="ui-widget infoBoxContainer mj-shoppingcart">' .
                  '  <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' .
                  '  ' . $cart_contents_string .
    			  '';
    /* suhi */	
    $suhi_total_box = ($cart->show_total());
    $popust_class = "popust_levl_met";
    $suhi_query = tep_db_query("select 
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_1') AS popust_nivo_1,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_2') AS popust_nivo_2,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_3') AS popust_nivo_3,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_4') AS popust_nivo_4,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_LEVEL_5') AS popust_nivo_5,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_1') AS popust_nivo_proc1,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_2') AS popust_nivo_proc2,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_3') AS popust_nivo_proc3,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_4') AS popust_nivo_proc4,
    (select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_AMOUNT_5') AS popust_nivo_proc5
    ");
        $suhi_popust = tep_db_fetch_array($suhi_query);
    	
    	$popust_nivo_1 = $suhi_popust['popust_nivo_1'];
    	$popust_nivo_2 = $suhi_popust['popust_nivo_2'];
    	$popust_nivo_3 = $suhi_popust['popust_nivo_3'];
    	$popust_nivo_4 = $suhi_popust['popust_nivo_4'];
    	$popust_nivo_5 = $suhi_popust['popust_nivo_5'];
    	
    	$popust_nivo_proc1 = $suhi_popust['popust_nivo_proc1'];
    	$popust_nivo_proc2 = $suhi_popust['popust_nivo_proc2'];
    	$popust_nivo_proc3 = $suhi_popust['popust_nivo_proc3'];
    	$popust_nivo_proc4 = $suhi_popust['popust_nivo_proc4'];
    	$popust_nivo_proc5 = $suhi_popust['popust_nivo_proc5'];
    	
    
    if ($popust_nivo_proc1 > 0) {	
    	$data .= '<div class="shopping_cart_box_discount_note"><div class="popust_shop_box_heading"><div>'. SUHI_TEXT_SHOP_BOX_DISC_NOTE .'</div><a class="popust_info" href="#" data-tooltip data-tooltip-label="'. TEXT_TOOLTIP_DISCOUNT_INFO_HEADER .'" data-tooltip-message="'. TEXT_TOOLTIP_DISCOUNT_INFO_MESSAGE .'"><img src="images/icons/info_icon_blue.png" alt="popust za vaš nakup" /></a></div>';
    
    if ($popust_nivo_proc1 > 0) {		
    	if ((($suhi_total_box > $popust_nivo_1) & ($suhi_total_box < $popust_nivo_2)) || (($suhi_total_box > $popust_nivo_1) & ($popust_nivo_2 == null))) {	
    	 	$data .= '<div class="'. $popust_class .'">'. $popust_nivo_proc1 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_1 .' € <span class="tvoj_popust">'. BOX_POPUSTI_VAS_POPUST .'</span></div>';
    	         } else {
    		$data .= '<div class="popust_off">'. $popust_nivo_proc1 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_1 .' €</div>'; 
    			 }
    }
    			 
    if ($popust_nivo_proc2 > 0) {		
    	if ((($suhi_total_box > $popust_nivo_2) & ($suhi_total_box < $popust_nivo_3)) || (($suhi_total_box > $popust_nivo_2) & ($popust_nivo_3 == null))) {
    	 	$data .= '<div class="'. $popust_class .'">'. $popust_nivo_proc2 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_2 .' € <span class="tvoj_popust">'. BOX_POPUSTI_VAS_POPUST .'</span></div>';
    	         } else {
    		$data .= '<div class="popust_off">'. $popust_nivo_proc2 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_2 .' €</div>'; 
    			 }
    }
    			 
    if ($popust_nivo_proc3 > 0) {	
    	if ((($suhi_total_box > $popust_nivo_3) & ($suhi_total_box < $popust_nivo_4)) || (($suhi_total_box > $popust_nivo_3) & ($popust_nivo_4 == null))) {
    	 	$data .= '<div class="'. $popust_class .'">'. $popust_nivo_proc3 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_3 .' € <span class="tvoj_popust">'. BOX_POPUSTI_VAS_POPUST .'</span></div>';
    	         } else {
    		$data .= '<div class="popust_off">'. $popust_nivo_proc3 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_3 .' €</div>'; 
    			 }
    }
    			 
    if ($popust_nivo_proc4 > 0) {
    	if ((($suhi_total_box > $popust_nivo_4) & ($suhi_total_box < $popust_nivo_5)) || (($suhi_total_box > $popust_nivo_4) & ($popust_nivo_5 == null))) {
    	 	$data .= '<div class="'. $popust_class .'">'. $popust_nivo_proc4 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_4 .' € <span class="tvoj_popust">'. BOX_POPUSTI_VAS_POPUST .'</span></div>';
    	         } else {
    		$data .= '<div class="popust_off">'. $popust_nivo_proc4 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_4 .' €</div>'; 
    			 }
    }
    			 
    if ($popust_nivo_proc5 > 0) {
    	if ($suhi_total_box > $popust_nivo_5) {
    	 	$data .= '<div class="'. $popust_class .'">'. $popust_nivo_proc5 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_5 .' € <span class="tvoj_popust">'. BOX_POPUSTI_VAS_POPUST .'</span></div>';
    	         } else {
    		$data .= '<div class="popust_off">'. $popust_nivo_proc5 .'% '. POPUSTI_BOX_NAD .' '. $popust_nivo_5 .' €</div>'; 
    			 }
    }
    			 
        $data .= '</div>';
    }	
    
    		
    /* end suhi */
    

    catalog/includes/languages/english.php

     

    add atthe end, before last    ?>

    /* ********************************* */
    
    define('POPUSTI_BOX_NAD','over');
    define('BOX_POPUSTI_VAS_POPUST','Your Discount');
    define('SUHI_TEXT_SHOP_BOX_DISC_NOTE','YOUR DISCOUNT');
    define('TEXT_TOOLTIP_DISCOUNT_INFO_MESSAGE','Take advantage of our Discount Ladder. You get more discount by spending more !');
    define('TEXT_TOOLTIP_DISCOUNT_INFO_HEADER','DISCOUNT Info');
    
    /* ********************************* */
    

    add to your stylesheet:

    /* discounts */
    /* shopping cart box */
    .popust_levl_met {
    color:#DB2523;
    font-weight:700;
    background:#FEE9C5 url(../../images/icons/ok_icon_green_small.png) no-repeat left;
    padding:2px 0 2px 30px;
    }
    
    div.shopping_cart_box_discount_note {
    margin-bottom:20px;
    border-bottom:1px solid #d8d8d8;
    padding-bottom:5px;
    }
    
    
    
    .popust_off {
    padding-left:30px;
    }
    
    
    .popust_shop_box_heading {
    background-color:#9E0000;
    font-weight:700;
    padding:8px 0 8px 8px;
    color:#ffffff;
    border:4px solid #870000;
    margin-bottom:10px;
    }
    
    .popust_shop_box_heading div {
    width:175px;
    float:left;
    }
    
    .popust_shop_box_heading img{
    height:22px;
    }
    
    .tvoj_popust {
    color:#212121;
    font-weight:normal;
    text-align:right;
    font-size:12px;
    margin-left:10px;
    background-color:#FFCC6F;
    padding:5px 4px 3px 4px;
    }
    
    /* tooltips */
    a.popust_info {
      color: #5EC7F6;
      clear:both;
    }
    
    
    [data-tooltip] {
      position: relative;
    }
    
    [data-tooltip]:before,
    [data-tooltip]:after {
      display: none;
      position: absolute;
      top: 0;
    }
    
    [data-tooltip]:before {
      border-bottom: .6em solid #09f;
      border-bottom: .6em solid rgba(0,153,255,0.8);
      border-left: 7px solid transparent;
      border-right: 7px solid transparent;
      content: "";
      left: -20px;
      margin-top: 1em;
    }
    
    [data-tooltip]:after {
      background-color: #0099ff;
      background-color: rgba(0,153,255,0.8);
      border: 4px solid #0099ff;
      border: 4px solid rgba(0,153,255,0.8);
      border-radius: 7px;
      color: #ffffff;
      content: attr(data-tooltip-label) ":\A" attr(data-tooltip-message);
      left: -150px;
      margin-top: 1.5em;
      padding: 5px 15px;
      white-space: pre-wrap;
      width: 160px;
      font-weight:700;
    }
    
    [data-tooltip]:hover:after,
    [data-tooltip]:hover:before {
      display: block;
    }
    
    

    There are also 2 new images:

    images/icons/ok_icon_green_small.png  // 23x20 px (3px transparent on left to add some space on the left, )

    images/icons/info_icon_blue.png  // defined in css to 22px height

     

    And that's it. Change CSS and these 2 images to fit your look & feel ...

     

    I'm almost sure I didn't forget anything :-

     

    Have fun and cheers from Ljubljana,

    Gregor

    post-150417-0-95200700-1434107946.png

    post-150417-0-58068000-1434108378.png


  5. One more thought.

     

    I tested this on a server where I have my old shop using Skrill running for ages, but still on different domain ! The server IP is the same as the domains are in the same hosting bundle.

    I don't kow if you can just re-enter Skrill data on cross domain with different server IP, without any Skrill precheck, or can you ? This would mean you just need to get pre-approved for 1st shop and than you can sell baby gorillas  ?! Or the new URL's are automaticaly checked somehwere in the process ?


  6. OK, here its a partial solution that apparently works as I've made a successfull payment :) !

     

    Tested on clean 2.3.4 install and also on my new heavy modified 2.3.4.

     

    I already have my Skrill Merchant account up and running. Meaning I already have a secret word and Merchant tools activated in my Skrill Settings !

    And still, my Skrill registered email could not be verifyed, returning that this email does not exist as moneybookers user ??

    And as such the module could not be activated ... to enter the data manualy ...

     

    After some searching and debugging,  I found out the following:

     

    - admin/ext/modules/payment/moneybookers/activation.php

     

    find line 74 to 78:

    <?php
      if ($action == 'verifyEmail') {
        if (isset($result)) {
          if ($pass == true) {
    ?>

     

    - Change $pass == true to $pass == false

     

     

    This skipps the email check and gives an option to activate the module. After this, you you can enter your own details; email, Skrill customer ID, secret word in Configuration !

    I tested it with success and made a successfull payment using eWallet method.

     

     

    I get arround troubleshooting well, but I still lack in my coding skills to tell exactly what is wrong.

    Looking at the code (activation.php)  seems to me that the email verify proceedure requires; email & customer_ID & password which is done at "https://www.moneybookers.com/app/email_check.pl".

     

    There are no fields in the email verfy stage to enter these data ...

     

    # Also "I'm a new Skrill user and would like to make an account" link returns 404 at Skrill on the verify email stage

     

    # A checkout account activation email is suppose to be sent to "ecommerce at moneybookers.com" with Merchant name, Skrill e-mail addres, Skrill customer_id, Store url, language.

     

    - Some of these data could only be passed after you enter them in configuration if not asked for them before ?!

     

    For NEW Skrill users I would suggest to make a new account request directly on Skrill site and aftter they are confirmed and Merchant tools are available in your Skrill settings panel ... create a scret word and copy all the data in settings ...

     

     

     

    #Questions:

    - What is the reason for this email verification anyway ? If you have an account already, you should know it and by such have all required information by hand and if you don't have one, you should make one (working link should be there) and wait for Skrill confirmation (url precheck) and missing information (secret word, skrill id, etc)

    - Did Skrill change some kind of their automated checking process ?

    - Is it a failed attempt to make new user registration a simpler process and by this passing some account refferal_ID, which would be by the way great thinking of course ... ?

    - You can also see that there is already predefined "cust_id" md5 hash password and md5 hash secret word in the code ... What is the prose of this if you cant pass these arguments before you have access to configuration area ?

     

     

    ###

     - Did I miss some original settings to have these troubes with original module ?

    - Is it working for others as I only found a post or two about this ?

    - Can some more experienced coder take a look in this :D ? I suppose I isolated the problem and now we just need some real action here :D , for original modul to work from scratch ..

     

     

    Any help and response appriciated.

     

    Cheers from Slovenia,

    Gregor


  7. I'm also having problems activating core MB module, even that I already have a working Skrill account.

     

    I tested this on a clean v2.3.4 install with original osc MB odule and no success ... Does anyone have a working solution for this  ?

     

    Is this module working for anybody out of the box ?

     

    Thanks for any pointers ...

     

    Gregor


  8. .com' timestamp='1394520415' post='1693665]

    Hi All,

     

    I am using ULTIMATE Seo Urls 5 in one of my website with German language.

     

    I have a problem with the url that is having the German mutated vowels: ö ä ü.

     

    Currently all this german vowels are removed from the links. I want to make it visibal in the url.

    So can anyone guide me how to do this?

     

    Thanks in advance.

     

    Regards

    Tejas

     

    Hi,

     

    Did you already try :

    -Enter special characters conversion function in addon configuration ? Set it in admin panel or via file. Should be quite straight forward.

     

    Regards,

    Gregor


  9. Hi,

     

    I use server with PHP5.2.17 ..... with mySQL5.1.40

     

    When I select other Customer Group than retal (id=0), there are no prices at all and the db gets price 0,00 for all products ... Have tried also suggestion from post 56, no success ...get an OR error ...

     

    What did I miss ? Thanks for pointing me in right direction ..


  10. I have a vry strage problem, everything installed fine and working, but the problem that annoys me is that the coupons.php page and other from this contribution is showing outside the borders, this is 2.6 on osc 2.3.1 running sparx's admin.. below is a scrrenshot

     

    problem.png

     

     

    Hi,

     

    it must be a conflict with "sparx's admin" as it's all showing OK with the usual admin. Check some hard coded height/width in coupons.php and other related files and also check css if there is any table dimmensions conflict, etc ...


  11. I think it's a nice add on, but I'm a bit scared about the installation and that I fail, because of my minimal SQL/php knowledges...

    the installation seems not to be so simple..I don't wanna risk the my osc installation, as it runs that smooth actually..

    and finally, I see here here too many problems and too less aswers...

     

     

    Actualy the contribution is working perfect with the exception of function for discount at shipping where tax is not calculated ok. But this option was added to coupons later as I could figure out. I just disabled the Shipping from drop down menu until some fix arrives. Without this option the contribution is still very useful and working great. You just have to be careful with the configuration options.

    Follow the instructions carefuly and if you have other contributions installed, do not copy any files except new ones. Make changes manualy and be careful with line numbers as they may vary. The contrubutions are mostly using new install line numbers. If you are less skilled you can try some compare sw like WinMerge for file comparing.

    Try it and have fun ! ;)


  12. As wvlenthe already pointed in;

     

    When using Shipping discount, TAX is not calculated ok !

    Seems like the amount of shipping discount is not subtracted from the order total for the TAX calculation. But only when using Shipping discount.

    I run out of ideas ... :(

    Please someone have a look at this and post some reply.

     

    TNX a lot !!!

     

     

    As for the issue that TAX is not added to the discounted shipping amount:

     

    You can add the tax directly in the code;

     

    find in:

    includes/classes/discount_coupon.php

     

    arround line 400 after //bugfix by xinxi

     

    $this->applied_discount['shipping'] =  ($info['shipping_cost'] * $this->coupon['coupons_discount_amount']);
    

     

    and replace with

     

    $this->applied_discount['shipping'] =( ($info['shipping_cost'] * $this->coupon['coupons_discount_amount'])+(($info['shipping_cost'] * $this->coupon['coupons_discount_amount'])*0.2)  );
    

     

    where 0.2 is 20% VAT ... and just change it to fit your VAT ...

     

     

    Gregor


  13. Hi,

     

    There is also one more setting which depends on the currency that your payment card processor make the paymnets. Usualy what you wanted when signing up to Chronopay. In my case it was EUR. You should also find 'USD' twice in includes/modules/payments/chronopay and set it to EUR if your transactions will be made in EUR of course.

     

    If you don't do this, the module only works if you have USD also enabled as currency BUT NOTE, it also grabs price in USD and not EUR !!!

     

     

    I have modify the module to have a cool HTML emails for order confirmations ... If there is any interest I can post it in contribution section or email it ...

     

    It works for me ;)

     

     

     

    Have fun


  14. Hi,

     

    You should set an unique sort order to it and will shoe up ;)

     

    regards,

    Gregor

     

     

    Hi, I have SPPC installed and I installed OT DCC (great contrib!), however, it all works great, except for the totals page, it doesn't show the discount line, but it calculates everything properly. Just missing the coupon code line showing the discount.. Anyone have a fix for this??

     

    I double checked that my code is correct in the order.php and checkout_confirmation.php, it all looks good.

    Any help would be greatly appreciated,

     

    Thanks,

    Angie


  15. I just uploaded a working and tested solution for orders.php considering the calculate_price as I noticed a lot was written on this subject and since orders.php changed the solution in contribution doesn't work for newer oscommerce installations such as 2.2rc2... or maybe even sooner, so check this out ....

     

    Works great !
    
    
    catalog/includes/classes/order.php file changed significantly since the module was released ..
    
    
    //kgt - discount coupons
    if( is_object( $this->coupon ) ) {
    $applied_discount = 0;
    $discount = $this->coupon->calculate_discount( $this->products[$index], $valid_products_count );
    if( $discount['applied_discount'] > 0 ) $valid_products_count++;
    $shown_price = $this->coupon->calculate_shown_price( $discount, $this->products[$index] );
    $this->info['subtotal'] += $shown_price['shown_price'];
    $shown_price = $shown_price['actual_shown_price'];
    } else {
    $shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);
    $this->info['subtotal'] += $shown_price;
    }
    /**************
    $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
    $this->info['subtotal'] += $shown_price;
    **************/
    //end kgt - discount coupons
    

     

     

    I have also noticed one bug, but overcome it with a trick that I just don't like ...

     

    If I enter a discount as a number it's considered as VAT included and the order totals looks OK.

     

    But, if I enter a 15% like 0.15 ... it will deduct only 12.5% ? Or is it deducting from NET amount only even that I have set VAT included in config .... I don't know, but its confusing ...

     

    I can overcome this by entering +20% (our VAT here) for example I set 0.18 in settings and 15% is deducted in my order total ...

     

    Did anyone else experience this ? Or did I miss something while installing ... ? All other seems to work just great thoe ... And even on top of SPPC :)

     

    Any comments will be great on this matter !

     

    Thx,

    suhy


  16. Hi,

     

    Anyone figured this out yet ? When I load the new html_outpout.php file my spacer.gif go 1px x 1px and also my backrgound gif is affected and my layout is completely messed ..

     

    Hope to solve this asap smile.gif

     

    Thanks !

     

    Hi again :)

     

    It seems I have found a solution to this ..... The following autothumbnailer doesnt have these issues with spacer.gif ....

     

    http://www.oscommerce.com/community/contributions,2872/

     

    It works for me :)


  17. Hi All,

     

    Would like to know that, how do i prevent Auto Thumbnailer from resizing the spacer.gif at the size of 1px x 1px ... because it messy the theme design that used spacer image.

     

    i have tried following,

     

    // Don't calculate if the image is set to a "%" width

    if (strstr($width,'%') == false || strstr($height,'%') == false || strstr($width,'1') == false) {

    $dont_calculate = 0;

    } else {

    $dont_calculate = 1;

    }

     

    and even

     

    // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)

    if (!strstr($image, 'pixel') || (!strstr($image, 'spacer')) {

    $dont_calculate = 0;

    } else {

    $dont_calculate = 1;

    }

     

     

     

     

     

    Hi,

     

    Anyone figured this out yet ? When I load the new html_outpout.php file my spacer.gif go 1px x 1px and also my backrgound gif is affected and my layout is completely messed ..

     

    Hope to solve this asap :)

     

    Thanks !

     

     

    Hi again :))

     

    It seems I have found a solution to this ..... The following autothumbnailer doesnt have these issues with spacer.gif ....

     

    http://www.oscommerce.com/community/contributions,2872/

     

    It works for me :))

     

    Try it !

×