This module provides Styla magazine functionality to your OXID shop. It accepts all requests on the configured base directory and generates a dynamic response that includes the shop template containing the magazine JavaScript snippet (that can’t usually be crawled by search engines) and the crawlable HTML content including meta information. The module also provides an API with product data from OXID for you to use in Styla editor (backoffice) and callbacks for the users to add the products from the magazine to OXID cart.
This documentation page should provide you an overview of how Styla works in general.
Requirements
Installation
Updating to the latest version
Database fields used by the module
Known interactions with other OXID modules
Custom extensions or modifications
Setup Process
Release Notes
OXID version 5.x.
Since OXID itself does not run on PHP7, we haven't tested on this PHP version.
-
Copy the contents of copy_to_modules into the modules directory on your OXID installation.
-
Activate the module via the OXID admin interface under settings Extensions -> Modules:
-
Configure your styla username (provided by your account manager) in the Styla module:
-
Change the base directory (URL in which the magazine will be displayed, screen shot above)
-
Enable product api and configure a random string (should be between 6 and 30 characters) as api key in the Styla Feed module (please send this to your account manager - so we can enable your products in the styla editor):
Please do not create any subpages in your CMS or directories for your magazine. The module itself will take care of setting up the /magazine/ (or any other) page on which the magazine will appear and of the roouting as well.
The sequence when updating shoud be as follows:
- Install the new module
- Activate the new module
- Enter the settings from the previous version
- Check the 'Enable Product API' box
- Deactivate the old module
- Uninstall the old module
Until V1.5.0 the module consisted of two modules installed separately. They were merged to just one module in V1.5.0 and will stay so. If the two modules are already installed then you should stick to the following sequence when updating to V1.5.0 or later:
- Install the new module:
- Activate the new module:
- Enter the settings from the previous version:
- Check the 'Enable Product API' box (as on screenshot in 4. above)
- Deactivate the old modules:
- Uninstall the old modules:
If you go through these steps in a different sequence, this might lead to problems.
If you have recently updated the module and product search in Styla Backoffice returns all products, even those not matching your search query, please simply save the module settings in OXID admin panel in: Extensions > Modules > Styla > Settings > SAVE. The search behaviour should then go back to normal and return only products matching your query.
The module uses data from Styla's SEO API to:
- generate tags like: meta tags including
<title>
, canonical link, og:tags, static content inserted into ,robots
instructions - insert these tags accordingly into HTML of the template the page with Styla content uses
This is done to provide search engine bots with data to crawl and index all Styal URLs, which are in fact a Single-Page-Application.
Once you install and configure the module, please open source of the page on which your Styla content is embedded and check if none of the tags mentioned below are duplicated. In case robots
or link rel="canonical"
or any other are in the HTML twice, make sure to remove the original ones coming from your default template. Otherwise search engine bots might not be able to crawl all the Styla content or crawl it incorrectly.
You can finde more information on the SEO API on this page
The following database fields of the standard OXID shop system are being used by the StylaFeed module:
oxarticles.oxparent, oxarticles.oxactive, oxarticles.oxactivefrom, oxarticles.oxactiveto,
oxarticles.oxsearch (=1), oxarticles.oxpic != '', oxarticles.oxartnum join oxobject2category
(assigned categories) order by oxarticles.oxinsert / oxarticles.oxtimestam
oxarticles.oxid, oxarticles.oxtitle, oxartextends.oxlongdesc (Long Description),
oxarticles.oxshortdesc, oxarticles.oxprice (standard getPrice() ), oxarticles.oxstock ( > 0),
oxarticles.oxpic1, oxseo.oxseourl (assigned Seo-urls)
oxarticles.oxid, oxarticles.oxprice (standard getPrice() ), oxarticles.oxtprice (getTPrice()
), oxarticles.oxstock, oxarticles.oxvarname, oxarticles.oxvarselect
The logic for getPrice() and getTPrice() is quite complex and can be different for each project. Generally the following fields are being used: oxarticles.oxprice, oxarticles.oxtprice, oxarticles.oxvat, oxvarminprice.
oxcategories.oxid, oxcategories.oxtitle, oxcategories.oxshortdesc, sub-kategorien,
oxseo.oxseourl (assigned seo-url)
The methods stylaSEO onActivate and stylaFEED onActivate create static SEO URLS, which are being written into the oxseo table. These are the following (depending on the module settings in the backend of OXID):
stylaSEO:
magazine/, magazine/tag/, magazine/story/
stylaFEED:
magazine/index/, magazine/index/category/, magazine/index/product/
Generally speaking, external modules do not cause problems with the Styla module as this module does work relatively independently.
However, some shop-specific changes can lead to deviations between estimated and actual behavior, especially in the following cases:
-
Usage of external search solutions (Celebros, Findologic, etc.) may cause different search results in the Styla feed than with the same search phrase using the shops own search
-
Adjustments in the product logic like variants, prices, availability/saleability. To display such adjustments in Styla, the relevant standard OXID methods must be extended
-
(
getSqlActiveSnippet
,getVariantsQuery
and similar) -
If specific adjustments are desired in the Styla feed, the relevant methods can also be extended in the OXID way in
\Styla_Feed
There are no known blockers or conflicts making the installation of the module impossible.
Read more about extending the module!
The process of setting up your Content Hub(s) usually goes as follows:
- Install and configure the module on your stage using Content Hub ID(s) shared by Styla
- Share the stage URL, credentials with Styla
- Styla integrates product data from endpoints provided by the module, tests your stage Content Hub and asks additional questions, if needed
- Install and configure the module on production, without linking to the Content Hub(s) there and, again, share the URL with Styla
- Make sure your content is ready to go live
- Styla conducts final User Acceptance Tests before the go-live
- Go-live (you link to the Content Hub embedded on your production)
- Removed data-rootpath to be able to have full path seo api calls
- Feature: Add to cart logic update
- moved seo api html to allow html hydration
- added missing trailing slash for picture url
- Do not show empty categories at the /category/-endpoint
- Locale-Parameter for Productlinks
- Extension: Product URL for each picture in search
- Bugfix: Product API Error-Handling
- Task: Added data-rootpath handling to allow one content hub on multiple countries
- Bugfix: Create proper object ids for seo urls
- Bugfix: Use breadcrumb link depending on language
- Task: Allow to use ${language} in styla username to support multiple languages
- Bugfix: Products of subcategories cannot be found
- Extension: Changed default API domain, JS Spippet, SEO server URL
- Task: Adjustments for Styla Productfeed
- Task: isArticleSaleable OXID standard
- Feature: New field "priceTemplate" for product details endpoint
- Feature: New object “tax” for product details endpoint
- Bugfix: Changed module name back to Styla to make sure previous configuration stays available
- Bugfix: Changed version endpoint structure
- Bugfix: Changed module name and description
- Feature: Added category id's to product details response
- Feature: "Enable Product API" activated automatically, checkbox not displayed
- Feature: Field for Styla-backend productsearch
- Feature: Include manufacturer/vendor in productname
- Feature: Variant sorting
- Feature: Endpoint for to check module-version at
/styla-plugin-version/
- Bugfix: Feed-Productview has to show variants
- Bugfix: Improve product images via sku / product id
- Merged both modules StylaFeed and StylaSEO into one module
- Task: Improve product images via sku / product id
- Bugfix: Breadcrumb Link is not working
- Task: Added seo pagination for feeds
- Task: Set status code according to seo api response
- Bugfix: Always append version to script and css
- Extension: Moving the Styla snippet into the
<head>
- Extension: Version Endpoint
- Extension: API Key
- Extension: Adminconfig for API Domain URL
- Bugfix: StylaFeed -
_getProductDetails
wrong check for parent article- Bugfix - Task: External Search Best Pratice
- Task: Remove deprecated "Source URL" in admin panel
- Task: Meta title is not replaced correctly
- Task: Use seo server to fetch content
- Task: Generate a random api key
- Task: Styla Patch in Version einbinden