![]() |
Link to product SKU |
Post Reply ![]() |
Author | |
amscompanies ![]() Newbie ![]() Joined: 25-March-2010 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 26-February-2012 at 8:35pm |
How can I link to a product based on it's SKU ?
For example
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
amscompanies ![]() Newbie ![]() Joined: 25-March-2010 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
amscompanies ![]() Newbie ![]() Joined: 25-March-2010 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
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 ?
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
Let's take this off-forum. Please e-mail me at my site. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |