ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - Link to product SKU
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Link to product SKU

 Post Reply Post Reply
Author
Message
amscompanies View Drop Down
Newbie
Newbie


Joined: 25-March-2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote amscompanies Quote  Post ReplyReply Direct Link To This Post Topic: Link to product SKU
    Posted: 26-February-2012 at 8:35pm
How can I link to a product based on it's SKU ?
 
For example
 
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 26-February-2012 at 8:47pm
viewPrd.asp relies upon idProduct, which is the record ID associated with the product record in the products table.
 
To do what you want would require an additional function.  Add code to viewPrdCode.asp that queries the product record based on SKU. (Make sure you adhere to no duplicate SKU numbers.)
 
Then at the top of the logic in viewPrd.asp, you have to test for SKU being present in the querystring.  If non-blank, call your new function to return the idProduct associated with that SKU, and the rest of viewPrd.asp can then run in otherwise unaltered form.
Back to Top
amscompanies View Drop Down
Newbie
Newbie


Joined: 25-March-2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote amscompanies Quote  Post ReplyReply Direct Link To This Post Posted: 26-February-2012 at 8:53pm
The alterantive would be when I import it uses the SKU as productID, which do you think would be better ?
 
I certainly won't have any duplicate SKU's
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 26-February-2012 at 9:00pm
idProduct is an auto-increment integer field.  As such, starting at 1, you would have to alter the database to support your proposed idea.  The consequences of this are significant as it pertains to all of the product admin stuff.  Why do that when the above solution can be done by a competent programmer in less than an hour.
Back to Top
amscompanies View Drop Down
Newbie
Newbie


Joined: 25-March-2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote amscompanies Quote  Post ReplyReply Direct Link To This Post Posted: 26-February-2012 at 9:02pm
Wanted an opinion on which would be easier and I think you have just given me the answer :) How much would you charge to do that ?
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 26-February-2012 at 9:06pm

Let's take this off-forum.  Please e-mail me at my site. 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.