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

New: works with variants #9729

Merged
merged 8 commits into from
Oct 16, 2018
Merged

New: works with variants #9729

merged 8 commits into from
Oct 16, 2018

Conversation

simnandez
Copy link
Member

@simnandez simnandez commented Oct 11, 2018

  • If product is parent showing stock of childs and not itself
  • Add function hasVariants for knowing if product has variants

Juanjo Menent added 4 commits October 11, 2018 12:08
- If product is parent showing stock of childs and not itself
- Add function hasVariants for know if product has variants
- Hide child products into list if PRODUIT_ATTRIBUTES_HIDECHILD is activated
- Make the checkbox working correctly
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= '<input type="checkbox" id="search_hidechildproducts" name="search_hidechildproducts" value="on"'.($search_hidechildproducts ? 'checked="checked"' : '').'>';
$moreforfilter.= ' <label for="search_hidechildproducts">'.$langs->trans('HideChildProducts').'</label>';
$moreforfilter.= '<input type="checkbox" id="show_childproducts" name="show_childproducts"'.($show_childproducts ? 'checked="checked"':'').'>';
Copy link
Member

Choose a reason for hiding this comment

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

the name of fields used into the search criteria must always start with "search_" (if not, it breaks the feature to save criteria when leaving a page and going back on it). Can you rename it into search_showchildproducts ?

@eldy eldy added the PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) label Oct 12, 2018
@simnandez simnandez removed the PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) label Oct 15, 2018
@simnandez
Copy link
Member Author

@eldy I fixed it!

Juanjo Menent added 2 commits October 15, 2018 12:45
@eldy eldy merged commit d43e1fc into Dolibarr:develop Oct 16, 2018
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.

2 participants