Author |
Topic |
|
skynet104
VP-CART New User
94 Posts |
Posted - November 06 2008 : 14:17:45
|
Hi: We have many items out of stock, so we hide them, however since google still is listing them, when referenced from google to our page it stills shows the item.
This suppost to be fixed by now, does support have any fix for this?
Please Advice |
|
Steve2507
VP-CART Expert
590 Posts |
Posted - November 07 2008 : 07:42:42
|
We have the same problem. We have to do a redirect of that page to the category page.
I've been trying to do a simple redirect in the shopexd file where it would redirect if hidden=false but can't get it to work.
Steve Sex toys from a UK sex shop |
Edited by - Steve2507 on November 07 2008 07:47:42 |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - November 07 2008 : 08:57:26
|
You can stop the hidden products from showing by adding a couple of lines of code to shopexd.asp (the brown highlighted code)
Find this sub:
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if Set rs=dbc.execute(sql) If rs.eof then Serror = SError & getlang("LangReadFail") & " " & catalogid HandleError end if end sub
You can then edit the error message ("LangReadFail") through the Admin panel to display "Product not available" or something similar. I don't know about redirecting to the category page from shopexd.asp, that would take some custom coding to do.
Hope this helps,
Carrol www.deanston-electrical.co.uk |
|
|
skynet104
VP-CART New User
94 Posts |
Posted - November 08 2008 : 16:09:32
|
Hi;
Thanks for your reply, however the following error shows:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'False'.
/shopexd.asp, line 85
Please Advice.
Thanks |
|
|
skynet104
VP-CART New User
94 Posts |
Posted - November 08 2008 : 16:47:47
|
Ok, this code worked for me:
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid else sql="select * from products where ccode='" & ccode & "'" end if sql=sql & " and Hide=0 " if getconfig("xstockcontrol")= "Yes" then dim stocklowlevel if getconfig("xstocklow") = "" or ISNULL(getconfig("xstocklow")) then stocklowlevel = 0 else stocklowlevel = getconfig("xstocklow") end if
sql = sql & " and cstock > " & stocklowlevel end if |
|
|
Steve2507
VP-CART Expert
590 Posts |
Posted - November 24 2008 : 10:43:04
|
I'm still working on this.
Neither of the above solutions work for us.
What I would like to do is redirect the user to a special page that explains the item is discontinued.
I've added the following code to the top of shopexd but no joy.
Any ideas anyone?
Dim rwehiding
rwehiding=request("hide")
If rwehiding="True" then
response.Redirect "default-discontinued.asp"
end if
Steve Sex toys from a UK sex shop |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - November 24 2008 : 11:57:14
|
Hi Steve,
I've tested this code in shopexd.asp by entering addresses into the browser that point to hidden products in our database(Access) and each time it seems to work fine. I commented out the eof error message and replaced it with a redirect.
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if
Set rs=dbc.execute(sql) If rs.eof then response.Redirect "http://mysite/Discontinued.asp" 'Serror = SError & getlang("LangReadFail") & " " & catalogid 'HandleError end if end sub
I tested shopexd.asp?id=192 and shopexd.asp?id=192&bc=no and both displayed the Discontinued page. Do the links from Google have anything else added to the end of the address?
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
Steve2507
VP-CART Expert
590 Posts |
Posted - November 24 2008 : 13:41:46
|
Hi Carrol,
Thanks for the help.
Our urls are rewritten and use a number of variables. This is why the set up you have wont work on our system.
Bringing the check against hide before anything else means we shouldn't need to worry about the sql part.
Steve Sex toys from a UK sex shop |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - November 25 2008 : 05:39:38
|
Yes, I thought your urls were rewritten.
One for the support guys I think
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
Steve2507
VP-CART Expert
590 Posts |
|
borisvel
Starting Member
Slovenia
47 Posts |
Posted - January 05 2012 : 05:26:06
|
quote: Originally posted by carfin
You can stop the hidden products from showing by adding a couple of lines of code to shopexd.asp (the brown highlighted code)
Find this sub:
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if Set rs=dbc.execute(sql) If rs.eof then Serror = SError & getlang("LangReadFail") & " " & catalogid HandleError end if end sub
You can then edit the error message ("LangReadFail") through the Admin panel to display "Product not available" or something similar. I don't know about redirecting to the category page from shopexd.asp, that would take some custom coding to do.
Hope this helps,
Carrol www.deanston-electrical.co.uk
Hi Carrol,
is it possible to do same for hidden but not deleted categories??
Thanks for your replay and kind regards, Boris |
|
|
borisvel
Starting Member
Slovenia
47 Posts |
Posted - January 05 2012 : 05:29:04
|
quote: Originally posted by borisvel
quote: Originally posted by carfin
You can stop the hidden products from showing by adding a couple of lines of code to shopexd.asp (the brown highlighted code)
Find this sub:
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if Set rs=dbc.execute(sql) If rs.eof then Serror = SError & getlang("LangReadFail") & " " & catalogid HandleError end if end sub
You can then edit the error message ("LangReadFail") through the Admin panel to display "Product not available" or something similar. I don't know about redirecting to the category page from shopexd.asp, that would take some custom coding to do.
Hope this helps,
Carrol www.deanston-electrical.co.uk
Hi Carrol,
is it possible to do same for hidden but not deleted categories??
Thanks for your replay and kind regards, Boris
Hi, me again
second thoughts...
How to redirect in such case to other existing page? |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - January 05 2012 : 08:58:08
|
Hi Borisvel,
you have to add a redirect statement to the sub.
Open shopexd.asp
Find sub and add code highlighted with brown. Change the redirect address to the page you require.
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if
Set rs=dbc.execute(sql) If rs.eof then response.Redirect "http://www.yoursite.com/Discontinued.asp" ' Serror = SError & getlang("LangReadFail") & " " & catalogid ' HandleError end if end sub
Hope this helps.
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
borisvel
Starting Member
Slovenia
47 Posts |
Posted - January 06 2012 : 05:57:12
|
quote: Originally posted by carfin
Hi Borisvel,
you have to add a redirect statement to the sub.
Open shopexd.asp
Find sub and add code highlighted with brown. Change the redirect address to the page you require.
Sub ExdOpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid & "AND hide=False" else sql="select * from products where ccode='" & ccode & "'" & "AND hide=False" end if
Set rs=dbc.execute(sql) If rs.eof then response.Redirect "http://www.yoursite.com/Discontinued.asp" ' Serror = SError & getlang("LangReadFail") & " " & catalogid ' HandleError end if end sub
Hope this helps.
Regards,
Carrol www.deanston-electrical.co.uk
Hi Carrol,
many thanks, it works fine.
Could you please also propose solution for hidden or deleted categories?
I reorganized my cart and i don't want to loose very good positions in Google search with those hidden links.
Many thanks again, Boris
|
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - January 07 2012 : 05:54:44
|
Hi,
best solution for hidden categories is to remove (or hide if possible) products that are assigned to that category. For deleted categories, surely you would have checked first and removed assigned products before you delete the category?
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
borisvel
Starting Member
Slovenia
47 Posts |
Posted - January 08 2012 : 05:15:47
|
quote: Originally posted by carfin
Hi,
best solution for hidden categories is to remove (or hide if possible) products that are assigned to that category. For deleted categories, surely you would have checked first and removed assigned products before you delete the category?
Regards,
Carrol www.deanston-electrical.co.uk
Hi Carrol,
i agree. I meant links like
/shopdisplaycategories.asp?id=347&cat=Darila+za+rojstni+dan
There are no more product's in that category, categorie is hidden but not deleted. It appers in Google search results, but site displays only header and trailer without anyting else.
I would like to redirect such links to if possible.
Thanks and kind regards
www.finechance.com www.personaliziranadarila.si www.lingerie.si |
|
|
|
Topic |
|