News:

Support the VirtueMart project and become a member

Main Menu

Layout for products in category VM 3.0.11

Started by MarioP, October 21, 2015, 13:58:54 PM

Previous topic - Next topic

MarioP

Hi,
I don't really know what can be wrong but it has something to do with the code:
\components\com_virtuemart\sublayouts  products.php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart'))); ?>

Now I have strange situation when in comes to the products listing in the category view - some of them have all the custom fields assigned to them in that view, some don't. .. I really can't figure out why...

What I can say more that using old VM.3.0.8 code
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row])); ?>
I see no problem with that...

Milbo

It is the position, the first line has array('ontop', 'addtocart'), so all customfields with pos ontop, addtocart are added.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));

will only show add to cart/custom fields assigned to the ontop posistion
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

MarioP

#3
Quote from: GJC Web Design on October 21, 2015, 14:38:39 PM
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));

will only show add to cart/custom fields assigned to the ontop posistion
Yep, that's obvious but how would you explain the fact that the same custom fields are visible in some of the products, and in some aren't... (layout2.jpg)

Moreover  - when we have a lot of those fields the category layout looks terrible....(layout.jpg)

GJC Web Design

QuoteYep, that's obvious but how would you explain the fact that the same custom fields are visible in some of the products, and some aren't...

no idea... check, check and double check

if some do and some don't then there is a difference..

QuoteMoreover  - when we have a lot of those fields the category layout looks terrible....(attachment 2)

well that is what templating is .. if the stock template doesn't suit you, you redesign an over ride

Do u think the stock template has to suit every single users possibility?

I have built many many VM sites but have yet to have a client that required so many customs on a cat layout..  personally I would get rid of them and only have on the details

Who buys a subwoofer just from an over view page?
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

Milbo

Quote from: GJC Web Design on October 21, 2015, 14:38:39 PM
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));

will only show add to cart/custom fields assigned to the ontop posistion
array('ontop', 'addtocart')
both, else just use 'ontop', for example
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

Quote from: GJC Web Design on October 21, 2015, 15:24:58 PM
Do u think the stock template has to suit every single users possibility?
Of course not  - it's impossible. I think it shouldn't change proven, goods things above all. If users wanted that kind of solution  - it's ok - I'm just one of millions... :) It's different than was  - mainly that's why I have reported it, by the way it doesn't look good for me...
Quote from: GJC Web Design on October 21, 2015, 15:24:58 PM
I have built many many VM sites but have yet to have a client that required so many customs on a cat layout..  personally I would get rid of them and only have on the details
I can't get rid of them  - they are very useful :) I use them to comparison tables for example...
Quote from: GJC Web Design on October 21, 2015, 15:24:58 PM
no idea... check, check and double check
I'll definitely do that - because there's very strange behaviour.

MarioP

#7
No matter how strange it sound but it looks that either there's some bug in the code or it's an intentional acting albeit very confusing for me...

For me it looks as follow:
1. When a product has assigned 'addtocart' type of custom fields then also 'ontop' types are appearing in category view.
2. When a product has assigned only 'ontop' type of custom fields they're not showing up in the category view.
3. (very strange) When only one of the products in a particular category has assigned 'addtocart' type of custom fields then all the products visible in the same row as that one are displayed with custom fields what is a denial of the 2 point.

That's the reason why in one category I have products with and without custom fields... I think so..

Can be that way???

lindapowers

In our case the template didnt have other optional positions so the only one that currently works is "addtocart" position.

The rest as in yout case they don't apper.

So just make sure first your template is actually showing positions..

Regards

MarioP

I thought they should appear both - if I want just 'on top' I remove 'add to cart' and vice versa :
Quote from: Milbo on October 21, 2015, 15:46:34 PM
array('ontop', 'addtocart')
both, else just use 'ontop', for example
For me it works that way:
Quote from: MarioP on October 22, 2015, 15:46:21 PM
1. When a product has assigned 'addtocart' type of custom fields then also 'ontop' types are appearing in category view.
2. When a product has assigned only 'ontop' type of custom fields they're not showing up in the category view.
3. (very strange) When only one of the products in a particular category has assigned 'addtocart' type of custom fields then all the products visible in the same row as that one are displayed with custom fields what is a denial of the 2 point.

That's the reason why in one category I have products with and without custom fields... I think so..