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

Add param product_count_visible_only loop category #2356

Merged
merged 4 commits into from
Feb 21, 2017
Merged

Add param product_count_visible_only loop category #2356

merged 4 commits into from
Feb 21, 2017

Conversation

zzuutt
Copy link
Contributor

@zzuutt zzuutt commented Feb 16, 2017

To match the doc -> loop category
add param 'product_count_visible_only'
if 'need_product_count' and 'product_count_visible_only' are true
'PRODUCT_COUNT' return only the visible products

* @return int
*/
public function countAllProductsVisibleOnly()
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Au lieu de recopier la fonction countAllProducts() pour juste ajouter le filtre par visibilité, il vaut mieux ajouter à countAllProducts() un paramètre visibleOnly qui est false par defaut. On ajoute le filtre par visibilité si ce paramètre est true.

Du coup, on aurait :

public function countAllProductsVisibleOnly() {
    return countAllProducts(true);
}

Plus de recopie de code :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

j'ai modifié

Copy link
Contributor

Choose a reason for hiding this comment

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

Merci ! Peux-tu rebaser ?

Copy link
Contributor Author

@zzuutt zzuutt Feb 21, 2017

Choose a reason for hiding this comment

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

je ne suis pas sur que cela ait marché

Copy link
Contributor

Choose a reason for hiding this comment

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

On dirait que si :)

To match the doc -> loop category
add param 'product_count_visible_only'
if 'need_product_count' and  'product_count_visible_only' are true
'PRODUCT_COUNT' return only the visible products
@roadster31 roadster31 merged commit fab913b into thelia:master Feb 21, 2017
@roadster31
Copy link
Contributor

Merci 👍

@zzuutt
Copy link
Contributor Author

zzuutt commented Feb 22, 2017

De rien :)
C'est avec plaisir !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants