Skip to content

Commit

Permalink
Merge pull request #48 from customgento/DEV-241-child-product-data
Browse files Browse the repository at this point in the history
Dev 241 child product data
  • Loading branch information
Irinina authored Dec 20, 2023
2 parents e4cb32f + cc84f74 commit 3f19655
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 30 deletions.
34 changes: 23 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.7.2)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.4)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
drb (2.2.0)
ruby2_keywords
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
faraday (2.7.10)
execjs (2.9.1)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.3)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (228)
Expand Down Expand Up @@ -205,13 +216,14 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.8.4)
mini_portile2 (2.8.5)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.19.0)
nokogiri (1.15.4)
minitest (5.20.0)
mutex_m (0.2.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (4.25.1)
Expand All @@ -220,7 +232,7 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
racc (1.7.1)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -241,13 +253,13 @@ GEM
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unf_ext (0.0.9.1)
unicode-display_width (1.8.0)
webrick (1.8.1)

Expand All @@ -259,4 +271,4 @@ DEPENDENCIES
webrick (~> 1.8)

BUNDLED WITH
2.4.12
2.4.22
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

https://docs.customgento.com

## How to Work on this Documentation
## How to Work on this Documentation (these commands do not work with fish, use bash to run them instead)
1. You need to have Jekyll installed. To install it, follow instructions on https://jekyllrb.com/docs/installation/ubuntu/.
2. Clone the repository to your local machine.
3. Open your terminal and navigate to your project (see instuctions on https://idratherbewriting.com/documentation-theme-jekyll/#option2).
3. Open your terminal and navigate to your project (see instructions on https://idratherbewriting.com/documentation-theme-jekyll/#option2).
- When you need to update your dependencies run `bundle update`.
- Otherwise run `bundle install` instead (update would be recommended though).
4. Build the site with `bundle exec jekyll serve`
5. The site should now run locally at https://localhost:4000/.
5. The site should now run locally at https://localhost:4000/.
43 changes: 43 additions & 0 deletions _data/sidebars/cpd_m2_sidebar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting.

entries:
- title: Sidebar
levels: one
folders:

- title: ChildProductData (M2)
output: web
folderitems:
- title: Description
url: "#description"
output: web
- title: Key Features
url: "#key-features"
output: web
- title: Usage Instructions
url: "#usage-instructions"
output: web
- title: Requirements
url: "#requirements"
output: web
- title: Compatibility
url: "#compatibility"
output: web
- title: Installation Instructions
url: "#installation-instructions"
output: web
- title: Troubleshooting
url: "#troubleshooting---i-installed-the-extension-but-it-does-not-work"
output: web
- title: Uninstallation
url: "#uninstallation"
output: web
- title: Support
url: "#support"
output: web
- title: Licence
url: "#licence"
output: web
- title: Copyright
url: "#copyright"
output: web
39 changes: 23 additions & 16 deletions _data/sidebars/home_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@ entries:
levels: one
folders:

- title: Extensions
- title: Extensions (Magento 2)
output: web
folderitems:
- title: ConfigurableTierPrices (Magento 1)
url: /tier-prices-for-configurable-products-m1.html
output: web
- title: ConfigurableTierPrices (Magento 2)
url: /tier-prices-for-configurable-products-m2.html
output: web
- title: MassUpdateTierPrices (Magento 2)
url: /mass-update-tier-prices-m2.html
output: web
# - title: ProductBadges (Magento 1)
# url: /product-badges-m1.html
# output: web
# - title: BankIntegration
# url: /bank-integration-m1.html
# output: web
- title: ChildProductData
url: /child-product-data-m2.html
output: web
- title: ConfigurableTierPrices
url: /tier-prices-for-configurable-products-m2.html
output: web
- title: MassUpdateTierPrices
url: /mass-update-tier-prices-m2.html
output: web
- title: Extensions (Magento 1)
output: web
folderitems:
- title: ConfigurableTierPrices
url: /tier-prices-for-configurable-products-m1.html
output: web

# - title: ProductBadges (Magento 1)
# url: /product-badges-m1.html
# output: web
# - title: BankIntegration
# url: /bank-integration-m1.html
# output: web
3 changes: 3 additions & 0 deletions _data/topnav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ topnav_dropdowns:
folderitems:
- title: ConfigurableTierPrices (Magento 1)
url: /tier-prices-for-configurable-products-m1.html
- title: ChildProductData (Magento 2)
url: /child-product-data-m2.html
output: web
- title: ConfigurableTierPrices (Magento 2)
url: /tier-prices-for-configurable-products-m2.html
- title: MassUpdateTierPrices (Magento 2)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions pages/child-product-data-m2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: Child Product Data for Magento 2
permalink: child-product-data-m2.html
summary: "The extension Child Product Data for Magento 2 is a powerful module for Magento, designed to enhance the user experience and provide customers with detailed information about products. With this module installed, customers can directly access the data of child products associated to a configurable product."
sidebar: cpd_m2_sidebar
toc: false
---

## Description

On a configurable product page, you usually only see the attribute data of the configurable product itself. This extension allows you to display the data of the child products on this page and the values are dynamically changed as soon as you choose a different child product. This way, customers can easily compare the data of the child products and make a well-informed decision.

### Key Features:

1. **Dynamic Change of Product Data:** As soon as a customer chooses an option of a configurable product, the values of the following attributes are adapted:
- Product Name
- SKU
- Short Description
- Description
- "More Information" Block
- Related Products
- Upsell Products
2. **Seamless Hyv&auml; Compatibility:** The extension is fully compatible with the Hyv&auml; theme, ensuring a smooth integration and an aesthetically pleasing presentation. Your online store can now leverage the power of Hyv&auml;'s modern design and user-friendly interface while providing enhanced product information.
3. **Universal Hyv&auml; Theme Support:** The extension is not only compatible with the default Hyv&auml; theme. It works also with any Hyv&auml; child theme. You only need to enter the fitting identifiers in the system configuration, and the module will do the rest.
4. **Developer-Friendly Architecture:** For developers, Child Product Data offers an easily integrable solution with well-documented code. It follows the Magento 2 coding standards and best practices.

## Usage Instructions
Child Product Data is by default built for a clean Hyv&auml; Theme.
If you're using Hyv&auml; or a child theme without any adaptions to the product page, you do not need to configure anything at all.
It will work directly out of the box. The only exception are the related and upsell products. Here, we're still waiting for a Hyv&auml; update to make it work out of the box. Until then, please include the changes from [this Merge Request](https://gitlab.hyva.io/hyva-themes/magento2-default-theme/-/merge_requests/979/diffs){:target="_blank"} in your custom theme.
As soon as you have a different HTML structure on your product page, you simply need to fill in the fitting identifiers under Store > Config > Catalog > Catalog > Child Product Data.
Please mind, that a specific attribute could be included at several spots on the page. For example the name of the product is also included in the breadcrumbs. In this case, please enter each identifier in a new line.
To find out which identifiers you need to use, you can simply inspect the HTML of your product page and look for the fitting elements.

![Settings configuration]({{ "images/child-product-data/child-product-data-settings-fields.png" }} "Settings configuration")

After entering the correct identifiers, please save the configuration and clear the cache. From now on, as soon as you choose a child product, the module will show the child data for the identifiers you configured, for example the adapted product name or the SKU.
If you do not want to change the data for a specific attribute, you can simply leave the field empty.

![Output]({{ "images/child-product-data/child-product-data-output.png" }} "Product page with changed child data (e.g. breadcrumbs, title, SKU)")

## Requirements
- hyva-themes/magento2-default-theme: `~1.0`
- magento/framework: `~102.0||~103.0`
- magento/module-catalog: `~103.0||~104.0`
- magento/module-configurable-product: `~100.4`
- magento/module-eav: `~102.0`
- magento/module-store: `~101.0`
- php: `~7.4.0||~8.1.0||~8.2.0`

## Compatibility
- Hyv&auml; Theme >= `1.0.0`
- Magento >= `2.4`

## Installation Instructions
The installation procedure highly depends on your setup. In any case, you should use a version control system like git and test the installation on a development system.
If you are using composer (you should!) and downloaded the extension from the Marketplace or have set up your own composer repository, we recommend installing via composer.

### Composer Installation
1. `composer require customgento/module-child-product-data`
2. `bin/magento module:enable CustomGento_ChildProductData`
3. `bin/magento setup:upgrade`
4. `bin/magento setup:di:compile`
5. `bin/magento cache:flush`

### Manual Installation
1. unzip the downloaded files
2. create the directory `app/code/CustomGento/ChildProductData/`: `mkdir -p app/code/CustomGento/ChildProductData/`
3. copy the unzipped files to the newly created directory `app/code/CustomGento/ChildProductData/`
4. `bin/magento module:enable CustomGento_ChildProductData`
5. `bin/magento setup:upgrade`
6. `bin/magento setup:di:compile`
7. `bin/magento cache:flush`

## Troubleshooting - I installed the extension, but it does not work
1. Do you use the latest version of the extension?
2. Do you use Magento >= 2.4?

## Uninstallation
The uninstallation procedure depends on your setup:

### Uninstallation After Composer Installation
1. `bin/magento module:uninstall CustomGento_ChildProductData`
2. `bin/magento setup:di:compile`
3. `bin/magento cache:flush`

### Uninstallation After Manual Installation
1. `bin/magento module:disable CustomGento_ChildProductData`
2. `bin/magento setup:di:compile`
3. `bin/magento cache:flush`
4. `rm -r app/code/CustomGento/ChildProductData`

## Support
If you have any issues with this extension, feel free to [contact us](https://www.customgento.com/){:target="_blank"}!

## Licence
[CustomGento Commercial Software Licence](https://www.customgento.com/license){:target="_blank"}

## Copyright
&copy; 2023 - present CustomGento GmbH

0 comments on commit 3f19655

Please sign in to comment.