Conflict AWO Coupon and RO CSVI Google Merchant Export


  • Default avatar
    gerard    
     a year ago
    0

    Dear AwoCoupon team,

    I am currently setting up a feed export for Google Merchant using the RO CSVI extension for Joomla/Virtuemart.

    I am in contact with the team from RO CSVI to be able to use the Virtuemart function "Shipping by weight" in the feed to include the shipping costs in the feed. The VirtueMartCart class must be loaded for this, which then leads to a conflict or an error 500 if AwoCoupon is used at the same joomla installation.

    Rolandd from RO CSVI wrote to this:
    "There are a few things going on here. First the 500 error is caused by a conflict between AwoCoupon and RO CSVI. Both our extensions want to load the VirtueMartCart class and RO CSVI needs to load a modified version. This is causing the issue that the cart already exists because AwoCoupon is loading it as a system plugin. There is no option in AwoCoupon to exclude RO CSVI, that might be a feature request for them that users can exclude which extensions in the backend AwoCoupon should not load. For now I have seen in the code it is only com_installer that is excluded."

    I'm not a programmer and I hope the info is enough.Since we would like to use both extensions, my question would be whether such an exclude could be set up with AwoCoupon?

    At the Moment i am testing this feed with deactivated AwoCoupon on a test installation of the shop, but AwoCoupon is a must have for me :-).

    If you need any further information please just let me know.

    I would be very happy about help.

    Greetings
    Björn
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    What is the component name of RO CSVI?  For example, AwoCoupon's component name is com_awocoupon.
  • Default avatar
    gerard    
     a year ago
    0

    Hello Seyi,

    thanks for your quick reply! The name of the component is com_csvi

    I hope this information helps.

    best regards
    Björn
  • Your avatar
    seyi    
     a year ago
    0

    Ok, before I give any code can you activate AwoCoupon component and all its plugins.  Then deactivate the plugin:
    -  System - AwoCoupon

    Then test out RO CSVI.  Does it work fine in this case?
  • Default avatar
    gerard    
     a year ago
    0

    Hello Seyi,

    exact this is the case. When the plugin "System - AwoCoupon" is activated the Error 500 appears in RO CSVI when running the feed. After deaktivating the plugin "System - AwoCoupon" RO CSVI works fine.

    best regards
    Björn
  • Your avatar
    seyi    
     a year ago
    0

    Ok, in the file:
    www/plugins/system/awocoupon/awocoupon.php, around line 18 is this:
    <?php
                
    if ( in_array$option, array( 'com_installer' ) ) ) {
    ?>

    Change it to this:
    <?php
                
    if ( in_array$option, array( 'com_installer''com_csvi' ) ) ) {
    ?>

    That should fix it.
  • Default avatar
    gerard    
     a year ago
    0

    Thanks a lot, this works! I guess i have to repeat this after a component-update of AwoCoupon?

    Greetings
    Björn
  • Your avatar
    seyi    
     a year ago
    0

    No, no need, it will be part of the next update.
  • Default avatar
    gerard    
     a year ago
    0

    Great, many thanks!
  • Default avatar
    gerard    
     a year ago
    0

    Hello seyi,

    I'll get back to you because of a problem in conjunction with CSVI. In the backend everything works wonderfully thanks to your code adaptation.

    However, there is also a feed export in the frontend. An error 500 appears here if the feed export is generated via a frontend link.If I deactivate the Awo Coupon System plugin, the feed generation works. My question would now be whether there is a similar solution to the one you showed before for the front end?

    I have attached the errors below.

    Thanks for any help

    best regards
    Björn

  • Your avatar
    seyi    
     a year ago
    0

    What is the link of the feed?
  • Default avatar
    gerard    
     a year ago
    0

    Hi seyi, the link to the feed on the test platform is here

    When i deaktivate Awo Coupon System Plugin, the feed is shown

    Thanks for you help!

    Greetings
    Björn
  • Your avatar
    seyi    
     a year ago
    0

    Ok, in the same file, comment out the admin section, change:

    <?php
            
    if ( AC()->is_request'admin' ) ) {
                $option JFactory::getApplication()->input->getCmd'option' );
                if ( in_array$option, [ 'com_installer''com_csvi' ] ) ) {
                    return;
                }
            }
    ?>

    To this
    <?php
            
    //if ( AC()->is_request( 'admin' ) ) {
                $option JFactory::getApplication()->input->getCmd'option' );
                if ( in_array$option, [ 'com_installer''com_csvi' ] ) ) {
                    return;
                }
            //}
    ?>

  • Default avatar
    gerard    
     a year ago
    0

    Fantastic, that works! Thank's a lot.

    Greetings
    Björn