News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

editing category views distorts the display

Started by guybr, October 29, 2014, 08:06:49 AM

Previous topic - Next topic

guybr

Hi, I created a working conditional command (for the VM homepage) to display 3 columns of products if a device is mobile (I hardcoded the variables), or to use the CP setting for number of columns if otherwise - and it works perfectly.

However, if I use the same approach on the category view (default.php and categories.php) - only the mobile command renders well, and ironically the original php command to determine the number of columns as per the Control Panel yields a distorted display:
- The product browse section displays various numbers of products per line - their containers are stretched more or less than they should be
- the category listings at the top of the page are no longer centered (but do at least adhere to the CP setting of 4 columns)

What am I doing wrong? Why should the original php commands not manage to get the PC to display the page as it always did? Is there something unique to the coding of the category view that makes it harder to edit?

I'm using VM 2.6.6

UPDATE: just noticed what may be the problem - but I have no idea why: with the changes I made as above, on PC the <h2> product name doesn't text-wrap: it displays the text on 1 line - and if that line is long, so it the product display box... but why?? Oddly on mobile, it renders just like it should...

I tried adding a text-wrap command to the css but it doesn't fix the problem. Here's the css for the product title display: (the same coding works fine on VM homepage, so again, what is unique about the Category view??)

.productlistingtitlebox {
   max-width: 100%;
   height: 85px;
   width: auto;
   display: block;
   background-color: #f5f5dc;
   overflow: hidden;
        padding: 2px 2px 2px 2px;
   font-size: 100%;
   border-top:solid #D2B48C 1px;
   border-right:solid #D2B48C 1px;
   border-left:solid #D2B48C 1px;
   word-wrap:break-word;
}

GJC Web Design

without a live url it is very doubtful anyone can help

also 2.6.6 is out of date and unsafe.
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

guybr


GJC Web Design

nope - that then becomes paid consultancy... or if you want to employ me...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation