Link magento log_url_info table to products -


i want create report on items viewed within store. have relevant report writing , sql skills, little confused data within log_url_info table.

i understand entries value in url field such 'http://www.mystore.com/catalog/product/view/id/526' demonstrate visit product id 526, cannot see simple way link data individual product record in relevant product tables, given additional data stored in table.

anyone ideas??

pull id out of url, load appropriate product.

if (preg_match('%/catalog/product/view/id/([0-9]+)%', $url, $match)) {     $id = $match[1];     $product = mage::getmodel('catalog/product')->load($id);     echo $product->getname(), ', ', $product->getsku(), php_eol; } 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -