How to override template generator for standard doctype

Hi !
I wish to customize products page in shopping cart.
Is there a way to override template generators for standard doctype say items ?


This can be solved using revant’s approach link
One can override autoname method of Item doctype with a custom website dict
Post can be closed. thanks!

I am still unable to figure out how can I replace the item generator. I have created a module as below:

from erpnext.stock.doctype.item.item import Item
def get_website_generator(): = frappe._dict(

Now my problem is that how do I link it with hooks of my custom_app.
Any help on this.