Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - FashionMart (SKU# FLEX-00008)

TOPIC: Category listview problem

Category listview problem 11 years 4 months ago #1612

Hi,

When I change to listview there is an option to select the child products. There are all kinds of products in this list but not the child products. What am I doing wrong? Tried to upload an older catergory default.php ; same result.
wilbert.nl


Attachment listview.jpg not found



Cheers,

Jan-Willem
The topic has been locked.

Category listview problem 11 years 4 months ago #1626

Hi,

We are aware of that issue, "Generic Child Variant" type custom field just doesn't work in the "category browse page". So we hided the "custom field" element if the custom field is "Generic Child Variant" (hiding them was the only appropriate solution)

I just resent to you the most recent version of FashionMart which includes the patch.
Please use this new version, and this issue will be gone.
Regards.
The topic has been locked.

Category listview problem 11 years 4 months ago #1639

Hi,

I've updated the category folder. There's still a problem; It's possible to order a parrent product in the list view. Is is easy for me to switch off the 'add to cart"(voeg toe button) in list view? Switching off List View would also be an option.

Thanks agian!

Jan-Willem
The topic has been locked.

Category listview problem 11 years 4 months ago #1657

Hi,

Yes, you can disable the "Add to cart" button from LISTVIEW.

First open the Category browse page PHP file:
ROOT/templates/<yourjoomlatemplatefolder>/html/com_virtuemart/category/default.php

(BE AWARE: you need to make this change in the category browse page that you have chose through VM Configuration. IF you choose "default" then the file is "default.php", or if you choose defaultlist, then the file is "defaultlist.php".. same thing for "flexv2" and "flexv2list"....understand?, there are 4 different category browse page versions, and you are using only one of them..)

Anyway (let say, you are using default, so your file is "default.php"). The PHP line to generate the "add to cart" button in the list view is this:
<?php // Add To Cart Button
				if (!VmConfig::get('use_as_catalog', 0) and (number_format($product->prices['salesPrice'], 0, ',', '.'))) {?>
				<div class="FlexibleWebaddtocart-area">
 
					<form method="post" class="product js-recalculate" action="index.php" >
					<?php // Product custom_fields
					if (!empty($product->customfieldsCart)) {  ?>
 
						<?php foreach ($product->customfieldsCart as $field)
						{ 
						if ($field->field_type !== "A") {?>
                        <div class="FlexibleWeb-product-fields">
                        	<div style="text-align:left;" class="product-field product-field-type-<?php echo $field->field_type ?>">
							<span class="product-fields-title" ><b><?php echo  JText::_($field->custom_title) ?></b></span>
								<?php if ($field->custom_tip) echo JHTML::tooltip($field->custom_tip,  JText::_($field->custom_title), 'tooltip.png'); ?>
 
                            <span class="product-field-display"><?php echo $field->display ?>
 
                            <div class="clear"></div>
                            </span>
 
							<span class="product-field-desc"><?php echo $field->custom_field_desc ?></span>
							</div> 
                        </div>    
							<?php
						}
						}
						?>
 
					<?php }
					 /* Product custom Childs
					  * to display a simple link use $field->virtuemart_product_id as link to child product_id
					  * custom_value is relation value to child
					  */
 
					if (!empty($product->customsChilds)) {  ?>
						<div class="product-fields">
							<?php foreach ($product->customsChilds as $field) {  ?>
								<div style="display:inline-block;float:right; padding:3px;" class="product-field product-field-type-<?php echo $field->field->field_type ?>">
								<span class="product-fields-title" ><b><?php echo JText::_($field->field->custom_title) ?></b></span>
								<span class="product-field-desc"><?php echo JText::_($field->field->custom_value) ?></span>
								<span class="product-field-display"><?php echo $field->display ?></span>
 
								</div> 
								<?php
							} ?>
						</div>
					<?php } ?>
 
				<div class="Flexibleaddtocart-bar">
 
						<?php // Display the quantity box ?>
						<!-- <label for="quantity<?php echo $product->virtuemart_product_id;?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
 
						<input type="hidden" class="quantity-input" name="quantity[]" value="1" />
 
 
						<?php // Display the quantity box END ?>
 
						<?php // Add the button
						$button_lbl = JText::_('COM_VIRTUEMART_CART_ADD_TO');
						$button_cls = 'addtocart-button'; //$button_cls = 'addtocart_button';
						$button_name = 'addtocart'; //$button_cls = 'addtocart_button';
 
 
						// Display the add to cart button
						$stockhandle = VmConfig::get('stockhandle','none');
						if(($stockhandle=='disableit' or $stockhandle=='disableadd') and ($product->product_in_stock - $product->product_ordered)<1){
							$button_lbl = JText::_('COM_VIRTUEMART_CART_NOTIFY');
							$button_cls = 'notify-button';
							$button_name = 'notifycustomer';
						}
						vmdebug('$stockhandle '.$stockhandle.' and stock '.$product->product_in_stock.' ordered '.$product->product_ordered);
						?>
						<span class="addtocart-button">
							<?php if ($button_cls == "notify-button") { ?>
                            <span class="outofstock"><?php echo JText::_('COM_VIRTUEMART_CART_PRODUCT_OUT_OF_STOCK'); ?></span>
 
                            <?php } else {?>
 
                            <input type="submit" name="<?php echo $button_name ?>"  class="<?php echo $button_cls ?>" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
 
 
 
 
                            <?php } ?>
						</span>
 
					<div class="clear"></div>
				</div>
 
					<?php // Display the add to cart button END ?>
					<input type="hidden" class="pname" value="<?php echo $product->product_name ?>" />
					<input type="hidden" name="option" value="com_virtuemart" />
					<input type="hidden" name="view" value="cart" />
 
					<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>" />
					<?php /** @todo Handle the manufacturer view */ ?>
					<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
					<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
					</form>
 
 
			</div>
				<?php }  // Add To Cart Button END ?>

(more or less it is the same in all other category browse page versions. And usually it is located around 347th-451st lines)

Remove them completely and the "add to cart" button in the LISTVIEW will be gone.

Regards.
Forum Support.
The topic has been locked.

Category listview problem 11 years 4 months ago #1688

Thanks again!!

Jan Willem
The topic has been locked.

Category listview problem 11 years 4 months ago #1706

Your welcome.

Case solved. Topic is closed.
The topic has been locked.
Time to create page: 0.124 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo