Jump to content

CMS page ID problem in DB table 'ps_page'


imen sepahan

Recommended Posts

I've want to add my cms page counter to every CMS page. I followed this topic . every thing is OK for implementaion of that tutorial but I've had a problem:

 

my query is:

SELECT pv.counter AS total 
    FROM ps_page_viewed pv
    LEFT JOIN ps_page p ON pv.id_page = p.id_page
    LEFT JOIN ps_page_type pt ON p.id_page_type = pt.id_page_type
    WHERE pt.name = 'cms' AND p.id_object = '194'
 
 
in query we need join PS_PAGE_VIEWED and PS_PAGE tables.
for every CMS page that I created in PS_PAGE table , the id_page set to 17(for every page!!- i have about 200 pages)
and also in PS_PAGE_VIEWED for all cms page the Id_page is set to 17 ,too.
 
also, if i create a new cms page, then in the both table , id_page automatically set 17.[in the PS_PAGE when i add a new product ,  the related page id will be add to table by new id and every thing about product is OK but for CMS page all page ID set to 17] 
 
 
e.g:
 
new cms page :       cmd_id=194          id in PS_Page: 17       ID in PS_Page_viewed: 17
new cms page :       cmd_id=195          id in PS_Page: 17       ID in PS_Page_viewed: 17
new cms page :       cmd_id=196          id in PS_Page: 17       ID in PS_Page_viewed: 17
 
my prestashop is 1.6.0.14 
what should I do???
please help me
thanks
 
 
 
 
 

post-1143971-0-89234600-1506327951_thumb.jpg

post-1143971-0-83369000-1506327957_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...