Trying to perfect SES urls - Integrating Coldbox with Cartweaver 3

2014-02-10 Thread Matt Gibson

Hi guys, some advice or guidance would be great on this please.

We are using Cartweaver 3 and have basic redirects setup for our category 
pages, product pages and brand pages.

In my opinion the redirects are very logical and work well, however we have 
been advised by our SEO company that we now need to tidy the links up making 
them just contain pertinent information rather than containing id's etc. Also 
the ability to add forward slashes to each level of category apparently is 
important too.

So after researching around it seems Coldbox with SES urls is the way to go, my 
question is is this possible with Cartweaver and if so will it require a 
complete rebuild of the site or can I integrate it without much disruption?

FYI

Our first level categories go to
subcat.cfm

Our second levels go to
subsubcat.cfm

Our third level categories go to
results.cfm

and our product pages go to
details.cfm

I am a novice when it comes to Coldfusion, I understand the language but I'm 
not sure where to start with this. Please help!

Thanks,

Matt 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357644
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfheader

2014-02-10 Thread Rob Voyle

Hi folks

I am using 

cfheader name=Content-disposition value=inline;filename=#handout#
cfcontent  type=application/pdf  file=#handoutfile# deleteFile = no 

to display a pdf and it works fine, but I would like to open it in a new window

Is there a way to open the pdf in a new browser window such as the html  
target=_blank does.

Thanks
Rob



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357645
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfheader

2014-02-10 Thread Steve Milburn

Why not put target=_blank in the a tag on the page that is linked to
the pdf?

Steve


On Mon, Feb 10, 2014 at 9:56 AM, Rob Voyle robvo...@voyle.com wrote:


 Hi folks

 I am using

 cfheader name=Content-disposition value=inline;filename=#handout#
 cfcontent  type=application/pdf  file=#handoutfile# deleteFile = no
 

 to display a pdf and it works fine, but I would like to open it in a new
 window

 Is there a way to open the pdf in a new browser window such as the html
 target=_blank does.

 Thanks
 Rob



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357646
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfquery multiple column search

2014-02-10 Thread fun and learning

All -

I am working on a search functionality for multiple columns of data. I using 
'OR' condition for searching on a single search input. For example on front end 
i have a search input box, and I can enter either numeric or alphabets or 
alphanumeric characters. How can I handle this using cfqueryparam? if the 
database column is a numeric, and I enter alphabets, I get errors like Invalid 
data %0% for CFSQLTYPE CF_SQL_INTEGER.

I am first retreiving the full result set and performing query of queries to 
filter on the search criteria. my query of query looks like below. The above 
error happens on col5 search when I search string characters like 'abc'. Are 
there any functions in coldfusion that help with this kind of scenarios?

cfquery name=getinfo dbtype=query
SELECT
col1, col2, col3, col4, col5
FROM
getinfo
WHERE
   (lower(col2) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col3) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col4) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR 
lower(col5) like lower(cfqueryparam cfsqltype=cf_sql_integer 
value=%#val(Arguments.search)#%)  
)
/cfquery 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357647
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Trying to perfect SES urls - Integrating Coldbox with Cartweaver 3

2014-02-10 Thread Jon Clausen

Matt,

Though I’m a huge fan of CB, here’s really no need for Coldbox, if all you want 
is the SES URL functionality, plus CW isn’t really designed in a way that plays 
well with frameworks.  I had a CartWeaver site set up a few years ago with SES 
urls.   The steps to modify are, basically, as follows:

1)  create a unique slug/tag column on all of your categories and products and 
populate those using the a regex “slugification” of category/product name. 
(You’ll need to add the form field in the admin for the cats and products as 
well - or you can auto-create it on save and edit it later) 

2)  create a tag lookup function for categories and products that pulls the 
slug, based on the ID

3)  call that function from your cat/subcat/production landing pages using an 

if(isNumeric(id)){
//Look up your tag from the id and redirect here...
} 

and use a 301 redirect to the SES url page - this will allow all of the CW 
generated links to resolve correctly, or you can replace the id in the url with 
the slug variable.

The above assumes you have mod_rewrite or are using one of the IIS rewrite 
options.

You’ll need to create some sort of redirect rules in place to “pretty up” the 
extension pages and handle the category-subcategory-product links (name/value 
pairs work well here), but there are all sorts of examples and tutorials for 
mod-rewrite, ISAPI rewrite and IIS URL Rewriting out there.

HTH,
Jon


On Feb 10, 2014, at 9:07 AM, Matt Gibson gibson...@gmail.com wrote:

 
 Hi guys, some advice or guidance would be great on this please.
 
 We are using Cartweaver 3 and have basic redirects setup for our category 
 pages, product pages and brand pages.
 
 In my opinion the redirects are very logical and work well, however we have 
 been advised by our SEO company that we now need to tidy the links up making 
 them just contain pertinent information rather than containing id's etc. Also 
 the ability to add forward slashes to each level of category apparently is 
 important too.
 
 So after researching around it seems Coldbox with SES urls is the way to go, 
 my question is is this possible with Cartweaver and if so will it require a 
 complete rebuild of the site or can I integrate it without much disruption?
 
 FYI
 
 Our first level categories go to
 subcat.cfm
 
 Our second levels go to
 subsubcat.cfm
 
 Our third level categories go to
 results.cfm
 
 and our product pages go to
 details.cfm
 
 I am a novice when it comes to Coldfusion, I understand the language but I'm 
 not sure where to start with this. Please help!
 
 Thanks,
 
 Matt 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357648
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfheader - thanks

2014-02-10 Thread Rob Voyle

Thanks Steve - so simple!

On 10 Feb 2014 at 10:02, Steve Milburn wrote:

 
 Why not put target=_blank in the a tag on the page that is
 linked to
 the pdf?
 
 Steve
 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357649
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Trying to perfect SES urls - Integrating Coldbox with Cartweaver 3

2014-02-10 Thread Matt Gibson

Hi Jon, that's really interesting and thank you for the advice!

I had an idea that something like this would be required, it's just setting up 
the right system to accommodate.

Do you freelance? Would you be interested in helping me out on this project? It 
is somewhat outside my area of comfort!

Thanks,

Matt
 
 Though I’m a huge fan of CB, here’s really no need for Coldbox, if all 
 you want is the SES URL functionality, plus CW isn’t really designed 
 in a way that plays well with frameworks.  I had a CartWeaver site set 
 up a few years ago with SES urls.   The steps to modify are, basically, 
 as follows:
 
 1)  create a unique slug/tag column on all of your categories and 
 products and populate those using the a regex “slugification” of 
 category/product name. (You’ll need to add the form field in the admin 
 for the cats and products as well - or you can auto-create it on save 
 and edit it later) 
 
 2)  create a tag lookup function for categories and products that 
 pulls the slug, based on the ID
 
 3)  call that function from your cat/subcat/production landing pages 
 using an 
 
 if(isNumeric(id)){
   //Look up your tag from the id and redirect here...
 } 
 
 and use a 301 redirect to the SES url page - this will allow all of 
 the CW generated links to resolve correctly, or you can replace the id 
 in the url with the slug variable.
 
 The above assumes you have mod_rewrite or are using one of the IIS 
 rewrite options.
 
 You’ll need to create some sort of redirect rules in place to “pretty 
 up” the extension pages and handle the category-subcategory-product 
 links (name/value pairs work well here), but there are all sorts of 
 examples and tutorials for mod-rewrite, ISAPI rewrite and IIS URL 
 Rewriting out there.
 
 HTH,
 Jon
 
 
 On Feb 10, 2014, at 9:07 AM, Matt Gibson gibson...@gmail.com wrote:
 
  
  Hi guys, some advice or guidance would be great on this please.
  
  We are using Cartweaver 3 and have basic redirects setup for our 
 category pages, product pages and brand pages.
  
  In my opinion the redirects are very logical and work well, however 
 we have been advised by our SEO company that we now need to tidy the 
 links up making them just contain pertinent information rather than 
 containing id's etc. Also the ability to add forward slashes to each 
 level of category apparently is important too.
  
  So after researching around it seems Coldbox with SES urls is the 
 way to go, my question is is this possible with Cartweaver and if so 
 will it require a complete rebuild of the site or can I integrate it 
 without much disruption?
  
  FYI
  
  Our first level categories go to
  subcat.cfm
  
  Our second levels go to
  subsubcat.cfm
  
  Our third level categories go to
  results.cfm
  
  and our product pages go to
  details.cfm
  
  I am a novice when it comes to Coldfusion, I understand the language 
 but I'm not sure where to start with this. Please help!
  
  Thanks,
  
  Matt 
  
  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357650
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Trying to perfect SES urls - Integrating Coldbox with Cartweaver 3

