Jump to content

See How many time a product us viewed


Recommended Posts

Hello All

Made a little mod for the admin/inventory.php file

When you view your inventory it will add a column that will show you how many times that product was viewed, The popularity. You can event sort it by it Popularity :)

Here it is:

*Remeber Back up files before changing them*

Open Your admin/inventory.php file

Find This around the 220's line:

<option value=\"price\" ";if($order==price){echo "selected";}echo">$la_normal_price_p</option>



Put Under it on next line This:


<option value=\"popularity\" ";if($order==popularity){echo "selected";}echo">$la_style_pop</option>



-----------------------------------------------------





Find This around the 320's line:


<td align=\"center\" height=\"20\" background=\"../images/bevel_bg.gif\" nowrap><b>$la_sale_price</b></td>



Put Under it on next line This:


<td align=\"center\" height=\"20\" background=\"../images/bevel_bg.gif\" nowrap><b>$la_times_viewed</b></td>



-----------------------------------------------------



Find This around the 340's line:


$sale_price = ($row["sale_price"]);



Put Under it on next line This:


$popular = $row["popularity"];



-----------------------------------------------------



Find This Around the 380's line:


print("<font color=\"#990000\">$sale_price</font></td>");}



Put Under it on next line This:


print("<td align='center'>$popular</td>");



save & close



Then open Your english.inc or what ever lang file you use

You need to give value to the word $la_times_viewed



Find were your inventory.php words are and put this in that section


$la_times_viewed = "Times Viewed";

You can change the word "Times Viewed" To what ever you want at the of that coloum to say.



save & close





Open your admin/view_product.php



Find This Around the 50's line:


$description = $row["description"];



Put Under it on next line This:


$popular = $row["popularity"];



-----------------------------------------------------



Find This Around the 70's line:


<tr bgcolor=\"$colour_3\">

    <td width=\"200\" valign=\"top\"><b>$la_description</b></td>

    <td width=\"400\" valign=\"top\">$description</td>

  </tr>



Put Under it on next line This:


<tr bgcolor=\"$colour_3\">

    <td width=\"200\" valign=\"top\"><b>$la_style_pop</b></td>

    <td width=\"400\" valign=\"top\">$popular</td>

  </tr>

save and close

Upload admin/inventory.php, admin/view_product.php, and what ever lang file you edited

Then check It Out and try sorting by Popularity and click view on any item:w00t:

Hope Someone can use this!! :dizzy:

Any problems just let me know

More MODS To come

Best Regards,

Bill AKA wildbill

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...