Description - vct-vendor/AlsoBoughtWiki Wiki
Tasks performed
- Collect products that were present in other customer orders along with the product being viewed (
Also Bought
products) with:-
Cron
(automatically according to your schedule). -
CLI
command. - button in
Admin
(backend).
-
- Display
Also Bought
products in:- Custom
widget(s)
. -
Related
products. -
Up-Sell
products. -
Crosssell
products.
- Custom
- Display
Also Bought
products in a widget(s) for:- Products you have chosen
- All products
- Only bundle products
- Only configurable products
- Only downloadable products
- Only grouped products
- Only simple products
- Only virtual products
- Set the widget location of your choice from the following:
- After Page Header
- After Page Header Top
- Alert Urls
- Before Main Columns
- Before Page Footer
- Before Page Footer Container
- CMS Footer Links
- Compare Link Wrapper
- Main Content Area
- Main Content Aside
- Main Content Bottom
- Main Content Container
- Main Content Top
- Mini-Cart Promotion Block
- Page Bottom
- Page Footer
- Page Footer Container
- Page Header
- Page Header Container
- Page Header Panel
- Page Top
- Product Auxiliary Info
- Product Info Auxiliary Container
- Product Social Links Container
- Product View Extra Hint
- Review Form Fields Before :beetle:
- Sidebar Additional
- Sidebar Main
- Display the following product card elements in the widget of your choice:
- Product image
- Reviews summary
- Price box
- Swatches for configurable products
- Add to cart button
- Add to wish list button
- Add to compare button
- Set title for widget(s)
- Set a number of products to display in a
widget
/Related
/Up-Sell
/Crosssell
- Show random instead of last purchased products in a
widget
/Related
/Up-Sell
/Crosssell
- Choose one of a themes available in your store for the widget
- The settings are unique for each widget
- Set position of
Also Bought
products (after
/before
) products forRelated
/Up-Sell
/Crosssell
. - The number of widgets is not limited
-
Also Bought
products added toRelated
/Up-Sell
/Crosssell
will be marked and can be removed if necessary.
Features
- No reloads and no AJAX requests when selecting a product.
- Easy configuration with explanations in Admin or using cli.
- Multi-store support.
- Only Plugins (Interceptors) is used to reduce conflicts among modules.
- Detailed documentation.
- Light-weight code.
- Сompletely open source.
- Affordable price.
Support
- Free support.
- Free updates.
Installation
Install composer require vct/simpleproducturl
.
Enable bin/magento module:enable Vct_SimpleProductUrl --clear-static-content
.
Register bin/magento setup:upgrade
.
Recompile bin/magento setup:di:compile
.
Deploy bin/magento setup:static-content:deploy --force
.
Read more about installing the module in the official Magento 2 documentation.
Configuration
Clean cache after each setting change to see the changes:
SYSTEM
Tools
Cache Management
Flush Magento Cache
.
Flush Magento Cache
is equivalent tobin/magento cache:clean
.
All module settings can be found in Admin section:
STORES
Configuration
VCT
Also Bought
.
To change the value, clear Use system value
checkbox and enter the new value.
Redirect simple product to parent configurable product page
For example, there is a simple product with an URL Key
mona-pullover-hoodlie-s-green
:
This simple product has a parent configurable product with an URL Key
mona-pullover-hoodlie
:
Below in the screenshot you can see this simple product. The URL of simple product has been changed by the module from /mona-pullover-hoodlie-s-green.html
to /mona-pullover-hoodlie.html#143=167&93=53
.
After enabling Redirect Simple Product To Configurable
option instead of simple product URL e.g. /mona-pullover-hoodlie-s-green.html
, will be used the URL of parent product e.g. /mona-pullover-hoodlie.html
with options e.g. #143=167&93=53
to pre-select the simple product e.g. /mona-pullover-hoodlie.html#143=167&93=53
. This is true for all simple products that have available configurable parent products.
STORES
Configuration
VCT
Simple Product URL
Config
Redirect Simple Product To Configurable
or set configuration value with the following command:
php bin/magento config:set vct_alsobought/switch/redirect_simple_to_configurable "1"
to enable or
0
to disable.
Show selected product URL in a browser adress bar
When you select a configurable product option, the simple product options e.g. #143=167&93=53
will be added to the configurable product URL e.g. /mona-pullover-hoodlie.html
. Thus, after enabling Show Selected Product URL In Browser Adress Bar
option, the URL in the browser address bar will look like /mona-pullover-hoodlie.html#143=167&93=53
:
STORES
Configuration
VCT
Simple Product URL
Config
Show Selected Product URL In Browser Adress Bar
or set configuration value with the following command:
php bin/magento config:set vct_alsobought/switch/show_selected_product_url "1"
to enable or
0
to disable.
Save selected product URL in browser history
When you select a configurable product option, the simple product options e.g. #143=167&93=53
will be added to the configurable product URL e.g. /mona-pullover-hoodlie.html
. Thus, after enabling Show Selected Product URL In Browser Adress Bar
option, the URL in the browser address bar will look like /mona-pullover-hoodlie.html#143=167&93=53
.
If Save Selected Product URL In Browser History
option is enabled, the new URL /mona-pullover-hoodlie.html#143=167&93=53
will be saved in the browser history. Thus, when you press the Back
button in the browser, you will be redirected from /mona-pullover-hoodlie.html#143=167&93=53
to /mona-pullover-hoodlie.html
.
STORES
Configuration
VCT
Simple Product URL
Config
Save Selected Product URL In Browser History
or set configuration value with the following command:
php bin/magento config:set vct_alsobought/switch/save_url_history "1"
to enable or
0
to disable.