eugeniorubenjauregui / store-framework

https://lab.github.com/vtex-trainings/store-framework
0 stars 0 forks source link

Product page #12

Open github-learning-lab[bot] opened 3 years ago

github-learning-lab[bot] commented 3 years ago

Página de producto

:sparkles: Branch: pdp

Introducción

Una vez terminada la página inicial de nuestra tienda, comenzamos un nuevo template de la tienda: la página de producto. Las páginas de producto son probablemente el template que más tienen bloques diferentes, lo que las hace extremadamente personalizables y flexibles.

MVP

Así que construyamos una página de producto mínima donde solo tengamos lo esencial:

image

Bloques de producto

La mayoría de los bloques de producto, a diferencia de los de contenido, tienen un contexto en el que están insertados. Todo esto hace que estos bloques sean un poco plug-n-play: colocar un product-images en la página de producto, automáticamente redenrizará las imágenes del producto de la página, tal como se hace con el precio y el nombre.

Sin embargo, nada de esto significa que estos bloques sean poco personalizables, como veremos más adelante.

Actividad

Haga clic en un producto para ir a la página del producto. Construya la página usando los bloques product-images, product-price, product-name y buy-button en el archivo product.jsonc declarado dentro de la carpeta store/blocks . Esperamos que en la estructura tengamos:

  1. Una línea en store.product .

    {
    "store.product": {
        "children": [
          "flex-layout.row#main"
        ]
      }
    }
  2. Dentro de la línea debe haber dos columnas.

    "flex-layout.row#main": { 
      "props": { 
        "marginTop": 6
      },
      "children": [
        "flex-layout.col#left",
        "flex-layout.col#right"
      ]
    }
  3. Dentro de la columna de la izquierda debe haber un product-images.

    "flex-layout.col#left": {
      "children": [
        "product-images"
      ]
    }
  4. Dentro de la columna derecha debe estar el product-name, product-price y buy-button.

Además, queremos que:

  1. La columna derecha esté verticalmente alineada al centro (vea las props verticalAlign y preventVerticalStretch en la documentación de Flex Layout Column).
  2. El product-price muestre el ahorro total y el precio de lista (showSavings y showListPrice).

:information_source: Recuerde acceder a la documentación del product-images, product-price, product-name y buy-button si tiene alguna duda durante la actividad.


:no_entry_sign: ¿Perdido?

¿Hay algún problema con este paso? ¿Qué tal si nos envía un feedback? :pray:

Crear feedback


Si aún tiene alguna duda sobre cómo enviar su respuesta, puede revisar aquí.

github-learning-lab[bot] commented 3 years ago

¡Ha completado este paso con éxito!

Vaya al siguiente paso!

vtex-course-hub[bot] commented 3 years ago

Oopsie, something went wrong :crying_cat_face:

Results

:white_check_mark::white_check_mark::x::x::x::x:

Tests

:white_check_mark: Getting the files :white_check_mark: Code compilation :x: You didn't declare a breadcrumb :x: You didn't use a product-identifier.product :x: You didn't use and define a flex-layout.row in the right col with sku-selector and product-quantity :x: There isn't a shipping-simulator on the right column

Try again :grin:

vtex-course-hub[bot] commented 3 years ago

Oopsie, something went wrong :crying_cat_face:

Results

:white_check_mark::white_check_mark::white_check_mark::x::white_check_mark::x:

Tests

:white_check_mark: Getting the files :white_check_mark: Code compilation :white_check_mark: Use a breadcrumb :x: You didn't use a product-identifier.product :white_check_mark: Create a row inside the right col with quantity and sku selectors :x: There isn't a shipping-simulator on the right column

Try again :grin:

vtex-course-hub[bot] commented 3 years ago

Oopsie, something went wrong :crying_cat_face:

Results

:white_check_mark::white_check_mark::white_check_mark::white_check_mark::x::x:

Tests

:white_check_mark: Getting the files :white_check_mark: Code compilation :white_check_mark: Use a breadcrumb :white_check_mark: Used a product identifier :x: You didn't use and define a flex-layout.row in the right col with sku-selector and product-quantity :x: There isn't a shipping-simulator on the right column

Try again :grin:

vtex-course-hub[bot] commented 3 years ago

Oopsie, something went wrong :crying_cat_face:

Results

:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::x:

Tests

:white_check_mark: Getting the files :white_check_mark: Code compilation :white_check_mark: Use a breadcrumb :white_check_mark: Used a product identifier :white_check_mark: Create a row inside the right col with quantity and sku selectors :x: There isn't a shipping-simulator on the right column

Try again :grin:

vtex-course-hub[bot] commented 3 years ago

You did great! :grin:

Results

:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:

Tests

:white_check_mark: Getting the files :white_check_mark: Code compilation :white_check_mark: Use a breadcrumb :white_check_mark: Used a product identifier :white_check_mark: Create a row inside the right col with quantity and sku selectors :white_check_mark: Define a shipping simulator in the right column