MsVendor snippet for miniShop2

    Poking around with AJAX loading product data, I wrote a snippet to get manufacturer data by id.

    How it works:
    Specify id and get the manufacturer data in the form of an array or a string of the processed chunk.

    • vendor - vendor id (default 0)
    • tpl - output template, placeholders correspond to the fields in the table (by default tpl.msVendor)
    • returnData - if you specify 1, the snippet will return an array of data (0 by default)
    • returnOption - if you specify the name of a specific field that is needed, the snippet will return only its value (by default '')
    • includeContent - if 1 is specified, the snippet will check the value of the specified resource with the manufacturer’s description and, if there is one, add the pagetitle, introtext and content fields of the specified resource to the output values ​​(default 0)

    Packed everything in a transport package. The github is as a file and php snippet file.

    Also popular now: