Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 13, 2026

Motivation

  • The last slide in the Prettyblock Best Sales slider could wrap into two rows instead of staying on a single carousel slide.
  • The column width calculation used ceil(12 / x), which could produce column classes that make the total width exceed 12 and cause wrapping.
  • A minimum column width is required to avoid generating col-0 classes when items_per_slide is greater than 12.

Description

  • Replace {math equation="ceil(12 / x)" ...} with {math equation="floor(12 / x)" ...} for mobile, tablet and desktop column width calculations in views/templates/hook/prettyblocks/prettyblock_best_sales.tpl.
  • Add guards that set each computed column width to 1 when the result is less than 1 to prevent zero-width columns.
  • The change updates how productColumnClasses are built so slides no longer overflow their row width.

Testing

  • No automated tests were run for this change.

Codex Task

@CySSoO CySSoO merged commit 23ed32c into master Jan 13, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants