Support » Plugin: Skroutz.gr & Bestprice.gr XML Feed for Woocommerce » need to make the plugin take manufactures from products TAGS

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter johnnyxp64

    (@johnnyxp64)

    ok i dound it and did it my self so i am posting here the solution for others aswell

    edit the ” woo-xml-feed-skroutz-bestprice/createsk.php”

    locate the following 2 queries, replace the wp_manufacturer in the “like” part and the “brands” with ‘product_tag’ like i have below, that way i am forcing the generation to read the product TAGS, no need for custom elements, no need for brands plugin. tags work faster and you keep the site cleaner from plugins. now it would be nice if you make an update soon with a settings and inlcude that tag solution as long as the others, so that i am not forced to use a “custom edited” plugin from now on 😉

    plus nice coding, even thought you have zero comments to help out others, its was easy to understand and modify as i wish after locating the properf file and section.

    $manufacturer = $wpdb->prepare(  "SELECT * FROM " . $wpdb->prefix . "term_relationships as tr, " . $wpdb->prefix . "term_taxonomy as tt , " . $wpdb->prefix . "terms as t WHERE tr.object_id = " . $tempid . " and tt.term_taxonomy_id= tr.term_taxonomy_id and tt.term_id=t.term_id and tt.taxonomy like 'product_tag'  ;",0);
            $man = $wpdb->get_results($manufacturer);
        }
    
    	if(count($man) == 0)
        {
    	$manufacturer = $wpdb->prepare(  "SELECT * FROM " . $wpdb->prefix . "term_relationships as tr, " . $wpdb->prefix . "term_taxonomy as tt , " . $wpdb->prefix . "terms as t WHERE tr.object_id = " . $tempid . " and tt.term_taxonomy_id= tr.term_taxonomy_id and tt.term_id=t.term_id and tt.taxonomy like 'product_tag'  ;",0);
    	$man = $wpdb->get_results($manufacturer);
    	}
    Plugin Author mpbm23

    (@mpbm23)

    Using tags for manufacturers does not make much sense since only one manufacturer must be added to the feed, unlike tags that can be many of them.
    The code is pretty straight forward, so no much need for comments, taking in mind that it only took you 4 hours between questions.

    Thread Starter johnnyxp64

    (@johnnyxp64)

    well i guss you missundertood my part about comment. it was supposed to be a compliment not a critisim!

    as about the tags, thats how the shop manager was using it, one tag per product, he doesnt use the tags like the “wordpress intended to” and thats why i was asking for a mapping feature if its in your plans.

    you also mentioned the brands plugin. there are many out there, can you please provide with a url which exactly brands plugin is your plugin suporting 100%?

    thank you

    Thread Starter johnnyxp64

    (@johnnyxp64)

    p.s actually it took me 15mins to find where i need to do the changes not 4 hours. i just thought when i saw that all is working i should update and close the topic.

    Plugin Author mpbm23

    (@mpbm23)

    I was sure it took less than 4 hours, I just quessed it was fast. I did not took it as a critisism.
    I believe any brand plugin would work because they all use “brand” as a taxonomy name.
    I am 99% sure that I have tested it with this brands plugin

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘need to make the plugin take manufactures from products TAGS’ is closed to new replies.