Cannot modify header.....


  • Default avatar
    michael01    
     10 years ago
    0

    Using a shipping coupon with HikaShop during checkout after i pay i get the following error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/93/11223693/html/plugins/hikashop/awocoupon/awocoupon.php:144) in /home/content/93/11223693/html/plugins/system/popup_anywhere/popup_anywhere.php on line 118

    When i use a 100% free coupon to purchase i do not get an error at all.

    http://vaporandco.com
  • Default avatar
    michael01    
     10 years ago
    0

    Need some help here please..
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    The code in the plugin at the line you specify is there to keep the coupon field open even after entering a coupon code. Not really sure why it is not working, but it is not a requirement. You can comment out or delete this section of code:

    <?php
        
    function onHikashopBeforeDisplayView(&$view){ if(@$view->ctrl=='checkout'ob_start(); }
        function 
    onHikashopAfterDisplayView(&$view){
            if(@
    $view->ctrl=='checkout'){
                
    $html ob_get_clean();
                if(
    strpos($html,'hikashop_checkout_coupon_input')===false) {
                    
    $html str_replace(
                        
    '<span class="hikashop_checkout_coupon" id="hikashop_checkout_coupon">',
                        
    '<span class="hikashop_checkout_coupon" id="hikashop_checkout_coupon">
                            '
    .JText::_('HIKASHOP_ENTER_COUPON').' <input id="hikashop_checkout_coupon_input" type="text" name="coupon" value="" />
                            <input type="submit" class="button hikashop_cart_input_button" name="refresh" value="'
    .JText::_('ADD').'" onclick="return hikashopCheckCoupon(\'hikashop_checkout_coupon_input\');"/>
    '
    ,
                        
    $html
                    
    );
                            
    //'.$view->cart->displayButton(JText::_('ADD'),'refresh',$view->params,hikashop_completeLink('checkout'),'','onclick="return hikashopCheckCoupon(\'hikashop_checkout_coupon_input\');"').'
    ',
                
                }
                echo $html;
            }
        }
    ?>
  • Default avatar
    michael01    
     10 years ago
    0

    Now i get a warning when i use a coupon, i had ordered something with a shipping coupon.

    Warning: Cannot modify header information-headers already send by (output started at /home/content/11223693/hikashop/awcoupon/awcoupon/home/content/93/html/plugins/system/popup_anywhere.php on line 118

  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Did you remove the functions mentioned in the post above?
  • Default avatar
    michael01    
     10 years ago
    0

    I thought i did, i will verify.
  • Your avatar
    seyi    
     10 years ago
    0

    Did you miss some of the error displayed? I see an opening bracket starting at (output..., but dont see the closing bracket.

    Also please send an email with the file awocoupon.php to the email on the contact us page.
  • Default avatar
    michael01    
     10 years ago
    0

    I did and if you notice the first error is gone but there were two errors and the second one is still there.
  • Default avatar
    michael01    
     10 years ago
    0

    I may have. I just sent the email.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Just took a look and those functions are still there. I have emailed you an updated version that should get rid of the problem.