magebit/vsbridge-static-content-procesor

Converts magento URL's to VSF during indexation

Installs: 5 206

Dependents: 2

Suggesters: 0

Security: 0

Stars: 10

Watchers: 5

Forks: 0

Open Issues: 0

Type:magento2-component

2.0.3 2022-06-03 07:27 UTC

This package is auto-updated.

Last update: 2024-04-30 00:59:44 UTC


README

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6d616765626974636f6d2f7374617469632d636f6e74656e742d70726f636573736f72 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6167656269742f76736272696467652d7374617469632d636f6e74656e742d70726f6365736f72

Static Content Processor for VSBridge

Automatically converts Magento urls to VSF urls during indexation

Installation

  • Via composer Run composer require magebit/vsbridge-static-content-procesor in your root magento directory

  • Git clone

    • Create Magebit directory in app/code
      • cd app/code
      • mkdir Magebit
    • Clone this repo inside Magebit directory
      • git clone git@github.com:magebitcom/static-content-processor.git

Usage

Standalone

This module requires you to configure VSF and VSF media urls.
You can find these configuration fields in: Store - Configuration - VueStorefront - Indexer - Static Content Processor

You can also specify which category and product attributes to run through the processor. As an example, you could select product description attribute and all the links and images will be converted with VSF urls.

You can also enable Category Image attribute url processor. It will convert all category attributes as image to VSF urls.

As a dependency

You can also use this module as a dependency for your own module:

use Magebit\StaticContentProcessor\Helper\Resolver;

/**
 * @package MyPackage\MyModule
 */
class MyModule
{
    /**
     * @var \Magebit\StaticContentProcessor\Helper\Resolver
     */
    protected $resolver;

    /**
     * @param Resolver $resolver
     */
    public function __construct(Resolver $resolver)
    {
        $this->resolver = $resolver;
    }

    /**
     * Does some content processing
     * @return string
     */
    public function example()
    {
        // This will convert urls and media urls to vsf urls according to the configuration
        return $this->resolver->resolve($this->getSomeStaticContent());
    }
}

Contributing

Found a bug, have a feature suggestion or just want to help in general? Contributions are very welcome! Check out the list of active issues or submit one yourself.

If you're making a bug report, please include as much details as you can and preferably steps to repreduce the issue. When creating Pull Requests, don't for get to list your changes in the CHANGELOG and README files.

Magebit

Have questions or need help? Contact us at info@magebit.com