• Resolved Antreas Georgiou

    (@antrosgeor)


    the bellow function is not working correctly, i have create one skroutz xml file when i checked the code the bellow function is not working (same with the ‘bestprice’)

     function woo_feed_availability_attribute_value_modify( $attribute_value, $product, $feed_config ) {
    if ( 'bestprice' === $feed_config['provider'] ) {
    if ( 'in stock' === $attribute_value ) {
     return 'Y';
    } 
          return 'N';
        }
    
        if ( 'skroutz' === $feed_config['provider'] ) {
            if ( 'in stock' === $attribute_value ) {
                $in_stock_string = __( 'Delivery 1 to 3 days', 'woo-feed' );
            } else {
                $in_stock_string = __( 'Delivery up to 30 days', 'woo-feed' );
            }
            return $in_stock_string;
        }
    
        if ( 'pricerunner' === $feed_config['provider'] ) {
            if ( 'in stock' === $attribute_value ) {
                return 'Yes';
            }
    
            return 'No';
        }
    
        if ( 'google' === $feed_config['provider'] || 'pinterest' === $feed_config['provider'] ) {
            if ( 'on backorder' === $attribute_value || 'on_backorder' === $attribute_value ) {
                return 'preorder';
            }
            if ( 'google' === $feed_config['provider'] ) {
                if ( ! in_array( $attribute_value, array( 'in_stock', 'out_of_stock', 'on_backorder' ) ) ) {
                    return 'in_stock';
                }
            } elseif ( ! in_array( $attribute_value, array( 'in stock', 'out of stock', 'on backorder' ) ) ) {
                return 'in stock';
            }
        }
    
        if ( 'facebook' === $feed_config['provider'] ) {
            if ( 'on backorder' === $attribute_value ) {
                return 'available for order';
            } elseif ( ! in_array( $attribute_value, array( 'in stock', 'out of stock', 'on backorder' ) ) ) {
                return 'in stock';
            }
        }
    
        return $attribute_value;
    }
    }

    the line ‘skroutz’ === $feed_config[‘provider’ and ‘bestprice’ === $feed_config[‘provider’] return false, but my file have tyme skroutz and the other bestprice.

    why?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    To modify the availability value for skroutz template you can try this filter?woo_feed_get_skroutz_availability_attribute?though we recommended using Dynamic Attribute.

    Thread Starter Antreas Georgiou

    (@antrosgeor)

    ok thanks.

    please where i can find the list with all filter like “woo_feed_get_skroutz_availability_attribute”?

    for example i will need to do the same for bestprice, google , ……..


    Plugin Support mansary

    (@mansary)

    Hi,

    We hope you’re having a great experience using CTX Feed. Since we haven’t received any further replies on this topic, we’ll be marking it as resolved for now.

    If you have any additional questions or need assistance, feel free to start a new conversation. We’re always here to help!

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘‘skroutz’ === $feed_config[‘provider’] is not return True’ is closed to new replies.