lat9 / ZCA-Bootstrap-Template

A Bootstrap-4 template for Zen Cart versions 1.5.8 through 2.1.0. Forked from https://github.com/zcadditions/ZCA-Bootstrap-Template-for-1.5.6-v2.0.0c. See the demo site, below, for additional information.
https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=index
GNU General Public License v3.0
4 stars 14 forks source link

Correct product-listing/category-row display for 'columns' display #359

Closed proseLA closed 5 months ago

proseLA commented 6 months ago

i'm not really sure how people use this template out of the box. maybe i am missing something.

i think i am using this with all of the default settings.

my layout style based on that is now columns.

based on that, i now have a percentage for column width as dictated by this code:

https://github.com/lat9/ZCA-Bootstrap-Template/blob/369f28873e647fc80a55f58bd216ea0f39a632e6/includes/modules/bootstrap/product_listing.php#L122-L130

given the fact that there are only 3 products in this category, i now have a column width of 32.5; which looks to be a percentage as dictated here:

https://github.com/lat9/ZCA-Bootstrap-Template/blob/369f28873e647fc80a55f58bd216ea0f39a632e6/includes/modules/bootstrap/product_listing.php#L392-L394

and now, we use that with in-line styling (noooooo!!!!!!) here:

https://github.com/lat9/ZCA-Bootstrap-Template/blob/369f28873e647fc80a55f58bd216ea0f39a632e6/includes/modules/bootstrap/product_listing.php#L395-L396

and then it finally gets output here:

https://github.com/lat9/ZCA-Bootstrap-Template/blob/369f28873e647fc80a55f58bd216ea0f39a632e6/includes/templates/bootstrap/common/tpl_columnar_display.php#L30-L43

which is already a div within a div within a div. which is fine. except the product display is now 32.5% of the column as opposed to 32.5% of the viewporrt.

see:

image

what might i be missing?

removing the $style on line 396 above seems to resolve the issue. see:

image

again, what might i be missing here?

lat9 commented 6 months ago

This configuration setting's directions: image

Combined with this Wiki article.

proseLA commented 6 months ago

this does not explain the problem that i have presented.

you are explicitly stating that you do not recommend using a number other than 0 or 1. but if one chooses to use a non recommended number, the calculation is completely wrong. is that why it is not recommended?

0 or 1 is either fluid or row. so you do not recommend column. the only time this style error occurs is in a non recommended setting, ie column.

so again, given that we are now in a non-recommended setting (which i can only mean non-supported) why is that in-line style width there? it makes no sense to me. and i think it should be removed.

unless you can present a situation where that in-line style would be correct. which i would be more than willing/anxious to hear.

lat9 commented 6 months ago

Thanks for sussing that out; same issue applies to the category_row.php module.