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

TOPIC: Category with multiple choice

Category with multiple choice 9 years 5 months ago #11037

Hi, My client entered new products with different colors, changing to one that no longer exists in stock all other products in the category are the same term.

I create a test website here: linsconsultoria.com.br/lp/index.php?option=com_virtuemart&view=category&virtuemart_category_id=29&categorylayout=0&Itemid=280

Try change the first product (dropbox) from BRANCA to BEGE, after this, change the third product, all products assume 3-5 dias or 1-2 meses or nothing.

The original website: www.lojaportello.com.br

Tks
Last Edit: 9 years 5 months ago by Jose Carlos Lins.
The administrator has disabled public write access.

Category with multiple choice 9 years 5 months ago #11057

hi,

Hi,

Normally the Add to cart button and the custom fields are hidden in the category browse page by default Virtuemart Category (as you might know). This is something we brought to Virtuemart. But since we are developing template and templates are working based on "template overriding". There is no way to touch the way the event handler works. Those handlers run by Virtuemart core files. Templates basically change the "look" only, (not "functionality")

We have noticed this failure in Generic Child Variant and Stockable Custom Field Plugin long time ago and taken out the those 2 custom fields from the category page.

It didn't work because when multiple products have the Generic Child variants, the 1st one's selection applies to all others, because jQuery gets involved.

I have personally spent lots of hours to make this work (for generic child variant and Stockable Custom Field Plugin on category browse page) but i ended up with nothing. It just doesn't work.

But on the other hand, the simple custom fields (Cart Variant, Image Type Custom Field, etc..) works just fine on the category browse page ListView.

We have applied this patch long time ago to all of our templates. But apparently we forgot it for FlexibleMart.

To hide the custom fields from Category page (if Generic Child Variant and Stockable Custom Field Plugin is being used) follow these steps;

1- open this category browse page PHP file:

/templates/YOUR_TEMPLATE/html/com_virtuemart/category/default.php
default.php, flexv2,php, flexv3.php or flexv4.php depends on what layout you are using

2- look for this line:
<?php // Add To Cart Button
 if (!VmConfig::get('use_as_catalog',0)) { ?>

3- replace it with this:
<?php
$customFieldCheck = 1;
if (!empty($product->customfieldsCart)) {
	foreach ($product->customfieldsCart as $field) {
		if (($field->field_type == "E") || ($field->field_type == "A")) {
		 $customFieldCheck = 0;
		}
	}
}
 // Add To Cart Button
if (!VmConfig::get('use_as_catalog',0) && ($customFieldCheck)) { ?>
 

This coding modification will hide the "Custom fields and add to cart button" from category page (if Generic Child Variant and Stockable Cart Variant is being used). And disabling them is currently the "ONLY" way, otherwise you will get some incorrect orders and this will cause come bigger problems.

Regards,
Support
The administrator has disabled public write access.

Category with multiple choice 9 years 5 months ago #11067

Thank you, but it's frustrating that we can not display in this category.

I have another issue, when there is multiplicity in the product delivery time is not in the correct place.

See here with chied: linsconsultoria.com.br/lp/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=302&virtuemart_category_id=31&Itemid=317

See correct possition, without chield: linsconsultoria.com.br/lp/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=222&virtuemart_category_id=8&Itemid=137
The administrator has disabled public write access.

Category with multiple choice 9 years 5 months ago #11089

Hi,

The "delivery time image" on this page:
linsconsultoria.com.br/lp/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=302&virtuemart_category_id=31&Itemid=317

is "dynamic". Each time you change the generic child, the image also gets changed. The JS ruules to print the delivery image comes with this file:

plugins / vmcustom / stockable / stockable.php

the code is this:
if ("risetime" == stockhandle && found_child.product_availability) {
         $(".addtocart-area").after(\'<div class="availability">\' + found_child.product_availability + \'</div>\');
}

If you replace it with this:
if ("risetime" == stockhandle && found_child.product_availability) {
      $(".productdetails-view > table tr td:first-child").after(\'<td valign="middle"><div class="productdetail-boxes"><div class="productdetail-boxes-header">Envio</div><div class="availability">\' + found_child.product_availability + \'</div></div></td>\');
}

Then, the availability images should be inserted to the proper location. (I didn't test this code injection, feel free to modify it if it won't work)

Regards
Support
Last Edit: 9 years 5 months ago by Support.
The administrator has disabled public write access.

Category with multiple choice 9 years 3 months ago #11447

Tks

in time, for my second question:
I Change This:
$(".availability").remove();
				if ("risetime" == stockhandle && found_child.product_availability) {				
					$(".addtocart-area").after(\'<div class="availability">\' + found_child.product_availability + \'</div>\');					
				}
I change for this:
$(".availability").remove();
 
 
				if ("risetime" == stockhandle && found_child.product_availability) {				
					$(".productdetails-view > table tr td:nth-child(2)").css("visibility","hidden");
					$(".productdetails-view > table tr td:nth-child(2)").css("display","none");
					$(".productdetails-view > table tr td:first-child").after(\'<td valign="middle"><div class="productdetail-boxes"><div class="productdetail-boxes-header">Envio</div><div class="availability">\' + found_child.product_availability + \'</div></div></td>\');
				}

Because the code duplicate the second row, but some times the risetime not show


More one:
it's not possible to overrite this file? ( plugins / vmcustom / stockable / stockable.php ). see here: docs.virtuemart.net/tutorials/templating-layouts/101-how-to-overwrite-plugins.html
I tried and nothing happened


Another, in this file there is a change of the path where the images are fetched, when working with multiple, can You help me?

Thanks in advanced
Last Edit: 9 years 3 months ago by Jose Carlos Lins.
The administrator has disabled public write access.

Category with multiple choice 9 years 3 months ago #11448

I think, this is the code to change (but I don't know how):
if ($field->child[$child_id]['in_stock'] < 1) {
						if ($this->stockhandle == 'risetime' and VmConfig::get('rised_availability') and empty($stock->product_availability)) {
			    			$field->child[$child_id]['product_availability'] = (file_exists(JPATH_BASE . DS . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability')))
			    				? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability', '7d.gif'), VmConfig::get('rised_availability', '7d.gif'), array('class' => 'availability'))
			    				: $field->child[$child_id]['product_availability'] = VmConfig::get('rised_availability');
						} else if (!empty($stock->product_availability)) {
							$field->child[$child_id]['product_availability'] = (file_exists(JPATH_BASE . DS . VmConfig::get('assets_general_path') . 'images/availability/' . $stock->product_availability))
								? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . $stock->product_availability, $stock->product_availability, array('class' => 'availability'))
								: $field->child[$child_id]['product_availability'] = $stock->product_availability;
						}
					}
 
Last Edit: 9 years 3 months ago by Jose Carlos Lins.
The administrator has disabled public write access.

Category with multiple choice 9 years 3 months ago #11476

Hi,

This is a 100% custom modification and unfortunately we don't provide free support or step-by-step instructions for custom coding modifications.

You may purchase premium support:
www.flexiblewebdesign.com/premium-support

and let us take care this modification for you directly on your website though.

Regards.
Support
The administrator has disabled public write access.

Category with multiple choice 9 years 3 months ago #11511

Not fair, I bought the template 2 times (1 year and a half and two months) to different customers. Today, find these errors, the VM possibilities that were not anticipated in your template.

I do not want a customization, but that arrange the tempalte errors
The administrator has disabled public write access.

Category with multiple choice 9 years 3 months ago #11542

Hi,

I am afraid that is the fact. What you are asking can be considered as "customizations".

You are literally asking how to overwrite the plugin. If you follow the docs Virtuemart provides; yes, you can overwrite the plugin and change the PHP codes in the plugin to whatever you want. But i can't provide you support about it. It has nothing to do with our template: FlexibleMart.

regards.
The administrator has disabled public write access.
Time to create page: 0.483 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