Skip to main content

With this action it’s possible to insert in the grid-view own content after the output of buttons.

add_action('at_product_grid_after_buttons', 'at_add_review_button');
function at_add_review_button() {
	$product_shops = get_field('product_shops', $post->ID);
	if($product_shops[0]['portal'] == 'amazon') {
		$asin = $product_shops[0]['amazon_asin'];
		$amazon_country = get_option('amazon_country');
		$amazon_tag = get_option('amazon_partner_id');
		echo '<a class="btn btn-default btn-block" style="margin-top: 10px;" href="' . $amazon_country . '/product-reviews/' . $asin . '/?tag=' . $amazon_tag . '" target="_blank" rel="nofollow">Customer Reviews</a>';

In this example a button is linked to the customer reviews of Amazon, provided the product has an ASIN and is categorized in the Amazon portal.

Was this article helpful?

1 Star2 Stars3 Stars4 Stars5 Stars
(No Ratings Yet)

Keine Kommentare vorhanden

You have a question or an opinion about this post? Share it with us!

Your email address will not be published. Required fields are marked *