Automatically converts Magento urls to VSF urls during indexation
-
Via composer Run
composer require magebit/vsbridge-static-content-procesor
in your root magento directory -
Git clone
- Create
Magebit
directory inapp/code
cd app/code
mkdir Magebit
- Clone this repo inside
Magebit
directorygit clone git@github.com:magebitcom/static-content-processor.git
- Create
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.
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());
}
}
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.
Have questions or need help? Contact us at info@magebit.com