| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Need help with html catalog mod to show sku in url. | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Need help with html catalog mod to show sku in url.
When generating the html catalog, x-cart puts the x-cart product id in the title of the page (productname-p-122.html). I would like to put the sku (also known as "productcode") in the title instead since it's something people might actually search on (productname-p-112345). We use the manufacturer part number for the sku. I have been messing with html_catalog.php but can't figure it out. Anyone have an idea how to do this?
Thanks. ISI X-Cart Gold 4.0.13 |
|||||||
#2
|
|||||||
|
|||||||
I haven't tested this, so make a backup first:
In html_catalog.php, replace {productid} with {productcode} everywhere it appears. For example, you would replace this: Code:
with this: Code:
Let me know if it works for you.....
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Unfortunately that doesn't work and produces lots of sql errors.
If you replace just the line you showed, you get: productname-p-{productcode}.html after generation. Thanks though. ISI X-Cart Gold 4.0.13 |
|||||||
#4
|
|||||||
|
|||||||
Dang, it was worth a shot at least
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
FWIW...
I worked around this problem by not using the x-cart html catalog feature at all. I bought the DSEFU mod (excellent by the way) and put the manufacturer's part number in the title of the product. My pages are now productname-manufacturerpart#-p-productid.html ISI X-Cart Gold 4.0.13 |
|||||||
#6
|
|||||||||
|
|||||||||
productid is an x-cart design flaw
I'm trying to deal with this same issue ... thanks for the tip on this mod. In your sample URL, both productcode and productid appear. Do you know if this mod allows you to specify a static URL that drops the productid alltogether?
The generation of productids and their central role in many aspects of X-Cart functioning is a basic design flaw that I keep hoping gets dumped in furture releases. In this instance, it's a problem because uploads can change the productid, and subsequently all of your static links suddenly become outdated if you regen the static HTML pages. If you search posts in this forum you can find dozens of instances year after year where people want to use a user-defined product codes (SKU) and avoid having X-Cart assign a completely arbitrary code (productid) that can change with future uploads. The random and unstable nature of the productid is problem in a wide range of contexts, and the case for a substantial offsetting benefit for this architecture is very thin. |
|||||||||
#7
|
|||||||||
|
|||||||||
P.S.
I was so busy ranting, I forgot to mention one more question:
I had tried the mod that balinor suggested above before finding this thread, and also found that productcode cannot be called from html_catalog.php. But that shouldn't be too tough, right? I don't really know smarty or php, but does someone who does know how this might be done? That would be the most direct fix for this. Thanks in advance. |
|||||||||
#8
|
|||||||||
|
|||||||||
you probably need to also call the product sku from the dataabse too and then add that to the part that creates the page
have a look in the code of admin/html_catalog.php
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#9
|
|||||||||
|
|||||||||
Thanks for your reply. The mod I had originally tried without success was to find instances of:
Code:
in html_catalog.php and change them to something like: Code:
This doesn't work, so I was wondering how to call the productcode value in this script?[/code] |
|||||||||
|
|||
X-Cart forums © 2001-2020
|