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

remove cart attributes with specific value from cart!

Started by thanili, July 25, 2013, 13:20:45 PM

Previous topic - Next topic

thanili

Hello guys,

I am trying to figure out how i could remove from shopping cart view, cart attributes (boolean) with '0' value.

Check screenshot 1, where is the product configuration. There are 6 optional (No/Yes) boolean cart attributes.

Check screenshot 2, where the shopping cart is shown. I would like to remove all rows that represent cart attributes not selected by user.

So, i would like to have only "Base Size 46, Additional Size 38, Additional Size 42" in the shopping cart.

I think that the associated file is \templates\my_template\html\com_virtuemart\cart\default_pricelist.php

where in line ~ 155:

<span class="cart-images">
<?php
if (!empty($prow->image)) {
echo $prow->image->displayMediaThumb (''FALSE);
}
?>

</span>
<?php ?>
<?php 
//HERE WE PRINT THE ITEMS!!!! WE SHOULD CHECK IF BINARY AND VALUE IS ZERO DO NOT PRINT!!!
echo JHTML::link ($prow->url$prow->product_name) . $prow->customfields?>


But where i can alter $prow->customfields content ? or how can i make in this place?


[attachment cleanup by admin]

Maxim Pishnyak

Why base size is not a parent product and add size is not a child product?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

thanili

Because when i asked the same question in this forum nobody replied :) ...

all these products are electronic and i bought the digitoll plugin in order to implement it ... it is very easy to just add cart attributes in order to have downloable additional options for each product ...

Maxim Pishnyak

Quote from: thanili on July 25, 2013, 16:49:32 PM
easy
I couldn't guarantee that everything will be easy, but still almost everything is possible.

Let's start with parent/childs?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

thanili

OK Maxim...

so if i have 1 parent product with 4 child products could the visitor select to buy the parent product and multiple chlid products?

if yes i will give it a try ...

Maxim Pishnyak

#5
What is the point of parent product in your case? Could you elaborate more?
For example could be parent ordered alone?

Also see what could propose you custom extension called Catproduct.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

thanili

OK the case is the following:

e-products are selled which are fashion designs. Each product has a base size (e.g. 38) which costs "A" <- Base (or parent(?)) product/size

user must be able to select additional sizes to buy (e.g. 40,42,44,46,48) each one costing "B" <- Additional (or child(?)) products/sizes

i think it is clear ...




Maxim Pishnyak

Ok, so try to make one demo parent+childs product somewhere. And see what is it.

I just not sure what layout do you want in a result.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart