WE MOVED OUR PLUG-INS TO WWW.SM-PLANET.NET!

Help PDF Print E-mail
Wednesday, 19 September 2012 00:00

Catproduct:

Catproduct isn't being shown. Why?

- Cart Attribute must be set to "No"

- Your template may need position of plug-in. Go to plug-in configuration in Custom Fields menu and set Layout position to "normal", "ontop" or "onbot".

- It's possible that your template doesn't have right code for showing VM plug-ins.

Go to [root]/templates/[your_template]/html/com_virtuemart/productdetails/    and check default.php if this code is there:

if (!empty($this->product->customfieldsSorted['normal'])) {
$this->position = 'normal';
echo $this->loadTemplate('customfields');
} // Product custom_fields END

If not, add it on place, where you want to have Catproduct.

Contact me if you have problems.

After adding child product to cart, cart page does not load.

It should be fixed in last version of Catproduct (V2.0.8). If you are still having troubles, contact me.

After click on add-to-cart button some strange page with some message is shown

Almost every time this means JavaScript issues. It could be jQuery conflict. If you can't fix it, contact me.

Where can I find language file to change table headings?

[root]/administrator/languages/en-GB/en-GB.plg_vmcustom_catproduct.ini

How to make older version of Catproduct working with Virtuemart > 2.0.22?

If you for some reason can't or don't want to upgrade Catproduct with latest version, you must change catproducts javascript. You can find file in

[root]/plugins/vmcustom/catproduct/catproduct/js/

Thera are two files, catproduct.js for default layout or catproduct-radio.js for radio layout. You need to change some of code:

- catproduct.js

at top of file add:

if (typeof vmCartText == 'undefined') vmCartText = 'was added to your cart.' ;

Change  function faceboxShow() :

function faceboxShow() {
if (Virtuemart.addtocart_popup ==1) {
message_final = removeNoQ(message_final);
if(!typeof usefancy === 'undefined' && usefancy){
jQuery.fancybox.showActivity();

jQuery.fancybox({
"titlePosition" : "inside",
"transitionIn" : "elastic",
"transitionOut" : "elastic",
"type" : "html",
"autoCenter" : true,
"closeBtn" : false,
"closeClick" : false,
"content" : message_final
});
} else {
jQuery.facebox.settings.closeImage = closeImage;
jQuery.facebox.settings.loadingImage = loadingImage;
jQuery.facebox({ text: message_final }, 'my-groovy-style');
}

emptyQuantity();  // only for Catproduct V2.0.10 or newer
if (jQuery(".vmCartModule")[0]) {
Virtuemart.productUpdate(jQuery(".vmCartModule"));
}
} else {
window.location.replace(vmSiteurl+'index.php?option=com_virtuemart&view=cart');
}
}

For Catproduct V2.0.12 change function faceboxError(message):

function faceboxError(message) {
if(!typeof usefancy === 'undefined' && usefancy){
jQuery.fancybox.showActivity();

jQuery.fancybox({
"titlePosition" : "inside",
"transitionIn" : "elastic",
"transitionOut" : "elastic",
"type" : "html",
"autoCenter" : true,
"closeBtn" : false,
"closeClick" : false,
"content" : message
});
} else {
jQuery.facebox.settings.closeImage = closeImage;
jQuery.facebox.settings.loadingImage = loadingImage;
jQuery.facebox({ text: message }, 'my-groovy-style');
}

emptyQuantity();
if (jQuery(".vmCartModule")[0]) {
Virtuemart.productUpdate(jQuery(".vmCartModule"));
}
}

And change function prepareMessage (datas,product_name,quantity):

function prepareMessage (datas,product_name,quantity) {
message_final = datas.msg.replace(/<h4>[^>]*>/g,"");
for(i=gr_length-1;i>=0;i--){
if(quantity[i]>0){
message_final += "<H4>" + product_name[i] + ' ' + vmCartText.replace("%2$s x %1$s","") + "</H4>";
}
}
}

- catproduct-radio.js:

at top of file add:

if (typeof vmCartText == 'undefined') vmCartText = 'was added to your cart.' ;

Change  function faceboxShow(datas) :

function faceboxShow(datas) {
var form = jQuery("#catproduct_form");
var id = find_selected();

if(datas.stat ==1){
var message_final = datas.msg;
} else if(datas.stat ==2){
var message_final = datas.msg +"<H4>"+form.find(".pname").val()+"</H4>";
} else {
var message_final = "<H4>"+vmCartError+"</H4>"+datas.msg;
}
if (Virtuemart.addtocart_popup ==1) {
if(!typeof usefancy === 'undefined' && usefancy){
jQuery.fancybox.showActivity();

jQuery.fancybox({
"titlePosition" : "inside",
"transitionIn" : "elastic",
"transitionOut" : "elastic",
"type" : "html",
"autoCenter" : true,
"closeBtn" : false,
"closeClick" : false,
"content" : message_final
});
} else {
jQuery.facebox.settings.closeImage = closeImage;
jQuery.facebox.settings.loadingImage = loadingImage;
jQuery.facebox({ text: message_final }, 'my-groovy-style');
}

emptyQuantity(); // for Catproduct 2.0.10 or newer
if (jQuery(".vmCartModule")[0]) {
Virtuemart.productUpdate(jQuery(".vmCartModule"));
}
} else {
window.location.replace(vmSiteurl+'index.php?option=com_virtuemart&view=cart');
}
}

 
Copyright © D.K.pictures