WCMp bundle is available at a slashed price

Grab It Now

Dinamic content in product page (Elementor)

Dinamic content in product page (Elementor)2019-04-13T00:43:40-05:00

Home Support Forum WCMp Core Dinamic content in product page (Elementor)

WCMp Core

Dinamic content in product page (Elementor) Resolved

  • Author
    Posts
  • isaac
    Participant
    Post count: 7

    Hi,

    We are designing for a client the single product page with elementor and we want to show the vendor profile image, but we don’t know to make that dynamic request. We managed to show the vendors name with the shortcode widget, but with the image it only returns the image ID and not the image itself (see img below for additional info). There’s a way we can do this?

    Thanks in advance!

    Attachments:
  • CrazyPluginAuthor Khokan
    Keymaster
    Post count: 180

    Hi @isaac, Yes it is possible, on your shortcode, first of all, you have to fetch product’s vendor, after that you can fetch your info as follows-

    global $product;
    if( $product ){
    $vendor = get_wcmp_product_vendors( $product->get_id() );
    if( $vendor ){
    $vendor_img_src = $vendor->get_image(); // To get vendor store image
    $vendor_store_name = $vendor->page_title; // To get vendor store name
    }
    }
  • isaac
    Participant
    Post count: 7

    Hi Khokan!

    Sorry for the late reply, project was set aside for a couple of weeks. Thanks a lot for your help, we managed to make it work and with this info we learned how to solve further issues! Nice 🙂
    Another related question if you don’t mind, which is the best way to retrieve the vendor url using the same process? Our programmer had no problems with other variables but with this one he is having some trouble…

    Thanks!

  • CrazyPluginAuthor Khokan
    Keymaster
    Post count: 180

    @isaac, From vendor object you will get the store link by using $vendor->permalink

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 3022

    Hello,

    Hope this resolves your issue.

    We are closing this ticket. Kindly create a new thread if you need any further help.

The topic ‘Dinamic content in product page (Elementor)’ is closed to new replies.