I'm currently using a plugin in Wordpress to show shopping cart products from my BigCartel store into my Wordpress. Now the script is only showing 1 result and echos an image for the product and a text link.. These are grabbed through BigCartel's API.
However, it shows the latest product, which is not what I want. I'd like it to change everytime you refresh to a different product. I believe this is the code I'd need to edit (correct me if I'm wrong!):
function list_products($limit = 10){
$url = $this->productsapiurl . '?limit='. $limit;
$result = $this->pull_data($url);
$list = '<div style="width:100%; text-align:center;">';
foreach ($result as $item) {
$list .= '<a href="' . $this->producturl . $item->permalink . '" title="' . $item->name . '"><img src="' . $this->image_url($item->images->image[0]->url) . '" height="114" /><br />' . $item->name . '</a>';
}
$list .= '</div>';
return $list;
}Can anyone help??
Many thanks!
Ben
Help