2014-02-10 Thread Matt Gibson

Hi Jon, that's really interesting and thank you for the advice!

I had an idea that something like this would be required, it's just setting up 
the right system to accommodate.

Do you freelance? Would you be interested in helping me out on this project? It 
is somewhat outside my area of comfort!

Thanks,

Matt
 
 Though I’m a huge fan of CB, here’s really no need for Coldbox, if all 
 you want is the SES URL functionality, plus CW isn’t really designed 
 in a way that plays well with frameworks.  I had a CartWeaver site set 
 up a few years ago with SES urls.   The steps to modify are, basically, 
 as follows:
 
 1)  create a unique slug/tag column on all of your categories and 
 products and populate those using the a regex “slugification” of 
 category/product name. (You’ll need to add the form field in the admin 
 for the cats and products as well - or you can auto-create it on save 
 and edit it later) 
 
 2)  create a tag lookup function for categories and products that 
 pulls the slug, based on the ID
 
 3)  call that function from your cat/subcat/production landing pages 
 using an 
 
 if(isNumeric(id)){
   //Look up your tag from the id and redirect here...
 } 
 
 and use a 301 redirect to the SES url page - this will allow all of 
 the CW generated links to resolve correctly, or you can replace the id 
 in the url with the slug variable.
 
 The above assumes you have mod_rewrite or are using one of the IIS 
 rewrite options.
 
 You’ll need to create some sort of redirect rules in place to “pretty 
 up” the extension pages and handle the category-subcategory-product 
 links (name/value pairs work well here), but there are all sorts of 
 examples and tutorials for mod-rewrite, ISAPI rewrite and IIS URL 
 Rewriting out there.
 
 HTH,
 Jon
 
 
 On Feb 10, 2014, at 9:07 AM, Matt Gibson gibson...@gmail.com wrote:
 
  
  Hi guys, some advice or guidance would be great on this please.
  
  We are using Cartweaver 3 and have basic redirects setup for our 
 category pages, product pages and brand pages.
  
  In my opinion the redirects are very logical and work well, however 
 we have been advised by our SEO company that we now need to tidy the 
 links up making them just contain pertinent information rather than 
 containing id's etc. Also the ability to add forward slashes to each 
 level of category apparently is important too.
  
  So after researching around it seems Coldbox with SES urls is the 
 way to go, my question is is this possible with Cartweaver and if so 
 will it require a complete rebuild of the site or can I integrate it 
 without much disruption?
  
  FYI
  
  Our first level categories go to
  subcat.cfm
  
  Our second levels go to
  subsubcat.cfm
  
  Our third level categories go to
  results.cfm
  
  and our product pages go to
  details.cfm
  
  I am a novice when it comes to Coldfusion, I understand the language 
 but I'm not sure where to start with this. Please help!
  
  Thanks,
  
  Matt 
  
  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357651
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cfquery multiple column search

2014-02-10 Thread David Phelan

You need to verify that the search terms you are providing for that column are 
numeric.  The cfqueryparam does that but returns an error when it finds a 
problem.  It's up to you to make sure that you are providing the proper type 
for the columns you are querying.  In this case if the search terms are not 
numeric then you want to skip the column all together.  You need to check that 
it is both numeric and an integer.

cfquery name=getinfo dbtype=query
SELECT
col1, col2, col3, col4, col5
FROM
getinfo
WHERE
   (lower(col2) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col3) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col4) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) 

cfif IsNumeric(arguments.search) and (Int(arguments.search) is 
arguments.search)
OR lower(col5) like lower(cfqueryparam cfsqltype=cf_sql_integer 
value=%#val(Arguments.search)#%)  
/cfif

)
/cfquery

David Phelan  
Web Developer   
IT Security  Web Technologies
  
Emerging Health
Montefiore Information Technology
3 Odell Plaza, Yonkers, NY 10701
914-457-6465 Office
862-234-9109 Cell
dphe...@emerginghealthit.com
www.emerginghealthit.com
www.montefiore.org



-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Monday, February 10, 2014 10:04 AM
To: cf-talk
Subject: cfquery multiple column search


All -

