• Resolved amandarmnd

    (@amandarmnd)


    Is it possible to use the “submit review” shortcode with the “product name” having a value of whatever product page you happen to be on? I know the UPCP product page can have a tab with customer reviews. However, I would like a tab with just the option of leaving a review so users don’t have to scroll past reviews to get to the option to leave a review.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Amanda,

    The only way for you to do that would be to modify the plugin output in the Shortcodes.php file in the Functions folder, which we don’t recommend doing unless you’re comfortable. It uses PHP to pull the product name data, which is why you can’t just throw it into the shortcode anywhere. You’d have to place the following line in the area of the plugin code that you want the submit review form to show:

    echo do_shortcode("[submit-review product_name='" . $Product->Item_Name . "']");
    
    Thread Starter amandarmnd

    (@amandarmnd)

    Hello. Thanks!

    I have very little understanding of PHP. Are you saying this goes in the Shortcodes.php file of the Product Catalog or Product Review plugin? Are there two modifications? One in the Shortcodes.php file of the Review plugin and one where I want the submit review form to show (ie, a custom tab added to the product page). I apologize if this is more customization than you can help with through this means of communication. However, I’ll probably find someone with PHP experience to help.

    Thanks for you help!

    Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Amanda,

    The Shortcodes.php file we mentioned is in the Functions folder of the Product Catalog plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Product Name Shortcode’ is closed to new replies.