url rewriting bug or problem

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Richard47
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Nov 04, 2010 1:15 pm

url rewriting bug or problem

Post by Richard47 » Sun Apr 17, 2011 8:36 am

We are using 7.07 build 1448. We are trying to move are current store to able commerce software. The problem we are having is our present url example www.mystore.com/Products/someproduct.aspx. When inserting Products/someproduct.aspx into able custom url section. and viewing it everything works great unless you have an additional image. then you get this error Sorry
We cannot find the page you are looking for. We apologize for the inconvenience.

Now if you change the custom url to someproduct.aspx the additonal images will show.

Is this a bug, if so what is the fix.

Thanks in advance
Richard

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: url rewriting bug or problem

Post by mazhar » Mon Apr 18, 2011 5:14 am

Well according to your custom URL you are providing Products subdirectory. Now AbleCommerce URL re writer can map Products, categories plus webpages on any given URL. But URL re writer doesn't map additional images page that's why application is trying to find that additional image page inside mystore.com/products/ path while its on the root of application. In order to fix this you need to make a small change and that is to tell application always load this page relative to root. Please go to product display page and then edit it from bottom. Then in content section edit Show Product 1 scriptlet and locate following lines of code in it

Code: Select all

<a href="#" onclick="window.open('ProductImages.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">
More Images
</a>


In this code you need to place a / in front of ProductImages.aspx?ProductId=$Product.ProductId so that it should look like /ProductImages.aspx?ProductId=$Product.ProductId

Your final output should be like this

Code: Select all

<a href="#" onclick="window.open('/ProductImages.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">
More Images
</a>
After saying the scriptlet and then try opening some product having additional images and then click on more images link. It should be working now.

Richard47
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Nov 04, 2010 1:15 pm

Re: url rewriting bug or problem

Post by Richard47 » Mon Apr 18, 2011 11:45 am

Mazhar,
Thanks for the fix it worked perfectly.

Richard

Post Reply