Hi, am trying to add an Add to Cart button to both a Global product list and a site product list. Even though I have Add to Cart ticked in the cms on the Presentation Settings in the Product List Settings section of every site, the lists still show Buy Now.
I notice that in Version 2.5 the changelog shows "Remove add to cart button when in product listing mode and no custom link set".
I almost have global product list working by using the following code in the marketpress-ms.php but the form can't find the post_id value. The Add to Cart button should show when Users are looking at the Global Product List widget on my home page. However, using post_id adds random pages to the cart instead.
$content .= '<form class="mp_buy_form" method="post" action="' . mp_cart_link(false,true) . '">';
$content .= '<input type="hidden" name="product_id" value=" ' . post_id .'" />';
$content .= '<input type="hidden" name="variation" value="0" />';
$content .= '<span class="mp_quantity"><label>' . __('Quantity:', 'mp') . ' <input class="mp_quantity_field" type="text" size="1" name="quantity" value="1" /></label></span> ';
$content .= '<input type="hidden" name="action" value="mp-update-cart" />';
$content .= '<input class="mp_button_addcart" type="submit" name="addcart" value="' . __('Add To Cart »', 'mp') . '" />';
$content .= '</form>';
Can you point me in the right direction with regards to the correct php code to get Add to Cart showing on both Global and Site Product lists? My knowledge of php is pretty basic. (Loops are things I use to tie up my hair).