What are the Slack Archives?
Itโs a history of our time together in the Slack Community! Thereโs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonโt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hallo all, How can we make Spryker generate URLs for store that has two english locales? like en_GB
Comments
-
You must have those locales defined for your stores and also your data must have a value for those locales
โข CMS pages
โข Products
โข etc.0 -
yeah but in stores.php the key for locale array is language
0 -
'locales' => [ 'en' => 'en_GB', 'en' => 'en_IE', // <- ???? ],
0 -
you could define whatever you want as key there, we use it for shortcut
0 -
I see
0 -
thank you Jeremy ๐
0 -
yrw
0 -
one more question please ๐ how would dropping unique indexfrom url column in spy_url affect the applicaiton behaviour?
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
u can override spy_url.schema.xml in pyz level and u can overwrite the unique index or remove it for example.
0 -
I know I can do that ๐ my concern is what would be the consequences of that!?
0 -
you won't get where you might expect? as the first occurence of url might be used afterwards
0 -
so you think it is safe?
0 -
I cant read your thoughts, sorry
0 -
what do you try to achieve with dropping unique constraint?
0 -
I want a different URL based on locale not language
0 -
then make it different and stick to unique constraint
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
i had for example the unique key extended with fk_locale too and everything worked fine..
because in the case u have two store with same language and same url then the actual schema does not work
They are already based on locale and not language.. the problem is only in stores.php
0 -
I was thinkning the same but doing this will require a lot of data manipulation on my import files because I have big files โฆ I was thinking maybe we can do somehting on app level
0 -
@UL65CH0MC how did you address the problem in stores.php?
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
one mom.. let me see in my old project..
0 -
thanks a lot
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
ok, i dont' have any store with two same language..
i have only for example FR Store with fr_FR locale and CH Shop with fr_CH locale too..
it means with the change of unique key it was possible in my shop have the same url /fr/blabla in spy_url table but for two different locales.. but unfortunately i dont have the same language for the same store...
0 -
i have only for example FR Store with fr_FR locale and CH Shop with fr_CH locale too..
I have similar problem ๐
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
but i think u need two different language.. therefore it is as key in stores.php because the language is used to recognize the language via url...
0 -
actually the same
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
then it is enough to extend the unique key in db..
0 -
ok I will try that
0 -
thank you very much ๐
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
so i had in my old project
<?xml version="1.0"?> <database xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:noNamespaceSchemaLocation="<http://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\Url\Persistence" package="src.Orm.Zed.Url.Persistence"> <table name="spy_url" phpName="SpyUrl"> <unique name="spy_url_unique_key"> <unique-column name="url"/> <unique-column name="fk_locale"/> </unique> </table> </database>
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
please check if name etc... still the same are
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K ๐ Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random