Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRO-172 Ability to see product illustrations in the storefront when t… #1054

Merged
merged 1 commit into from
Jul 31, 2017

Conversation

liuchanggang
Copy link

@liuchanggang liuchanggang commented Jul 27, 2017

…he product catalog is empty

What?

Part of CRO-9. show demo products on product on Cornerstone theme home page when inventory is empty

When there is not inventory data in DB. we inject a data array in resource with negative product ids.
At Cornerstone side, when id is negative, we hide the URL and Quick View.

Tickets / Documentation

https://jira.bigcommerce.com/browse/CRO-172

https://launchbay.bigcommerce.net/projects/1/releases/36743

Screenshots (if appropriate)

screen shot 2017-07-27 at 2 01 39 pm

@bigcommerce/cp-dt @mcampa @junedkazi

@bc-nataliya
Copy link
Contributor

you will need to add an entry under Draft in CHANGELOG.md. See example here https://github.com/bigcommerce/cornerstone/pull/1053/files

@mcampa
Copy link
Contributor

mcampa commented Jul 27, 2017

Make sure this doesn't break solano integration tests

CHANGELOG.md Outdated
@@ -1,6 +1,8 @@
# Changelog

## Draft
- When a store has empty product inventory, we show a set of sample products on homepage. For sample products they has no URL and not clickable. They also don't have quick view. Check if it is sample product by id > 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to rebase your branch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased.

@@ -16,14 +16,21 @@
</div>
{{/if}}
{{/or}}
<a href="{{url}}">
{{#if id '>' 0}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give some information what is this id & where is it coming from ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This id is product id which is the index key in product db table. id is a positive number and uniq for real products. For sample products we assign negative numbers to id.

On homepage, if there is no inventory products we display sample products with no URL and no Quick View.

CHANGELOG.md Outdated
@@ -3,6 +3,9 @@
## Draft
- Hide Info in footer if no address is provided in Store Profile. Hide Brands in footer if Merchant has no brands [#1053](https://github.com/bigcommerce/cornerstone/pull/1053)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no blank line pls

{{#if id '>' 0}}
<a href="{{url}}">{{name}}</a>
{{/if}}
{{#if id '<' 0 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use {{else}}

@@ -16,14 +16,21 @@
</div>
{{/if}}
{{/or}}
<a href="{{url}}">
{{#if id '>' 0}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can omit the >

{{#if id}}...{{/if}}

CHANGELOG.md Outdated
@@ -2,6 +2,8 @@

## Draft
- Hide Info in footer if no address is provided in Store Profile. Hide Brands in footer if Merchant has no brands [#1053](https://github.com/bigcommerce/cornerstone/pull/1053)
- When a store has empty product inventory, we show a set of sample products on homepage. For sample products they has no URL and not clickable. They also don't have quick view. Check if it is sample product by id > 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this part For sample products they has no URL and not clickable. They also don't have quick view. Check if it is sample product by id > 0.. We should keep it simple & concise.

<figcaption class="card-figcaption">
<div class="card-figcaption-body">
{{#unless hide_product_quick_view}}
{{#if theme_settings.show_product_quick_view}}
<a href="#" class="button button--small card-figcaption-button quickview" data-product-id="{{id}}">{{lang 'products.quick_view'}}</a>
{{#if demo '!==' true}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to unless demo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deepa2083
Copy link

💚

@liuchanggang liuchanggang merged commit a99227f into bigcommerce:master Jul 31, 2017
@liuchanggang liuchanggang deleted the CRO-172 branch July 31, 2017 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants