Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Idea to use Slugs to produce SEF [ VIDEO ]


cables24h

SEF url's based on slugs  

2 members have voted

  1. 1. I want it by default

    • YES
      1
    • NO
      1
  2. 2. I want it and willing to pay for it ( contributions via PHOENIX POT)

    • Yes
      1
    • NO
      1
  3. 3. This system will not work for me

    • Sorry, nice attempt, but ain't go work for me.
      1
    • I choose above and explain why.
      1
    • I have more questions about this.
      0


Recommended Posts

16 minutes ago, azpro said:

Nice! Dont know really how it would help a store - but it shows a lot is possible ..

no Sinterklaas? (Dutch tradition)

This system hijack the tep_href_link function.
So in search-engine results the link itself will not show up anymore as https://yoursore.com/products.php?products_id=XXXX
it now show up ( keep in mind that the products_info.php via a htaccess can be declared as product/ or product_info/ etc), with the actual phrase you assign it with ( multilingual url's) 

It is NOT proven search engines RANK SEF url's above other url's.
But.............
Now you know what you click on.

And the ranking....................... that can be a debate.
But i not looking for that. ( this is a debate on it's own. Ask yourself......... do you need SEF url's.......... i not advice on that)


I not like the "self generated "chemo" link system", and i do not like the other attempts to "auto-generate" oscommerce linking system.
If you here put a SLUG..................
you can use that slug only once for EACH language.
- you cannot use for a manufacturer CANON............. same slug for a product or a category
- you cannot use product-X assigned to a product for a category or manufacturer.

How i made/designed it:
if you put once CANOn ( for ANY REFERENCE, lets say......... a manufacturer)
Next time you type CANON for a product or a category......... it automatically change it to CANON-1.
So it avoid duplicates.
If you type CANON-1 it make it CANON-1-1 

Link to comment
Share on other sites

Perhaps this toss up questions like these:
https://stackoverflow.com/questions/8449540/php-detect-mysql-update-insertion-failure-due-to-violated-unique-constraint/8449628

For the respected audience this might not make any sense at all.
It does not even make sense at all in relation to the idea of introducing a sef SYSTEM ( SLUGGED BASED URL'S).

i let the expert's (dev's) read in this case how to handle error's.
( if not bring it up............. no one go bring it up.............. and you wil be stucked in history/ancient coding philosophy).

Keeping an audience is great, especially if it can be maintained by a few.
Generating an audience, ( means also developers who regain (back) interest in oscommerce), ............... THAT WOULD BE AWESOME.
- Old code is GREATH ( that is how the new learned to make it better)
- New is COOL ( As this is where the OLD pointed awards to)
 

So........................
no matter what the new does.
The old code still works with (the/as) the new.
( it would be easier to work with the new, but we do not have that)

Link to comment
Share on other sites

For the Slug, I assume this is added (eg for a product) in the product adding/editing page in admin:  admin/categories.php

My suggestion;
use .js and ajax to query the slug DB table and warn the user if they are attempting to use an already defined Slug.

Then you can forget the logic SLUG-1, SLUG-1-1 etc. 

Something like (but obviously for slugs, not email checking);

 

Link to comment
Share on other sites

I agree, but the checking is more exclusive.
A warning is ok, but in this time period a warning is not sufficient.
Based on the warning, it should also offer a suggestion.

Think about it like this:
you want to register ( i know microsoft do it)........................
to a product.
you type a name, it not accept, as it is already in use.
This product offer you sub-texts ( like a nickname).
you can choose one, or you keep try another.

The system i say............... you not keep try.......... you NOT require a warning, it just add -1 or -2.
Hey................. this is not a logon system.
you can (try) change the slug to what you want.
As long as there is no duplicate.


Keep in mind this is for inserting products , manufacturers and categories.
you do not want to be surpressed with a warning.................. you CAN show a notice.
But if the system automtic add -1 or -2
Why bother..............
you can change it after to what you want.

Link to comment
Share on other sites

1 hour ago, cables24h said:

do you need SEF url's

Obviously it is needed.

If you share to a client a link such as:

https://www.freeOSC.com/product_info.php?products_id=3

or a link like https://www.freeOSC.com/Pears-p-3.html 

Is not the same!!! 

The second URL is much easier to memorize or search in another instance.

Having SEF url's should be part of the core. I do not understand why it is not??

 Anyone who knows and can explain it?

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

Just now, valquiria23 said:

Obviously it is needed.

If you share to a client a link such as:

https://www.freeOSC.com/product_info.php?products_id=3

or a link like https://www.freeOSC.com/Pears-p-3.html 

Is not the same!!! 

The second URL is much easier to memorize or search in another instance.

Having SEF url's should be part of the core. I do not understand why it is not??

 Anyone who knows and can explain it?

Like i said, this is NOT something i want to argument about.

I just offer ( or make an attempt)  a code that generates SEF url's.
I not go in debat if it is required/needed.

That is why i made the poll.

 

Link to comment
Share on other sites

The only thin i CAN say is ............ if a client put his mouse over a link (i not go lie about this.................. i check the link i click on............... if the link say A............. i want it to show A, if the link say A and shows me B..................... I"M OUT)
( but that might be a learning curve of how to use the internet).

Link to comment
Share on other sites

Do not forget.............
The way how it is code is not you have to use it or sticked on.
You can use the add-on, assign just
- 5(slugs) out of 100 manufacturer.
- 20 (slugs) out of 40 categories
- 200(slugs) out of 5000 products.

That is the part i like ( THE COOL STUFF), you don't need to.


If you put a slug.................... no problem.
If you not................... no problem............
If you mix it................. Not even a problem at all.

That is a kind of difference with current systems.
it is called "CHOICE".

You not have that somewhere else.

It is all fixed................ that is simply how they are teached to program ( the new guys) ( helllll no................................. old guy go for FLEX)
I rest my case and yield back.

I leave the rest open for the audience!
 

Link to comment
Share on other sites

36 minutes ago, valquiria23 said:

If you share to a client a link such as:

https://www.freeOSC.com/product_info.php?products_id=3

or a link like https://www.freeOSC.com/Pears-p-3.html 

Is not the same!!! 

the slug do more. it not add after:
https://www.freeOSC.com/Pears-p-3.html 
the additional  -p-3
it only uses 
https://www.freeOSC.com/Pears.html 
There is no check required to read p-3 as a product_id=3
As a slug is unique and returns ( from the DB) the correct ID

Link to comment
Share on other sites

1 hour ago, burt said:

For the Slug, I assume this is added (eg for a product) in the product adding/editing page in admin:  admin/categories.php

My suggestion;
use .js and ajax to query the slug DB table and warn the user if they are attempting to use an already defined Slug.

Then you can forget the logic SLUG-1, SLUG-1-1 etc. 

Something like (but obviously for slugs, not email checking);

 

What should show is show a suggestion.
Let the admin give the opportunity to insert his own suggestion.
It can be pre-filled with -1 or -2 or even with -100
if the phrase is UNIQUE, the system will accept.

Why bother the admin with his phrases he put?
if the system put -1.
the admin not care for it, why bother?
If the admin seriously want to change.................... yep................ that is kind of the lookup what is required.
but yeah................
here you show things working on the background.

Link to comment
Share on other sites

How will this affect existing url links and seo history? product is

https:kuuza.co.uk/product_info.php?cPath=1&products_id=7

user changes to 

https:kuuza.co.uk/French Gala

If user makes changes on existing site url  the link history is broken and problems for user no? will have to have some form of rewrite to keep SEO and Google happy.

Also for existing shops they have 100's or 1000's of products it's not posiable to do this by manual method this is why most people use the add-ons to auto generate human "readable url" and this is the main benifit of this that they are redable by humans, Google will not care if it is human readable or not.

This is now default behavior in most new e commerce code, so user has no need to worry about this sort of thing it just happens automatically.

https:www.justfastfood.co.uk/rubber-ducks-c-1/purple-duck-p-5

 

 

Link to comment
Share on other sites

12 minutes ago, LeeFoster said:

www.randomstorename.com/categoryname/categoryname/productname

This can only be done as henry is saying using something like a SLUG as each url MUST remain unique, just using names will not work as site admin can use same name on more than one product by mistake, easy to do when you have 1000's of products.

So code will take

www.randomstorename.com/categoryname/productname -c-1234

and only show

www.randomstorename.com/categoryname/productname

 

Link to comment
Share on other sites

I think by bringing in an ajax checker, you are using a modern way to let the user know that the slug is used or available.

That seems to me, a nice way to allow the system to work but not force an unwanted slug (eg blue-widget-1) on the user.
If you can show them a msg saying something like "Blue-Widget is in use, so this slug will default to Blue-Widget-1, or you can change it now", this would be I think excellent.

Link to comment
Share on other sites

On 12/5/2019 at 7:59 PM, cables24h said:

 

On 12/5/2019 at 8:18 PM, cables24h said:

.html is just 5 digits extra.
No need to put .html

I love it!! This should come directly in the core, today the competition has it and it is considered as a must have of any actual ecommerce plataform. Hopefully @burt will include it in the next version of OSC, thank you very much @cables24h for your fantastic positive ideas !!

Have a nice day

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...