Change the product page for URL Rewriting

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
taofeng
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Tue Aug 11, 2009 7:14 am

Change the product page for URL Rewriting

Post by taofeng » Mon Sep 28, 2009 3:57 pm

Anyone can tell me which page is actually in use for the product page? Since it's using url re-writing(alias), so the url is showing something like: .../All-In-One-Printer.aspx. I need to know the actual page name, and also want to change the page to show the product. Any help will be much appreciated!

tao

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Change the product page for URL Rewriting

Post by afm » Mon Sep 28, 2009 10:39 pm

It depends :)

Here's how you track it down:

1. Go to the admin page for the product and note the Display Page (e.g. Basic Product, Basic Product 2, etc). These correspond to the aspx page that is used to display the product.

2. Now go to the root directory of your site and open up Product.aspx in a text editor (like notepad). Find the <Name> element near the top. By default it is Basic Product. So this is the actual page that is used to display the product when Display Page = Basic Product. Product2.aspx is normally "Basic Page 2", etc.

3. Now scroll down to the bottom and find <cb:ScriptletPart>. This is the control that pulls in the various parts of the page: header, content, right side, etc. They are assembled according to the Layout. The name of each part refers to a ScriptLet. For example, the default content ScriptLet in Product.aspx is "Show Product 1".

4. There are 2 places to look for scriptlets: in the Scriptlets directory inside of your App_Themes folder, or in the App_Data\Scriptlets directory. If you don't have a Scriptlets directory inside of your theme, then AC will look in the App_Data directory. Within App_Data\Scriptlets there are 2 subdirectories: Custom and Default. AC will look in Custom first, then Default. Within Custom or Default are 5 subdirectories corresponding to the 5 parts you found in #3 above. For example, you will find the "Show Product 1" scriptlet in the Contents subdirectory. Note that scriptlets have an .htm extension and use the NVelocity tag language.

5. Finally open "Show Product 1.htm" and note the tags that look like [[ConLib:ProductImage]]. These point to User Controls (.ascx files) in the /ConLib directory of your website.

The default pages/scriptlets/conlibs already show the product image.

But if you want to move it, I recommend editing the scriptlet. You can do that via the AC admin or manually.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

taofeng
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Tue Aug 11, 2009 7:14 am

Re: Change the product page for URL Rewriting

Post by taofeng » Tue Sep 29, 2009 4:49 pm

Thanks a lot for your detailed reply! I can move on now.
One more question: Is this possible to specify my own Product page? Right now I can only select predefined Product pages. The problem is: my layout is quite different, so I have to modify the Product.aspx to specify my custom left side and right side bar, which means I have to modify the default product page. This is what I am trying to avoid. If I can select my own product page, then I can leave the original default product page untouched.

Thanks again!

Tao

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Change the product page for URL Rewriting

Post by afm » Tue Sep 29, 2009 6:19 pm

Sure. Make a copy of Product.aspx...for example Tao.aspx. Now open the file in a text editor and change the <Name> element. For example "<Name>Tao Product</Name>". Finally, edit the product in the admin and note that "Tao Product" now shows up as one of the available display pages. Just select that as the display page and the product will use your custom product page.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

taofeng
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Tue Aug 11, 2009 7:14 am

Re: Change the product page for URL Rewriting

Post by taofeng » Tue Sep 29, 2009 6:29 pm

Cool! Now I know what those commented script for.
What if I want to move this custom page into a sun folder, will the system pick up? (I put all my custom page in a sunfolder, so it looks clean and not messed up with original pages.)

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Change the product page for URL Rewriting

Post by afm » Tue Sep 29, 2009 11:24 pm

taofeng wrote:What if I want to move this custom page into a sun folder, will the system pick up?
I don't know...try it and let us know :)
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

taofeng
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Tue Aug 11, 2009 7:14 am

Re: Change the product page for URL Rewriting

Post by taofeng » Wed Sep 30, 2009 6:30 am

I thought you know everything. :-)
I have tried, unfortunately it didn't pick up any page from subfolders.

Thanks Andy for all your help!

tao

Post Reply