Jump to content

Assign default category manually on database


Recommended Posts

I'm using a script to insert in database categories, products and these things.

The problem I'm facing is that products are not shown inside their category. Let me explain:

 

In ps_product I put the parent category id in id_category_default field. However, when the product appears on my frontpage, the url is /root/7-xxxxx instead of /mycategory/7-xxxxx

 

If I open the product in the backend and save it (without changing anything), then the product's url is the correct one.

 

I haven't found what registry prestashop updates in that process to know where to locate that product.

In ps_product_category I insert all the ids from the lowest category to the top level one for that product.

 

Any idea?

 

 

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...