I am working on a search functionality for multiple columns of data. I using 
'OR' condition for searching on a single search input. For example on front end 
i have a search input box, and I can enter either numeric or alphabets or 
alphanumeric characters. How can I handle this using cfqueryparam? if the 
database column is a numeric, and I enter alphabets, I get errors like Invalid 
data %0% for CFSQLTYPE CF_SQL_INTEGER.

I am first retreiving the full result set and performing query of queries to 
filter on the search criteria. my query of query looks like below. The above 
error happens on col5 search when I search string characters like 'abc'. Are 
there any functions in coldfusion that help with this kind of scenarios?

cfquery name=getinfo dbtype=query
SELECT
col1, col2, col3, col4, col5
FROM
getinfo
WHERE
   (lower(col2) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col3) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR
lower(col4) like lower(cfqueryparam cfsqltype=cf_sql_varchar 
value=%#Arguments.search#%) OR 
lower(col5) like lower(cfqueryparam cfsqltype=cf_sql_integer 
value=%#val(Arguments.search)#%)  
)
/cfquery 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357652
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Trying to perfect SES urls - Integrating Coldbox with Cartweaver 3

2014-02-10 Thread Matt Gibson

Actually you know what, I think we already have something similar to this but 
we would like to remove the value instead of using the name and value in the 
url.

Eg. instead of http://www.ourwebsite.com/product-name-sku-01 we'd like 
http://www.ourwebsite.com/product-name


 Hi Jon, that's really interesting and thank you for the advice!
 
 I had an idea that something like this would be required, it's just 
 setting up the right system to accommodate.
 
 Do you freelance? Would you be interested in helping me out on this 
 project? It is somewhat outside my area of comfort!
 
 Thanks,
 
 Matt
  
  Though I’m a huge fan of CB, here’s really no need for Coldbox, if 
 all 
  you want is the SES URL functionality, plus CW isn’t really designed 
 
  in a way that plays well with frameworks.  I had a CartWeaver site 
 set 
  up a few years ago with SES urls.   The steps to modify are, 
 basically, 
  as follows:
  
  1)  create a unique slug/tag column on all of your categories and 
  products and populate those using the a regex “slugification” of 
  category/product name. (You’ll need to add the form field in the 
 admin 
  for the cats and products as well - or you can auto-create it on 
 save 
  and edit it later) 
  
  2)  create a tag lookup function for categories and products that 
  pulls the slug, based on the ID
  
  3)  call that function from your cat/subcat/production landing pages 
 
  using an 
  
  if(isNumeric(id)){
  //Look up your tag from the id and redirect here...
  } 
  
  and use a 301 redirect to the SES url page - this will allow all of 
 
  the CW generated links to resolve correctly, or you can replace the 
 id 
  in the url with the slug variable.
  
  The above assumes you have mod_rewrite or are using one of the IIS 
  rewrite options.
  
  You’ll need to create some sort of redirect rules in place to 
 “pretty 
  up” the extension pages and handle the 
 category-subcategory-product 
  links (name/value pairs work well here), but there are all sorts of 
 
  examples and tutorials for mod-rewrite, ISAPI rewrite and IIS URL 
  Rewriting out there.
  
  HTH,
  Jon
  
  
  On Feb 10, 2014, at 9:07 AM, Matt Gibson gibson...@gmail.com 
 wrote:
  
   
   Hi guys, some advice or guidance would be great on this please.
   
   We are using Cartweaver 3 and have basic redirects setup for our 
  category pages, product pages and brand pages.
   
   In my opinion the redirects are very logical and work well, 
 however 
  we have been advised by our SEO company that we now need to tidy the 
 
  links up making them just contain pertinent information rather than 
 
  containing id's etc. Also the ability to add forward slashes to each 
 
  level of category apparently is important too.
   
   So after researching around it seems Coldbox with SES urls is the 
 
  way to go, my question is is this possible with Cartweaver and if so 
 
  will it require a complete rebuild of the site or can I integrate it 
 
  without much disruption?
   
   FYI
   
   Our first level categories go to
   subcat.cfm
   
   Our second levels go to
   subsubcat.cfm
   
   Our third level categories go to
   results.cfm
   
   and our product pages go to
   details.cfm
   
   I am a novice when it comes to Coldfusion, I understand the 
 language 
  but I'm not sure where to start with this. Please help!
   
   Thanks,
   
   Matt 
   
  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357653
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm