VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: Marco on May 03, 2008, 21:14:28 pm

Title: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on May 03, 2008, 21:14:28 pm
Hi

Update juli 2009:
For some time now I'm not using this hack myself anymore.
So please don't PM me with questions.
I did not develope the hack I only paid for the conversion from the old hack.
Thanks  :)

I received the package of the converted custom attributes extended hack 2.1 for VM 1.1 and joomla 1.5.
You can download it here.

This package is still a beta version of the conversion.
So don't use it for a production site.
Be sure to backup before you upload this hack!

You install it just by overwriting the existing files.

It is a conversion of the Custom Attributes Extended 2.1 [Hack] made by Barnett.(http://forum.virtuemart.net/index.php?topic=28192.0)
The syntax used to built custom attributes is the same as the old hack.
The 2.1 version seemed to have a file upload problem and a cart update problem.
Those are gone in this VM 1.1 joomla 1.5 version.

The conversion is done by Joseph Kwan(JK), who is also active on the VM forum.
He did a great job, but the hack needs more testing to get the bugs out, as much as possible.
Although I paid JK to do the conversion, he put in some time of his own because of the problems that were in the original hack.
So when you like the hack and going to use it when it is stable, consider to make a small donation to JK.
In his forum signature you will find a donate link.

Things that are added to this hack:
1. Date Prefix is added to the uploaded filename. The name shown in the cart is the original filename.
2. You are able to set an upload directory outside your webroot
3. File Upload defaults (/path/to/rootdirectory|filetypes|max file size|min file size) can be set in VM config. Extra tab is added.

Problems allready known:

1. When add to cart is in ajax mode the file attribute gives errors and does not upload the file. (you should turn off add to cart ajax)
2. Savecart does not work

To see any error message you better turn off add to cart ajax.
To turn off add to cart ajax mode, there is a file in the package called addtocart_form_no_ajax.tpl.php rename it to addtocart_form.tpl.php and replace it.
Or go to VM configuration->Site-> Layout -> (theme)configuration -> use ajax... no.

Update: 2008-08-04
Thanks to Nemesis02 version .13 and .15 is ready to use for VM 1.1.2, you can download them here or read his post (http://forum.virtuemart.net/index.php?topic=39666.msg140066#msg140066)and here (http://forum.virtuemart.net/index.php?topic=39666.msg140385#msg140385).

Update: 2008-08-01
ver.15 (for VM 1.1.0)
- should fix the price attribute problem, reported in this topic.
- does not have a fix for the "," problem reported in this topic, because to fix this would need a major change of the code and JK is still looking at this.
- has 2 new features sponsored by Ben Stovall, I have not tested it yet but will try to explain it in new reply(here (http://forum.virtuemart.net/index.php?topic=39666.msg139765#msg139765))

Update: 2008-06-12
- Should fix tax problem. When using tax, attribute price is shown incl. tax now.
In the syntax you still should use prices excl. tax.
- Should fix 'JHTMLBehavior' error

Update: 2008-05-16
Should fix child products problem.
Known issues:
1. File attribute type cannot be used together with ajax because ajax do not upload file.
2. Multiple attribute types cannot be used together with childlist display option : there will be conflict in field names between different children
3. Savecart cannot be used with attributes that need price calculations by given formula (such as cost/char etc.).

Update: 2008-05-12
ps_product_attribute.zip added, should fix the mandatory attribute problem.
Just overwrite the ps_product_attribute.php.
Bug reported by cer.

Update: 2008-05-10
Quantity add to cart fixed.
Bug reported by cer

Update: 2008-05-09
You can download version 2.11 now.
It has some small bugfixes and an option to enable/disable savecart in VM config.

Please report your problems/bugs as clear as possible.
And don't forget to donate (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=joseph%40expertcms%2enet&no_shipping=2) to JK!

Have fun!

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 07, 2008, 22:39:30 pm
No news is good news?

Small update.
Problem:
1. For now we leave this open. JK can provide a solution but it will cost more. So for this version you have to turn off add to cart ajax in VM config when you use file upload.
2. open_base_dir error, is related to server settings. If you want to use upload outside the web root and you are getting this message, you have to change your server settings. Info can be found on the internet.

We found an other problem with the hack.
3. In VM 1.1 there is a savecart feature built in(I did not know this). When you have products in your cart and log out, after a while you login again there are error messages related to this hack.
JK will provide a way to turn off the savecart feature when you want to use this hack.

Marco
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: aravot on May 07, 2008, 23:55:47 pm
Problem:
1. For now we leave this open. JK can provide a solution but it will cost more. So for this version you have to turn off add to cart ajax in VM config when you use file upload.

Maybe you can post the required amount so those interested can share the cost.

Quote
We found another problem with the hack.
3. In VM 1.1 there is a savecart feature built in(I did not know this). When you have products in your cart and log out, after a while you login again there are error messages related to this hack.
JK will provide a way to turn off the savecart feature when you want to use this hack.

I think it would be better to fix this, rather than find a workaround.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 08, 2008, 15:19:07 pm
My first intention was to convert the existing hack to a workable version for VM 1.1.

Next will be extending the extended hack to better attribute system.
http://forum.virtuemart.net/index.php?topic=39018.0
People who are willing to donate(money and or suggestions) can join us making it happen.
Details on how, will follow soon.

Anyone who can't wait and want the savecart and the fileupload fixed for this version, fixing it will cost:
- savecart fix $90
- fileupload fix $90
Just let us know how much you like to donate.
When we have the money for a fix JK will start on that one.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 09, 2008, 18:56:38 pm
New zip file for download.
See first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: aravot on May 09, 2008, 19:04:14 pm
I haven’t had time to install and test this, but for me it is strange that there was so much request for this hack and now that is available it seems the interest has faded, very strange.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 09, 2008, 23:59:07 pm
I've been quietly watching and testing. I will install the new version and test it this evening. I'll report back.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: cer on May 10, 2008, 02:53:11 am
Hi,
thanks for the hack! I do experience problems with the product quantity. Regardles what I enter only one product will be added to the cart. Works fine without the ca-hack.
Any ideas?


I use VM1.1 on Joomla 1.5.3 and custom attributes hack 2.11
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Sublimetime on May 10, 2008, 03:29:06 am
I haven’t had time to install and test this, but for me it is strange that there was so much request for this hack and now that is available it seems the interest has faded, very strange.

I find it strange that the even though this is a large requested feature, THERE HAS been nearly no Dev involvement /interest / or assistance..

Very strange indeed... :-/

but hey, at least the new VM UI is pretty! ... kinda reminds me of an ex girlfriend... looks nice.. but not intelligent enough to just even get the basics down.


As far as testing, I have downloaded the package and dealing with the outsourced Dev ive been working with.. Kinda trying to figure out what rout to go.. to do something separate , or build more onto this one.. I don't wanna waste money on one , when the other would be a better rout...



Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: aravot on May 10, 2008, 04:08:12 am
There are only two Devs actively involved in VirtueMart despite numerous requests for help very few have shown interest, but even those have disappeared after a week or two almost all the time the reason no time, we even requested for submission of FAQs, proof reading and completion of the manual, if we waited VirtueMart 1.1 User Manual (http://virtuemart.net/documentation/User_Manual/index.html) wouldn’t be ready, we contacted various coders to include their hacks in VirtueMart 1.1 but never received a reply and without written consent we can’t add their hacks, or it was a reply that we didn’t anticipated go figure, so you see we are trying our best but are short handed, you don't expect two or three Devs do everything.

Let’s see what you will bring to the table.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 10, 2008, 08:15:55 am
Regardles what I enter only one product will be added to the cart. Works fine without the ca-hack.

Thanks for the input.
I tried it myself, and you're right.
We're going to have a look at it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 10, 2008, 08:38:40 am
Quantity add to cart bug fixed.
New version can be downloaded, see first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: cer on May 10, 2008, 13:58:45 pm
thanks a lot,
works perfectly now.
I will do some more testing.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: cer on May 11, 2008, 21:19:11 pm
found two more problems:
1. ca's are always mandatory
2. tax for ca's isn't calculated right
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 11, 2008, 21:37:35 pm
What I noticed with the tax is that it shown on the product details page excl. tax.
When added to the cart it is shown incl. tax (the right way) and calculated right with the product price.
You have to use for attribute charged price an excl. tax price.
Like you have to do for the normal custom attributes in VM.
I reported this to JK some days ago.
Do you mean the same?
It is an old problem from the VM 1.0.x version of the hack.

Your first problem is also an old problem I believe.(have to look into this)
I will ask JK to have a look at it.

Thanks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 12, 2008, 08:49:33 am
Fix for mandatory, please download ps_product_attribute.zip.
And test please.
See first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: cer on May 12, 2008, 13:44:18 pm
Thanks, Marco!
The mandatory bug seems to be fixed for regular products.

But now there is a problem with child products - regardless if the ca is entered in the parent or child items product status.

I get this error:
Warning: Invalid argument supplied for foreach() in /is/.../administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 776


 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 12, 2008, 14:45:45 pm
Hi cer,

I can't get extended or custom attributes to show up with child products.
How did you do this?
What I did is:
-Add main product with no attributes
- add 2 child products with extended attributes.

When in the shop I select a child product, but no attributes show up.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: cer on May 12, 2008, 16:14:02 pm
you're right: attributes don't show up when you use them in the child item itself.
but you can use the attributes via the parent product. just use the syntax in there.
my ca's are visible even before I select a child from the drop-down.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 12, 2008, 18:25:23 pm
I don't get the warnings, but product is not added to the cart.
Get message "select special attribute" even if all attributes have a value.

I will drop this at JK again.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 12, 2008, 23:45:04 pm
One of the previous incarnations of this hack for vm1.1 worked with adding the attributes to the child item. I'll keep looking into that issue.

S
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 13, 2008, 00:59:49 am
Yes, but I even can't get the standart custum attributes to show up in VM 1.1 for child products.
Is the attribute system changed for child products, does anybody knows that?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 13, 2008, 11:07:00 am
I think you hit the nail on the head Marco. I haven't had a chance to dig very deep but it does appear that child product attribute handling has changed in some way. The recent changes to the ca extended hack aren't in any area that would have effected them. I'll dig some more when I have time later today.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 13, 2008, 14:29:40 pm
JK did some fixing on this child problem allready.
I think it is fixed, but I have to wait JK's respons.

Yes, attributes can't be set with child products, you have to set them with the parent product.
If I'm wrong, please (anybody) let me know.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 13, 2008, 17:55:04 pm
Marco,

Thanks for taking the lead on keeping up with this hack. When you have time, can you update the first post with the current status?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: unleash.it on May 14, 2008, 07:59:03 am
Marco,

I also read somewhere that attributes aren't possible with child products. But...

Tried it anyway and I got it working: http://www.tomanddaves.com/shop.html?page=shop.product_details&flypage=flypage-coffee.tpl&product_id=21&category_id=6

Thanks for pulling this together. If I ever end up using it I'd be glad to donate some cash if you post a link.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 14, 2008, 16:17:54 pm
unleash.it,

Can you post which version of joomla, vm and the hack you are using? I had the custom attributes hack working with items a couple of days ago but after upgrading to the vm 1.1 and the newest files, it doesn't work anymore.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 14, 2008, 17:55:13 pm
Yes I like to know that too.

JK is still working on a fix.

If you(and everybody else) want to donate, donate (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=joseph%40expertcms%2enet&no_shipping=2) to Joseph Kwan.
He puts a lot of time in it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 14, 2008, 18:50:46 pm
Marco,

I would consider donating if there were an outline of the requirements the hack should fulfill when it is complete and a time schedule for it's completion. Right now I'm in a testing phase and, given the instability of the hack so far, I'm not sure if I'm going to be able to use it at all.

For my purposes, I need the hack to allow adding custom attributes to items as well as products.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 14, 2008, 19:06:32 pm
As you know we're working on that right now.  :)

My intention was to convert the 2.1 hack to a working version for VM 1.1.
So it has to work the same as in VM 1.0.x, at least.
Few problems that were never fixed in the 2.1 version are solved in this one.
So it's even better than the old one.
The child problem and tax problem are the only things open right now, if I'm right.
JK is working on those.
And when we find no other things it can go stable very soon.

Just keep on testing, so we can be sure to have a nice solution to start with.
And it would be nice for JK when you donate anytime you feel like it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: unleash.it on May 15, 2008, 06:33:02 am
The site I posted is using Joomla 1.5 and VM 1.1 (late beta). It is not using the custom attribute hack, just the built in features. Not sure how the hack might affect things, but as-is you should be able to have attributes on child products.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 15, 2008, 06:53:02 am
Thanks for the info. I had the custom attribute hack working with attributes for child products on an earlier release candidate also. Somewhere along the lines, I think a change was made to ps_product.php that killed them. I just haven't had enough time to look further into it yet. Maybe JK will find it first.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 16, 2008, 08:03:56 am
Hi

JK send me an other update (2.12)
Should fix child products problem.
Known issues:
1. File attribute type cannot be used together with ajax because ajax do not upload file.
2. Multiple attribute types cannot be used together with childlist display option : there will be conflict in field names between different children
3. Savecart cannot be used with attributes that need price calculations by given formula (such as cost/char etc.).

For download see first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 16, 2008, 08:07:47 am
Marco,

Thanks again for keeping up with this one. Can you elaborate a little on what you mean by "2. Multiple attribute types cannot be used together with childlist display option : there will be conflict in field names between different children"

Does this mean that adding multiple types of attributes (i.e. text, select and a radio) to one child product?

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: Marco on May 16, 2008, 08:14:02 am
The hack will work with child products, as long as you use the old way to display them (selectlist).
Using it together with child list (check)boxes it won't work because of the conflicts in field names.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 16, 2008, 08:18:51 am
Thanks for the clarification. I'll test it over the next few hours.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 16, 2008, 18:37:15 pm
The way the calendar is being called in addtocart_form.tpl.php errored for me. It works if you change:

Code: [Select]
// JLoader::import('joomla.html.html.behavior');
// JHTMLBehavior::calendar();
around line 70 to
Code: [Select]
JHTML::_('behavior.calendar');
I still have a little more testing to do but it's looking really good.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: mostyles on May 19, 2008, 21:52:58 pm
The way the calendar is being called in addtocart_form.tpl.php errored for me. It works if you change:
Code: [Select]
// JLoader::import('joomla.html.html.behavior');
// JHTMLBehavior::calendar();
around line 70 to
Code: [Select]
JHTML::_('behavior.calendar');I still have a little more testing to do but it's looking really good.


I'm having an issue with the same code.  I tried the above mentioned fix but with no success.  getting the error:  undefined class name 'jloader'

running joomla 1.1.14 and vm 1.1.0 RC2

I'd really like to work with this hack.  Please help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1
Post by: crotech on May 20, 2008, 04:07:26 am
mostyles,

The code I posted works for changes to Joomla 1.5. Maybe someone else can post how it's called in 1.1.14.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bebe on May 24, 2008, 01:49:19 am
Hi guys,

Would this hack work for Joomla! 1.0.13 as well?

I installed the hack (VM 1.1) and get a white page when I click on a product in the frontend now. Maybe there went something wrong when I installed the hack....  ???

Thanks for your help.

bebe

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on May 24, 2008, 07:44:04 am
It is converted for Joomla 1.5 and VM 1.1.
On other version it may cause errors.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: editoon on May 24, 2008, 12:42:19 pm
great job, but i have a problem to upload file.
$_FILES[$titlevar] doesn't return any data and an error appear
(I desactivated the ajax option as you said)
What is wrong ?
regards
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on May 24, 2008, 12:53:39 pm
Did you set everything right in the VM config? (Attributes tab)
Is directory writeable, does it exist?

Maybe you could explain a bit more what you did.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: editoon on May 24, 2008, 13:03:51 pm
Thanks for you quick answer
Yes in Attibutes tab I put : mypictures/ in the field 'Upload root path'
the directory exist (I'm on localhost) and is writeable
and i put : name(text);photo(file) in the Custom Attribute List of my product.
Everything seems Ok but
When I checked on ps_product_custom_type.php, the result of the line 661 (if (isset($_FILES[$titlevar]) && is_array($_FILES[$titlevar]))) is false. In fact $_FILES[$titlevar) doexn't return anything... and $titlevar = photo

Thanks for your help marco
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on May 24, 2008, 13:11:49 pm
The root path should be the complete server path to the directory.
Did you do that or only the mypictures directory?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: korb on May 28, 2008, 14:14:45 pm
Interesting project
Keep on going guys :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: korb on May 28, 2008, 20:16:30 pm
I wish for this feature:
-to be compatible with a future feature/plugin for virtuemart for product comparison, so only theese atributes show up there.
-offer suport for development of a filtering products by theese coustom atributes extended.

I want to much?
Title: Problems w multiple Image Upload
Post by: andre.maito on June 02, 2008, 22:18:36 pm
I'm having problems when I put 2 'file' attribute. The first is -r and the second is not. When I upload 1 file it work's fine, but when I try to upload 2 files it crashes. A blank page is shown.

Any Ideas?? Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 02, 2008, 22:33:50 pm
Hi

I tried to reproduce your problem, but mine is working fine.

Could you share more info?
Versions you use, maybe filesize you try to upload etc.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 03, 2008, 01:26:44 am
Hi, I'm using J! 1.5.3 w/ Virtuemart 1.1.0 (in fact i've installed the Joomla! 1.5.3 eCommerce Edition)

At first I've got an error with
Code: [Select]
JLoader::import('joomla.html.html.behavior');
JHTMLBehavior::calendar();
and changed to
Code: [Select]
JHTML::_('behavior.calendar');
After that the file upload begins to work (1 file only). After that I tried to put 2 file attributes, but a blank page is being shown after adding to cart.

I'm using the attribute like this (maybe the error is here):
Arquivo(file-r)(Imagem a ser impressa na almofada.|field-below)(images/|.jpg,.cdr|0);Arquivo2(file)(Imagem a ser impressa na almofada.|field-below)(images/|.jpg,.cdr|0)

You can check this at http://macroart.tempsite.ws/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=1&option=com_virtuemart&Itemid=2

Thanks...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 03, 2008, 08:03:54 am
Hi

I tried your link, but also had no problem uploading on your site.
Files to big? Timeout?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 03, 2008, 14:32:01 pm
Hi
I tried your link, but also had no problem uploading on your site.
Files to big? Timeout?
Now it's working for me too... Anyway... Thanks for help and for the hack... Donations are going to be made in the end of this work!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 03, 2008, 14:38:27 pm
Good to hear... :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 03, 2008, 18:41:47 pm
Check this: When I upload one or two files for the first time, it works fine. But When I do it for the second time, I gov an error.

Doesn't matter if I delete the item from the cart or not.

Can you check it for me (again)?

thanks!

http://macroart.tempsite.ws/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=1&option=com_virtuemart&Itemid=2
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 03, 2008, 21:33:28 pm
Yes, I'm getting it also on your site.
But on my own site, again no problems.

I don't know what to think about this one, maybe someone else knows?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gerasimos on June 04, 2008, 10:47:40 am
I have a question about upload file.. it is possible to have in cart a thumb of this file if it is image and a link of this image in confirmation email.. ?????
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 04, 2008, 11:03:13 am
Allmost everything is possible.
It only has to be coded in.
I'm not a coder, so someone else has to add this in if you want it.(paid or for free)
I have no real need for this myself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 18:06:18 pm
I have a problem with installing CA-hack for latest VM & Joomla.
I've replaced the files, as instructions say, but can't find where to add the ca-syntaxes? (Extra attributes in product doesn't work, which I thought it would.)

Also I have a smaller problem with my site, dunno if it's server related, joomla/vm configuration related or client-related, but I can't add property or attributes to a product, more than the first line with one property.

Any ideas how to solve these?

Keep Up This Wonderful Project (It's Awsome)
/Krille
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 05, 2008, 18:15:38 pm
CA attributes are placed in the "Custom Attribute List" you find under the "Product Status" tab.
If you place the right syntax, it should work, or at least do something.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 18:22:08 pm
Thanks for a quick answer.
Thou I cannot find anything like "Custom Attributes List".
Only thing in product status is "Attributelist:" which doesn't work (as I said above ;) ) and "Extra attribute:" which doesn't want to make the CA-syntaxes show up like they should. Atm it's just printing the text as if I haven't "installed" CA-hack :S
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 05, 2008, 18:36:12 pm
Have you tried to install(upload) the files again?
Maybe they did not overwrite the first time.
You can also place a printscreen of your product status tab, to see how it looks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 18:52:43 pm
I'll try to upload the files again, also if that doesn't work I'll try to find a way to upload a screenshot here ;)
Thanks for help and hope I don't have to write about this again :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 19:03:53 pm
Quick question:
Do I have to modify my files like the old times (http://forum.virtuemart.net/index.php?topic=28192.msg79490#msg79490) or is it enough if i just upload the files again?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 19:23:47 pm
I think i've solved the problem.
As my site is in Swedish, the Custom Attributes didn't show up.
Was about to change language to english (to take a screenshot), but there it was.  :o :)

Hope you will fix this til next release :) But for now I'm just too happy that it worked  ;D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 05, 2008, 19:33:22 pm
Glad it works in English.
Did the VM custom attributes work before the hack?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 05, 2008, 22:59:20 pm
I don't think they did :/
I'll make another try with a basic version in another DB.

EDIT:
Doesn't work from start (Using VM pack with Latest VM & Joomla)

Also Noticed that code strings like this doesn't work for me:
(Ignore the "")

"javascript:document.adminForm.toggle.onclick();vm_submitButton('new','adminForm','product.product_form');"

Including the buttons which the link comes from. (Attached a screenie)

I have no clue what is going on with my site, if these problems are client related (my browser/software who isn't correct/good) or if it's the webhost that blocks it. :S

[attachment cleanup by admin]
Title: HELP!
Post by: marianaf on June 06, 2008, 00:04:24 am
HELLO TO ALL!

I´M getting a bit crazy with this. My problem is:
1) I had installed the hack and everything went good, I could give attributes do child products (which is my main need for the shop)
2) today, something went wrong, I don´t know what. The child attributes were gone (please see attached pdf).
3) I came back, downloaded the hack again, uploaded all the files. When I entered the flypage of the product the following error message is displayed:

Fatal error: Class 'JHTMLBehavior' not found in /home/tereecom/public_html/joomla/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php on line 23

4) I uploaded the older addtocart_form.tpl.php and the page is allright but the attributes are still missing. If you want to see it, please go to:
http://www.teresafrade.com/joomla/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=23&category_id=6&option=com_virtuemart&Itemid=106

What do you think I should do?

please see the pdf....i´m so frustrated! I had spent long hours to achieve it and now it´s gone...I think it happened at any time when I was costumizing the layout..

thank you so much..

Mariana

[attachment deleted by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 09, 2008, 20:39:14 pm
My problems were solved when I changed webhost.
Many thanks for your help Marco, now I'm just waiting for the final conversion of this excellent hack (with support for swedish ;) ).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 10, 2008, 07:37:41 am
Hi

I'm not sure your problem is related to the hack.
Your problem is attribute field not showing up in the VM admin, am I right?
If so, this file is not modified by the hack.
Think you have to look at the VM language files, or just leave the backend in english.

@marianaf
Sorry I don't have time to help you. It's very busy at the moment at my place.
And it seems your problem is no hack bug/problem.
Hope you find an other way to solve your problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jimspice on June 10, 2008, 19:36:23 pm
Quote
Fatal error: Class 'JHTMLBehavior' not found in /home/tereecom/public_html/joomla/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php on line 23

I am receiving the same error.  Where exactly is 'JHTMLBehavior' defined?

Spice
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 11, 2008, 11:25:01 am
Can you tell me when the error happens?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jimspice on June 11, 2008, 11:45:35 am
I found andre.maito's suggestion (post #49 on last page) and that seemed to work.

However...when I use the date syntax and child lists two date fields will not work.

More digging perhaps.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 11, 2008, 11:54:16 am
I will give JK the info.
And see if he's got an answer.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krille_kp on June 11, 2008, 21:36:44 pm
If you comment out the $echo calendar thingy on line 23 or whatever the error is, no error will show up.
Thou, I dunno if it affects the functionallity of VM or CA.

@Marco
Seems it works in swedish aswell :)
Never mind the last post :) (But the thanks ofc ;))
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 11, 2008, 22:46:54 pm
Hi,
I installed the hack on my installation of Joomla 1.5.3 and VM 1.1.0.
In the backoffice the hacks seems to work fine, but when i open de site and open an shop item (with or withour custom attributes) i just gat a white screen, Nothing loads!
I tried to change to a standard joomla template and change the language to english, but both make no difference.
Does anyone have any idea what i am doing wrong here?
Thanks,
Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 00:33:08 am
Hi

Did you use the right syntax for the attributes?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 12:15:54 pm
Hi,

I checked, but i tested it with this attribute:

Quote
Name(price)(tip here|location)(default price|price type);

On of the examples of the costum attribute Hack. No diference, als the item without an attribute is not showing.

Wehn i check the source of the page that is showing i see this code:

Quote
<div id="vmMainPage">

<div class="vmCartContainer">
   
         <script language="javascript" type="text/javascript" src="http://www.kidzwelcome.nl/includes/js/overlib_mini.js"></script>
         <script language="javascript" type="text/javascript" src="http://www.kidzwelcome.nl/includes/js/overlib_hideform_mini.js"></script>
         

Nothing more is loading.

Anyone any idea what the source of my problem may be?

thanks,

Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 12:43:49 pm
No, sorry.

I had this once, because I used a wrong syntax and I only got a blank page with that product, not with all products.

Tried to remove the hack and see what happens?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 13:14:19 pm
No, sorry.
I had this once, because I used a wrong syntax and I only got a blank page with that product, not with all products.
Tried to remove the hack and see what happens?

I tried to remove it yes, and than it works perfect again. But that is not what i want, i need the hack to use it in the shop.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 13:23:26 pm
Strange thing, I will ask JK if he has any clues.

Do all your products use the hack?

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 13:24:57 pm
Strange thing, I will ask JK if he has any clues.
Do all your products use the hack?
Ok thanks,
The products will do yes (I'm building the site right now).
Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 13:27:00 pm
Do you have an url,so I can take a peak
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 13:30:27 pm
sure,

www.kidzwelcome.nl (http://www.kidzwelcome.nl) is the url of the site.

At the moment product "Kiekeboe" has an attribute (the one in the post earlier). prodect test has no attribute.

Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 13:43:46 pm
No, I don't understand it either.
I hope JK will have an answer on this.
You're the first with this error, so there must be something different with your installation.
It's very strange that products with no attributes set also give this error.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 18:25:23 pm
Ivo are you sure you are working with joomla 1.5 and VM 1.1?
Just went through the whole topic and there was someone with the same problem.
Only he was using VM 1.0.13
http://forum.virtuemart.net/index.php?topic=39666.msg128751#msg128751 (http://forum.virtuemart.net/index.php?topic=39666.msg128751#msg128751)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 18:35:26 pm
I just uploaded a new version 2.13

- fix for displaying tax was added
- fix for the 'JHTMLBehavior' error

Download at the first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 18:51:46 pm
Ivo are you sure you are working with joomla 1.5 and VM 1.1?
Just went through the whole topic and there was someone with the same problem.
Only he was using VM 1.0.13
http://forum.virtuemart.net/index.php?topic=39666.msg128751#msg128751 (http://forum.virtuemart.net/index.php?topic=39666.msg128751#msg128751)

Sure about that yes. Joomla 1.5.3 and VM 1.1.0
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 18:57:31 pm
Ok, than we have to wait on JK's reply on this subject.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on June 12, 2008, 18:58:55 pm
Ok, than we have to wait on JK's reply on this subject.

Marco,

I just downloaded and installed the version 2.13. And in this version the problem is solved!

Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 12, 2008, 19:13:40 pm
Yes, we are quick ........ ;D

Ok I inform JK.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 13, 2008, 14:17:59 pm
Hi guys,

Marck and JK: you guys rock big time!

thanks for this really cool hack. Something funny: i did fix a bug i had with the cart module not getting updated on child product.
I know it's not much but i did a little donation to JK to thank him for this work.

Though i just had a little question.
everything works, but when if someone does not use the custom attribute (it's optional for the client on my site) the shopping cart is not displaying the info properly.
on my screen shot you can there is the word "single", which seems to be the name of the regular attribute of the product is showing next to my custom attribute name. see the bottom item on the screen shot.

but when someone enter something in the field of the custom attribute then it display properly.

i'm pretty sure it should be a simple display tweak to make to a file. but i am still a bit clueless.

does anybody have a an idea or face the same problem?

actually what would be nice, is to either have the name of the regular attribute (in my case: "size") before the word "single", or have it remove.

it's just weird to see the word "single" alone there.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 13, 2008, 23:51:37 pm
I'm VERY impressed with this hack and your responsiveness to issues. I'd like to discuss possibly financing some additions to this hack if you are open to it.

But first, there is a problem I am experiencing with your current version (2.13) with Joomla 1.5.3 and VM 1.1. I'm using the hack with Ajax ON (I've tried it off with the NO AJAX file replacement and get an internal 500 error). With AJAX on and the following syntax, the very first time I added to cart everything worked fine:

Chose A Tag(radio)(Minimum quantity must be 24 favors, 25 cents each|field-below)(Matching [+.25],Personalized [+.25],None*);Name(text)(|)(|char_nospace);Date(text)(|char_nospace);(line)(Select options below if you chose Personalized Tags|field-below)(-------------------------------------------------------);Shape(select)(|)(Select Option,Diamond,Heart,Circle,None;Design(select)(|)(Select Option,Cupid,Cosmopolitan,Classical,Grecian,Victorian,Contemporary,Baroque,Garden,None);Color(select)(|)(Select Option,Red,Periwinkle,Pale Yellow,Blue,Light Blue,Ballet Pink,Burgundy,Pink,Lavender,Sage,Hot Pink,Mint,Pearl Gray,Deep Lilac,Coral,None)(|)

After one cart update however, I could not add anything else to cart that used the custom attributes above. I would only get an ajax "notice" screen that had the "continue" and "cart" buttons, without the message that the item was added to the cart.

After eliminating some things, I discovered that if I only used one option string of syntax, for example...

Chose A Tag(radio)(Minimum quantity must be 24 favors, 25 cents each|field-below)(Matching [+.25],Personalized [+.25],None*);

...it worked fine and the cart was updated. If I used two or more, it would not add to cart. Is this a bug or is my syntax malformed?

Here is a link to my test site for an example:

http://www.iheartbabyfavors.com/component/virtuemart/?page=shop.product_details&flypage=flypage.tpl&product_id=38&category_id=6

The above is using the full syntax I posted above and will not add to cart properly (just gives ajax notice with no add to cart message). All other products that do not use the custom attribute field add fine. If only one option is used, it adds to cart fine. Just weird.

Any thoughts?

*UPDATE*

Some additional info on this issue: I have verified that this works for people the first time they add the item to the cart. If they try a second time it does not update the cart. If the browser is closed and reopened they can again add it to cart but only 1 time.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 14, 2008, 00:32:59 am
Hi

I tried the syntax you placed here on my own test site.
Ajax on (should be off when using the file attribute).
No problems.

Visit you site, and yes you're right.(only different syntax)
Perhaps you can publish the cart(module or enable in VM module), makes checking bit easier for me.

I'm not a coder myself and when I have no answer I have to ask JK.
In your case I have no answer.
Don't know what could be different between your and my site.
Did you change anything else on your site perhaps?

I will drop it with JK see what he has to say.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 14, 2008, 00:51:06 am
i did fix a bug i had with the cart module not getting updated on child product.
I know it's not much but i did a little donation to JK to thank him for this work.

This bug is on the latest version? Could you share more detail of what you have done.
Any donation is welcome, many small donations make one big donation. ;)

Though i just had a little question.
everything works, but when if someone does not.......

I tried to reproduce your problem, but I'm not sure if I understand what kind of attributes you use when.
Could you share the attribute(extended and other) settings of that product?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 14, 2008, 04:10:03 am
Hi Marco,

Thanks for the quick reply! I've enabled the cart module, so feel free to have a look, and thanks!

P.S. As to your question if I've changed anything, no. This was the bundled eCommerce virtuemart installation, stock with no changes. I only added products and your hack. I installed no 3rd party plugins for this test.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 14, 2008, 08:57:01 am
Hi,

there is an other way to turn off the cart ajax, see first post.(go to VM configuration->Site-> Layout -> (theme)configuration -> use ajax... no.)
Try turning it off.
Turn error reporting on and see if any php error comes up.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 14, 2008, 18:42:01 pm
Yes, I've tried it with ajax off using the configuration panel. I've got it turned off now per your instructions, and have debug on. What happens when ajax is off though is I get an internal 500 error when attempting to add to cart the 2nd time. I haven't been successful figuring out what is causing this with debug. I've left debug mode on and ajax off if you would like to look things over.

Thanks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 14, 2008, 18:54:51 pm
Did you replace addtocart_form_no_ajax.tpl.php with the original vm again?

And have you tried an other joomla template to see if it gives the same problems.
I see some java script calls maybe there is some conflict.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 14, 2008, 20:37:25 pm
My thoughts too, Marco. Just to be thorough I've tried all versions of the addtocart_form.tpl.php. The original, the one in the 2.13 hack and the no ajax version. All produce an "Error 500: Internal Server Error with ajax" set to off in the Virtuemart config upon attempting to add the item to the cart a 2nd time.

Question though, since I'm using the hack, which one SHOULD I be using?

I've also tried switching back to the originally installed templates: Purity, Beez and Rhuk. I'm racking my brain trying to figure out what it could be. It doesnt seem that anyone else has reported anything similar.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 14, 2008, 22:22:06 pm
By the way, did you turn on bug reporing in VM or joomla?

Quote
Question though, since I'm using the hack, which one SHOULD I be using?

The latest should be the best choice, at least normally.

And you are sure there was no problem before you installed the hack?

Jk had no answer right away, he suggested to turn error reporting.
To see if a php error pops up.
Otherwise check server error log files.
Don't know if you are able to check those files.
What to look for? Not sure, messages related to this problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 15, 2008, 01:12:01 am
I'm happy to report that I SOLVED this issue, thanks to a clue you gave me.

I wanted to turn on my error reporting in my php.ini and I suddenly realized that since I have shared hosting using cPanel that I did not have access to it.

It was at that time that it dawned on me that I had noticed on installation that register globals was ON and also "MB Language is Default No PHP mbstring language is not set to neutral." Everything installed fine though, so I quickly forgot about it.

To address this I created a php.ini file with the contents below and put it in my CGI-BIN folder:

[PHP]

register_globals = Off
php_value mbstring.language neutral

After that, everything started working fine! 

Thanks so much for all of your assistance.

P.S. Do you know if JK is open to doing some custom coding regarding this hack if I finance it?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 15, 2008, 01:53:54 am
Hi

Good news, I'm happy it's working now for you.

Don't know how busy JK is at the moment and I can't speak for him, but I believe he is allways open to do some custum coding.

Is it something you like to share with us?
I like a color picker to be add to the hack in a while.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 15, 2008, 08:54:26 am
Sure I'll share! What I'd like is admittedly ambitious.

I want the ability to hide attributes unless they are activated by checkbox or radio button. For example:

For a gift item I offer, if and only if they select the checkbox for matching tags, the option to enter name and date information in text fields would be revealed.

The second thing would be the ability to assign minimum quantity BY ATTRIBUTE. For example, a customer could order as many or as little of the gift above as desired, UNLESS they choose to add matching tags. When they select that checkbox for matching tags it would then be required that they order a minimum of, say, 24 gifts. If they do not opt for matching tags they are unrestricted as to the amount they want to buy.

I realize this is pretty involved and may be out of scope for this hack, but it's something I've needed in Virtuemart for a long time: Dynamic Options.

If JK says he's able to do it, I'd be willing to foot the bill.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 15, 2008, 09:26:27 am
Would be a nice addon to the hack.
Just contact him and he will let you know if it is possible.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 16, 2008, 18:22:58 pm
Marco: my bug is that the add-to-cart ajax function was not working with child product. Now that i install the hack it works????
though i have now problem when adding a new product in the back end. even though i select a category i always get the error that i need to select a category before saving.

I'm not sure they are related. but it started doing this right after i installed the hack.

as for the syntax of my custom attribute i used a simple: Embroidery(text)(20.00 per character|field-below)(|20.00|char);

cheers
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: YtseDrummer on June 17, 2008, 09:42:06 am
Hi Marco,

I've installed the files on my Joomla directory. I'm using J 1.5.3 and VM 1.1.0 stable. When I log into VM panel I have these errors:

Code: [Select]
Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_ROOT already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1264

Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_MINSIZE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1266

Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_MAXSIZE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1268

Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_TYPE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1270

Notice: Constant VM_SAVECART_DISABLE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1272

What should be the problem? Could it be a files' permissions problem?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 17, 2008, 18:34:04 pm
For any interested parties, I've contacted JK about the proposed customizations I shared in post #102 of this thread. Here was his reply:

Quote
Adding a checkbox to control whether an attribute should be hidden is not difficult. I will suggest adding templating system to custom attribute extended for doing this. This basic system will cost $90. Converting each type of attribute to the template will cost $45. The total cost for the basic system with all attribute types converted will be $420.

The quantity restriction function will need a new attribute type (or a modified attribute type). If you only need a client side (ie browser side) control, the hack will cost $120. If you also need server side control (ie checking at the server side), an additional cost $180.

Here was my reply:

Quote
Okay, I'm interested in doing this. I'd like to start with creating the templating system to custom attribute extended, then converting the dropdown and text input field attributes to be hideable.

As far as the quantity restriction function, could you clarify what you mean about server-side control? I'm looking for this to work like the minimum quantity field works for products, but with the amount I set for a custom attribute overriding that if selected.

So, as if in my example "matching tags" was selected, a minimum order of 24 of the main product would be necessary, and if they had a lesser amount in the quantity box, a message would pop up telling them that a minimum of 24 was required with that option checked. Would any of that require server-side control? 

Please see the following images for a visual of what I'm trying to achieve:

http://www.flickr.com/photos/25428873@N05/?saved=1 (http://www.flickr.com/photos/25428873@N05/?saved=1)

If I have this right the cost would be (assuming I only need browser side control):

Templating system - $90
2 Attributes converted (Dropdown, Text input) - $90
Quantity restriction - $120

Total cost - $300

If anyone would like to have more or all of the attributes included that JK and I discussed, feel free to donate via PayPal to: bgstovall@gmail.com

If I get enough interest but there is still not enough money to cover it, I'll make up the difference. Otherwise I'll go with what I originally asked for above.

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: YtseDrummer on June 18, 2008, 11:04:24 am
Hi Marco,
I've installed the files on my Joomla directory. I'm using J 1.5.3 and VM 1.1.0 stable. When I log into VM panel I have these errors:
Code: [Select]
Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_ROOT already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1264
Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_MINSIZE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1266
Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_MAXSIZE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1268
Notice: Constant CUSTOM_ATTRIBUTE_UPLOAD_TYPE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1270
Notice: Constant VM_SAVECART_DISABLE already defined in /var/www/vhosts/site.com/httpdocs/administrator/components/com_virtuemart/html/admin.show_cfg.php on line 1272
What should be the problem? Could it be a files' permissions problem?

solved... with another installation of Joomla, VM and hack...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: aravot on June 18, 2008, 19:38:01 pm
@bgstovall, I will donate.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 18, 2008, 20:07:05 pm
Thanks for your participation Aravot! I'm excited to see these changes being made. I think they will add a lot to the Virtuemart experience. If it's okay, I'll PM you with more details of my discussion with JK.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: korb on June 18, 2008, 20:58:05 pm
Anyone tried this hack with VM 1.1 nightly build?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 19, 2008, 15:20:15 pm
Hi bgstovall,

I'm also interested.
Been busy so I mist a few days on the forum.
Let me know what is still open.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 19, 2008, 17:18:40 pm
Hi Marco,

I sent you a PM.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 20, 2008, 02:37:24 am
Hello again!!

Still having problems with uploading 2 files (see reply 49)...
Latest  tests I've made:

USING JPG FILES around 200kb each one...

WITHOUT LOGIN

1st time   2 uploads   OK
2nd time   2 uploads   ERROR
3rd time   2 uploads   ERROR

DELETE ITEM FROM CART

1st time   2 uploads   ERROR
2nd time   2 uploads   ERROR
3rd time   2 uploads   ERROR

DO LOGIN

1st time   2 uploads   ERROR
2nd time   2 uploads   ERROR
3rd time   2 uploads   ERROR

DO LOGOUT

1st time   2 uploads   OK
2nd time   2 uploads   ERROR
3rd time   2 uploads   ERROR

I've tryed any possible ways to upload the files, but no success. When I'm using only one file field, it works perfectly!
I'm wondering if this error is related with the session. As you can see, when I start a new session, or when I logout and login again, I'm able to post 2 images.

Any ideas? Does that make any sense?

The error I was getting from server is: ERR_ZERO_SIZE_OBJECT

Cheers!.

link: http://macroart.tempsite.ws/index.php?page=shop.product_details&flypage=flypage_new.tpl&product_id=4&category_id=6&option=com_virtuemart&Itemid=2
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ssoltz on June 20, 2008, 18:40:58 pm
OK...I have a feeling I will not get an answer to this, but here goes:

If one was to want the custom attributes extended hack for VM 1.1 but are using Mambo 4.63, should I use this hack, the one for VM 1.12 or is there not really a version that will work for me?

Thanks in advance,
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 21, 2008, 08:19:12 am
OK...I have a feeling I will not get an answer to this, but here goes:
If one was to want the custom attributes extended hack for VM 1.1 but are using Mambo 4.63, should I use this hack, the one for VM 1.12 or is there not really a version that will work for me?
Thanks in advance,

Don't realy have an answer, but you can allways try.

Hello again!!
Still having problems with uploading 2 files (see reply 49)...
Latest  tests I've made:
USING JPG FILES around 200kb each one...
WITHOUT LOGIN
1st time   2 uploads   OK....


It looks a bit like bgstoval's problem, maybe you can find your solution in his post about it.
http://forum.virtuemart.net/index.php?topic=39666.msg132165#msg132165 (http://forum.virtuemart.net/index.php?topic=39666.msg132165#msg132165)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 23, 2008, 08:09:08 am
is there any chance to see this really nice hack working with the cart in ajax mode.
is this something doable or just impossible due to coding restriction
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 23, 2008, 19:21:52 pm
As far as I know the ajax should work, if you got it turned on.
It only gives problem when using the upload attribute.
So you could try it yourself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 24, 2008, 04:52:19 am
Hi Marco,

you are right actually. i don't know what is happening with my site.
i went through so many trouble.
it seems that the environment of my client's host has something different because when i uploaded my site from my local environment (wamp5 on windows XP, soon to change cause it's not the best), i had issues with menu link, so i did a fresh install on the server directly and upload my db, added the this hack which works fine excepted that now the ajax update cart feature does not work, the "add-to-cart" button simply does not work at all. i have to turn of the feature in the admin config panel of VM to user the "normal" add-to-cart feature.

pretty insane, no? i really can't figure out what can cause this. i have moved numerous joomla site from my local machine to online host without trouble at all.

hum....
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 24, 2008, 05:37:38 am
ok, i am getting somewhere.
i checked firebug console when clicking on the add-to-cart button and it shows me an error as follow:
live_site is not defined on  line 94 of the file theme.js located in the default vm themes directory.

i haven't changed anything to that file, it's the same as i have on my machine.

not sure, but it seems to me that maybe certain environment requires the live_site to be define somewhere.
my problem: i have no clue how to do it.

i will try to post a separate thread for this

cheers
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 24, 2008, 14:37:14 pm
Hello again!!
Still having problems with uploading 2 files (see reply 49)...
Latest  tests I've made:
USING JPG FILES around 200kb each one...
WITHOUT LOGIN
1st time   2 uploads   OK....
It looks a bit like bgstoval's problem, maybe you can find your solution in his post about it.
http://forum.virtuemart.net/index.php?topic=39666.msg132165#msg132165 (http://forum.virtuemart.net/index.php?topic=39666.msg132165#msg132165)
[/quote]

This really solved my problem.. Thanks for help! Donations will be made!

Congratulations for the work!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: guckie on June 25, 2008, 05:39:11 am
Hi,

This is a fantastic hack -- and a desperately needed one as far as I'm concerned.  Great work thus far!

I think I've discovered an issue I should bring up -- and I'd be grateful (and willing to negotiate pay) if someone can help iron this out.

The issue arises when using text fields in the custom attributes.. and the user enters a string(s) containing commas.  Maybe there is a parsing issue here?

Here are some screenshots:

No Commas Used

(http://web-function.com/cust_atts/CustomAtts1.png)

(http://web-function.com/cust_atts/CustomAtts2.png)

Commas Used (In this case, it works okay)

(http://web-function.com/cust_atts/CustomAtts3.png)

Commas Used (Fee is appropriately added on one line, but omitted on the next.. and vice versa)

(http://web-function.com/cust_atts/CustomAtts4.png)

(http://web-function.com/cust_atts/CustomAtts5.png)

Now things get a little crazy...

(http://web-function.com/cust_atts/CustomAtts6.png)

(http://web-function.com/cust_atts/CustomAtts7.png)

This is the syntax I used when setting up Custom Attributes for the product:

Code: [Select]
(line)(|)(Revise this item?);(line)(|)(Shall we email you a proof of this);(line)(|)(item to mark up and return by fax?);Send Proof?
(checkbox)(|)(Yes,No*);(line)(|)(-------------OR----------------);Revision 1(text)(|)(|2.50|all);Revision 2(text)(|)(|2.50|all);
Revision 3(text)(|)(|2.50|all)

Suggestions/help will be appreciated!

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bobthebob01 on June 25, 2008, 07:41:16 am
out of curiosity,

has anyone tried the VM patch for version 1.1.1 on a site using this site.

also, i did not find any info on the changelog and what is the benefit to apply this patch.

cheers
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on June 26, 2008, 08:19:43 am
Hi,
This is a fantastic hack -- and a desperately needed one as far as I'm concerned.  Great work thus far!
I think I've discovered an issue I should bring up -- and I'd be grateful (and willing to negotiate pay) if someone can help iron this out.
The issue arises when using text fields in the custom attributes.. and the user enters a string(s) containing commas.  Maybe there is a parsing issue here?...

I've asked JK to have a look at this.
When there is more info I'll let you know.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on June 26, 2008, 21:24:48 pm
I think this is a difficult one:

Some of my product price are calculated based on a lot of variables. This variables are not displayed to the users. I have a PHP calculator that calculates everything and returns the price that the shopper Will pay, and the variables width, height, units.

What I need: I would like to send price value, width value, height value and units value to the cart (or to the flypage of this product). To Add to cart, I would have custom attributes for each one of this variables, but hidden from shopper. So when shopper clicks in the add cart, the product will be added with the correct price.

Any ideas???

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: LochenBlue on June 29, 2008, 21:07:29 pm
I am using Joomla 1.5.3 and VM 1.1 and downloaded custom_attribute_extended 2.13 and am either having a huge brain fart and I have uploaded the files wrong.

I need to input quite a few attributes per product, ie Landscape or Portrait, a text field for the customer to input up to 15 characters (these I can manage on the normal "Product Status" page).

Then I need to add an attribute that lets me charge an engraving fee per line (Up to 3 lines) and a text box feature underneath that for Special Instructions.

The product page would look something like:

Landscape No/Yes (+$x.xx)
Your Name  __________________
Engraving  __________________ (+$x.xx)
Engraving  __________________ (+$x.xx)
Engraving  __________________ (+$x.xx)
Special Instructions   **4 Line Text Box**

Now after I installed the hack, it didn't seem like anything had changed on the admin end of VM.

Did I miss something, or not read thru on something, because I am so very lost on adding these attributes.

Thanks for any help!

LochenBlue
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 29, 2008, 21:34:27 pm
LochenBlue,

You have to use the syntax provided in the original thread for Virtumart 1.0.
Those statements go in the Custom Attribute List field for each product that you want to add extended options to. That can be found by "List Products" in Virtuemart, then choosing the product link you want, then selecting the "Product Status" tab. Custom Attribute List is the last field at the bottom.

Here is a link to the syntax you would use there which has not changed between versions:

http://forum.virtuemart.net/index.php?topic=28192.msg79491#msg79491

Be sure to get the syntax right, because if you get even a semicolon wrong it can cause an error message on your website.

Additionally, a new tab is added under Virtuemart Configuration called "Custom Attribute Extended." This gives you the ability to control your upload root path, max file size, and upload file types if using the upload feature, and also an option checkbox to disable the "save cart" feature if you want. (More info on that is listed there, as well as some discussion in the thread above.)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crotech on June 29, 2008, 23:41:23 pm
Is anyone else having issues with the javascript error "loadNewPage is not defined"?

This mod has been working for me on and off. Without any changes to the custom attributes, joomla or virtuemart settings, or changes to the products or other database information, I get the error when trying to view an item with custom attributes and then a little later I don't get the error and it works as it should.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on June 30, 2008, 00:00:20 am
Crotech,

I had sporadic things happening until I applied the fix I listed here:

http://forum.virtuemart.net/index.php?topic=39666.msg132165#msg132165

May not be your problem, but it's worth a shot.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: LochenBlue on June 30, 2008, 04:50:11 am
BG,

Thanks so very much... I have everything set up and running just as I described!

LochenBlue
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crotech on June 30, 2008, 15:23:30 pm
bgstovall,

Thanks for the response. I have verified that the php settings you mentioned are the same. The problem has something to do with default.theme.js or default.theme.prototype.js not getting loaded. I'm still trying to track it down if anybody has experienced this and found a fix, please let me know.

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crotech on June 30, 2008, 16:17:18 pm
I have narrowed the problem down a little more. It seems to be related to the problem reported at http://forum.virtuemart.net/index.php?topic=40737.0 (http://forum.virtuemart.net/index.php?topic=40737.0)

I compared the source of the page when it works with the source of the page when it doesn't work. The subdir parameter for fetchscript.php in the failed source includes is http://domain.com/themes/default rather than /themes/default
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cer on July 08, 2008, 12:39:30 pm
Hack seems to work so far, thanks for your work!
I am using child items with attributes an would like to customize the dropdown menu. I'd like to show only the names of the items' attributes (see the red encircled number in the attached png). Maybe someone can point me to the lines where I've got to comment out the item-name, the hyphens, the parentheses, and the price.
Help would be really appreciated.

------------------------------------------------------------------------

Solved it myself. In case someone want's to know: Go to ps_product_attribute.php an comment out/edit  lines 289, 305 and 320.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: andre.maito on July 09, 2008, 19:07:09 pm
I have a product that have a price field like this:

Total(price-r)(|title-below)(|=);

If I add this product to the cart with value 30.00 (for example), it's ok!

If I want to buy the same product again, but with a different price (90.00 for example), in the cart, both itens will get 90.00. Always the last price added.

It should be 30 + 90 = 120
But is showing 90 + 90 = 180

I've been trying to figure it out on the code, but no success.

Any ideas??? Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 10, 2008, 18:26:02 pm
I tried it on my own test site with same result.
Send JK a mail, asking if he could have a look at this.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Christian Brooker on July 15, 2008, 07:35:06 am
I'm getting an error after uploading files:



Fatal error: Class 'ps_product_custom_type_' not found in /home/divingns/public_html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 71

does anyone know why this is??? is it because im using joomla! 1.0?
Title: "ERROR" when adding product with image upload to cart
Post by: landforce on July 19, 2008, 09:15:04 am
This is perfect for what I needed... but everytime I go to the product, select an image file... upon clicking "Add to Cart" the little popup window comes up and says:

---------------------------
X ERROR

Product quantity has been updated
---------------------------

Gives no explanation of the error at all...

I've read through the thread and haven't seen anything that would help me. Maybe I missed something? Really need to be pointed in the right direction here...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 19, 2008, 09:25:09 am
This is perfect for what I needed... but everytime I go to the product, select an image file... upon clicking "Add to Cart" the little popup window comes up and says:
---------------------------
X ERROR
Product quantity has been updated
---------------------------
Gives no explanation of the error at all...
I've read through the thread and haven't seen anything that would help me. Maybe I missed something? Really need to be pointed in the right direction here...

Turn off add to cart ajax (see first post)

I'm getting an error after uploading files:

Fatal error: Class 'ps_product_custom_type_' not found in /home/divingns/public_html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 71
does anyone know why this is??? is it because im using joomla! 1.0?

Think so...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: landforce on July 21, 2008, 10:04:30 am
damn, figured it was probably something i brushed over. thank you kind sir.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: scoody on July 21, 2008, 18:21:02 pm
not easy syntax ...
i want to have a textarea with lengh
i want to have a textarea with width
i want it to calculate ALONE the surface

Lenght(text)(|field-below)(lenght in m|);
width(text)(|field-below)(width in m|);

VM 1.1.1 joomla 1.54
and after ? 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 21, 2008, 18:40:57 pm
This is not possible with the hack...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: scoody on July 22, 2008, 10:15:36 am
can i call a php file or javascript by the hack or where to modify to have the calculation ?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 22, 2008, 12:40:54 pm
The ps_product_custom_type.php file has all the attribute classes.
This wuld be the best place to add your new attribute class.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: scoody on July 25, 2008, 11:39:09 am
this attribute is the result of the calculation of two input text areas ...  it's not an attribute whre the value is in the database, i do'nt see how to do ...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 25, 2008, 15:37:12 pm
My reply was on your question "where to modify to have the calculation".
You have to make(or let someone else do this) a new attribute class that will do the job for you(calculation).
Like I said before it is not posible with the hack now.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Carlton Brooks on July 26, 2008, 02:18:12 am
Can not Figure out why this is happening.
I have started an update of my site on a localhost.
Using VM 1.1, Joomla 1.5

Her is what is happening, Maybe I missed this in the thread but here goes.
I am selling a large pan of brownies for $30.00. I have included this as a custom attribute
Quote
Brownie Options(checkbox-r)(Choose if you would like the brownies plain or iced|title-hover)( Uniced, Iced [+5.00])( |);  Cutting Options(checkbox-r)(Let us know if you would like the brownies pre-cut|title-hover)( Do not cut, 2x2-inch 96pcs,   2x3-inch 64pcs, 2½x3-inch 48pcs, 3x4-inch 32pcs)( |);  Place in dainty cup(checkbox-r)(For ease of serving we can place the small cut brownies in a dainty cup|title-hover)( Yes -   Place in cup [+1.00], No thank you)( |);  Special Instructions(textarea)(Please let us know of any special packaging or decorating instructions|title-hover)( |)
Basically what I am doing is upgrading the brownie with icing for $5.00 and offering packaging options. When I display the page the iced brownie is displayed as $5.41 an increase of 8.1%. It seems that all my attributes have increased by 8.1%.

Where the heck is it coming from.

When I add the item to the cart and check iced and in cups. It produces the correct price.

Any help greatly appreciated.

Also how can I make the text box where the attribute is added larger.

Carltonb
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 26, 2008, 08:24:50 am
Are you using tax on your site?

The price you use in the attr. syntax should be the price without tax.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: maffmommie on July 26, 2008, 15:51:04 pm
I'm a super-duper newbie and I am very impressed at what this hack can do... only problem is I have no idea how to install it.  Is there a manual or a post where this is explained?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 26, 2008, 15:54:31 pm
Just use FTP to upload and overwrite your existing files.
Make sure you backup the original files before you do, so when get errors, don't like it or what ever reason, you can turn back to your original installation.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: maffmommie on July 26, 2008, 16:37:56 pm
Thanks for the quick reply!  I will try it now.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 27, 2008, 00:26:35 am
not easy syntax ...
i want to have a textarea with lengh
i want to have a textarea with width
i want it to calculate ALONE the surface
Lenght(text)(|field-below)(lenght in m|);
width(text)(|field-below)(width in m|);

I know that more people would like a attribute that works the way scoody wants.
I asked JK and he can make such an attribute.
Anyone who want this also and like to share in the costs PM me.
It's no big investment, so the more people respond the less we all have to share.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: s2u on July 27, 2008, 22:55:39 pm
 ??? HELP  ???

I'm using joomla 1.5.4 and vm 1.1.0 - when i add values in Custom attribute list I only get to write one line - in the old version for joomla 1.0.X and vm -1.0.X it was possible to make new lines in the custom att. text field in the admin?

???

Morten
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 28, 2008, 00:58:47 am
In product.product_form.php find:
Code: [Select]
<input class="inputbox" type="text" name="product_custom_attribute" value="<?php $db->sp("custom_attribute"); ?>" size="64" />

And change this to:
Code: [Select]
<textarea class="inputbox" rows="3" cols="70" name="product_custom_attribute"><?php $db->sp("custom_attribute"); ?></textarea>

You can change the size by playing with "rows" and "cols"

Hope this is what you mean.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: s2u on July 28, 2008, 09:08:34 am
Hi Marco

Think it is, but can't see the code You have posted

Morten
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 28, 2008, 09:11:35 am
Should be in the file, did you search the file?
Try searching for "product_custom_attribute"
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: s2u on July 28, 2008, 22:33:28 pm
Hi again Marco

Justed went into an 1.0.x VM and copied the Custom Attributes from product.product_form.php into my 1.1.1 VM - works nice now - thanks for Your hint - by the way - love this hack - and looking forward to get this as standard in VM.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: s2u on July 28, 2008, 22:47:42 pm
Okay - ran into another problem... how can i style the custom attrib. in the checkout screens and in the confirmation e-mail - I have around 30 attributes for every product and it looks kind of messy...

Another thin is - I can't get pictures to show i selectboxes, checkboxes or radiobuttuons

Someone?

Morten
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Carlton Brooks on July 31, 2008, 05:18:38 am
Why is this happening.

It seems like the code is being inserted into the add cart button area, instead of above it.
Unless this is the way it is supposed to work in version 1.1

carltonb



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on July 31, 2008, 08:14:53 am
This is the right place for the attributes.
You only have to adjust the looks of it or maybe select an other flypage.

Okay - ran into another problem... how can i style the custom attrib. in the checkout screens and in the confirmation e-mail - I have around 30 attributes for every product and it looks kind of messy...
Another thin is - I can't get pictures to show i selectboxes, checkboxes or radiobuttuons
Someone?
Morten

I never looked were to adjust the attributes style for the checkout, maybe someone else can help.
Could you give the syntax you use for showing the images?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 01, 2008, 19:33:33 pm
Is this mod compatible w/ v1.1.2 of Virtuemart?  I'm going through the files comparing them and there seems to be a change in the way the templating engine works, but not enough to change the variable names, just the way its called is different.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 01, 2008, 19:47:10 pm
Haven't had time to try it yet.
But give it a try and please let us know what happend(or not :) )
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 01, 2008, 20:52:47 pm
Haven't had time to try it yet.
But give it a try and please let us know what happend(or not :) )

Tried it, and see no problem as of yet.  But a bit weary of using old code w/ new since it tends to inherit the problems of the older versions.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 01, 2008, 21:04:45 pm
I see what you mean.
That's a problem with hacks in general.
I could have a look, when I have some time, if I can filter out the attributes hack code and see if it fits in the VM updated pages.

Or I could ask JK to fit it in, but I don't know what it will cost.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 01, 2008, 21:25:17 pm
I see what you mean.
That's a problem with hacks in general.
I could have a look, when I have some time, if I can filter out the attributes hack code and see if it fits in the VM updated pages.

Or I could ask JK to fit it in, but I don't know what it will cost.
I'll do it for free, I've already done most of it anyways.  Just too lazy to do it lol, since i do it as a job.  But i'm more than willing to take donations for my work once its done :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 01, 2008, 21:31:53 pm
2 new features added to ver.15 thanks to Ben Stovall.

Have a look at this topic (http://forum.virtuemart.net/index.php?topic=39666.msg132194#msg132194) here is were he explains his features.

Sorry that I use his reply for explaining it, but I did not have time to test the features myself.

The syntax to use (sample from Ben's site):

Code: [Select]
Matching Tag Name(text)(Up to 40 Chars|field-below)(|char_nospace)(checkbox:group1,Select to purchase Personalized Matching Tags.,24);
Matching Tag Date(text)(Up 24 Char.|field-below)(|char_nospace)(checkbox:group1);
Matching Tag(select)(|)(Yes [+0.35](checkbox:group1);
Personalized Tag Name(text)(|)(|char_nospace)(checkbox:group,Select to purchase Personalized Tags.,24);
Personalized Tag Date(text)(|)(|char_nospace)(checkbox:group);
Personalized Tag Shape(select)(|)(Select Option,Diamond,Heart,Circle,None)(checkbox:group);
Personalized Tag Design(select)(|)(Select Option,Cupid,Cosmopolitan,Classical,Grecian,Victorian,Contemporary,Baroque,Garden,None)(checkbox:group);
Personalized Tag Color(select)(|)(Select Option,Red,Periwinkle,Pale Yellow,Blue,Light Blue,Ballet Pink,Burgundy,Pink,Lavender,Sage,Hot Pink,Mint,Pearl Gray,Deep Lilac,Coral,None)(checkbox:group,test);
Personalized Tag(select)(|)(Yes [+0.35](checkbox:group);
(select)(|)(No Tags)(checkbox:group2,No tags please.)

What this syntax would look like on a product page you can see here: Link (http://www.iheartbabyfavors.com/Baby-Shower-Favors/A-Baby-is-Brewing-Coffee-Cup-Mini-Candle.html)
Is a page on Ben's site so please use it right.

Thanks Ben for sharing this!


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 01, 2008, 21:35:55 pm
I'll do it for free, I've already done most of it anyways.  Just too lazy to do it lol, since i do it as a job.  But i'm more than willing to take donations for my work once its done :)

Even better. ;D
I just dropped a new version of the hack (ver .15)
Had it for a few days, but no time to test and place it here.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 01, 2008, 21:48:23 pm
Here's something that might interest you.  Its a mod i made for the attribute mod lol.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 01, 2008, 22:04:02 pm
Sure looks nice and something a lot out there can use.

I'll see if I can test it this weekend.
Any tips for the syntax to use?
Or maybe you have a working sample somewere.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 02, 2008, 03:43:53 am
A sample syntax for it wuold be:
Name(text)(tip here|location)(default text|price|charge type);

or

Name(text)(tip here|location)(default text|cost per word after number of words|word|number of words);

Example:
Comment(text)(tip here|location)(|0.15|word|20);

Supposed the cost of the item is $10, if you put < 20 words in the box, its $10, > 20, its $10 + 0.15 per word after 20.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: caseyd on August 02, 2008, 04:07:13 am
Could someone please post what the correct syntax is?

I have installed successfully, but cannot seem to locate the proper syntax guidelines.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 02, 2008, 08:00:30 am
http://forum.virtuemart.net/index.php?topic=28192.0 (http://forum.virtuemart.net/index.php?topic=28192.0) see first post of this topic.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 06:35:18 am
Here's the mod that has been integrated in with v1.1.2.  Let me know if it works for everyone, it should since i just tried it myself and it worked fine.

If you find this mod useful, please feel free to show your support by donating money using paypal to nemesis@nodeka411.net.  All donations are welcome.

Its the same exact mod, no changes, just updated to include the latest security changes to the Virtuemart so you don't inherit the defects of the previous versions that this mod was based on.

I've added my own touch by expanding the input box into a text area to allow for easier editing.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 08:38:33 am
Thanks.

What do you mean with your last line "expanding the input box into a text area"?
There is a textarea attribute allready.

I did not have time to try your other addons, hope to test soon.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 15:29:53 pm
Thanks.
What do you mean with your last line "expanding the input box into a text area"?
There is a textarea attribute allready.
I did not have time to try your other addons, hope to test soon.

The attributes input box when you goto add a product, it used to be a single input box, now its a text area.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 15:50:14 pm
Ok, that one you mean.


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 18:30:29 pm
Also made same changes to v2.15 as stated in the following post:
http://forum.virtuemart.net/index.php?topic=39666.msg140066#msg140066

*Edited: Removed link to v2.15 due to bad version.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 18:57:10 pm
You are realy working hard  ;D

Thanks for that.
I will place them in the first post, if that's ok with you?

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 19:19:32 pm
Thats fine.  Actually, there seems to be a problem w/ v2.15, i didn't copy somethin so i need to trace it down.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 19:22:24 pm
Ok, I deleted 2.15 for now from the first post.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 19:58:11 pm
I installed v2.15 w/o my changes, and it doesn't work at all in v1.1.2.  I tried the new feature it said it offered, and copy and pasted the example into one of my products and it didn't display.  I visit the product page and nothing displays on the page for extra attributes.  i look at the source there's nothin there.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 20:06:31 pm
Did you upload the new tempate files?
In directory (zipfile) components\com_virtuemart\themes\default\templates\product_details\includes\custom attribute you can find them.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 20:20:31 pm
yes i did.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 20:26:06 pm
Sorry, I can't help any further, because I did not test it myself yet.
I know Ben Stovall has it working on VM 1.1.0

Hope to find some time myself this week to test.
But others downloaded also, maybe they can post their findings here...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 21:14:41 pm
I've tracked down the problem.  Its a misnamer on the folder you specified.  In the zip its referenced as "product_details/includes/custom attribute/" but in the code you're referencing "product_details/includes/custom_attribute/"   (missing the underscore between custom and attribute).  Once that was fixed, it displayed, but now need to see why its not grouping how it should.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 21:48:16 pm
The javascript that Ben has on his website is missing completely from the mod itself so that tells me this isn't the complete mod, chunks of it are missing.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 04, 2008, 21:53:48 pm
I will ask JK, if he used script files and forgot to put them in the zip.
Strange that no one else reported this, it's allready downloaded 19 times.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on August 04, 2008, 22:04:37 pm
Testing it to, but same problem here.

Thougt it was me, because no one was reporting it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 04, 2008, 22:07:37 pm
Found the javascript code, but still no luck tracking down the bug.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: rynox on August 05, 2008, 00:13:23 am
Nemesis02,

Any luck locating the problem?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 05, 2008, 14:23:39 pm
I have looked around but cannot figure out if this will be usable on J1.0.15 w/ VM 1.1.2.... really the only feature I am looking for is a popup calendar custom attribute to allow customer to select a date for service.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 05, 2008, 14:26:49 pm
See first post.
 vm112_custom_attribute_extended_2.13.zip should work
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 05, 2008, 14:49:43 pm
Thanks Marco... I didn't read that in the first post though...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 05, 2008, 14:56:36 pm
Fatal error: Class 'JHTML' not found in /home/*****/public_html/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php on line 26

FYI... it does not...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 05, 2008, 15:00:59 pm
We have to wait on Nemesis02, he converted it to VM1.1.2 and got it working with his shop.

I did not have time to test myself yet, so it's hard for me to say you're right.
Could you post when you have this error?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 05, 2008, 15:06:14 pm
I just had it.. just replaced all the files with manual install package of VM 1.1.2 (except for my modified template files)

I did this on a live site... but fortunately was able to fix in under 10 mins by replacing the files...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 05, 2008, 15:08:44 pm
So, no error anymore?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 05, 2008, 15:10:57 pm
oh... when do I receive the error? when navigating to the display product page, clicking add to cart from the category browse page...

I usually am running PHP4, but changed it to PHP5 after that error, still same issue...

I mentioned I am using J1.0.15 ... not J1.5...

It seems the error is when the JHTML call is made in addtocart_form.tpl.php ... this is a PHP class, I gather, but I am not very advanced with object oriented programming ... yet...

No, there is no error anymore, because I removed it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 05, 2008, 16:13:39 pm
Ok, from this example you gave in a previous post:
Code: [Select]
Matching Tag Name(text)(Up to 40 Chars|field-below)(|char_nospace)(checkbox:group1,Select to purchase Personalized Matching Tags.,24);
Matching Tag Date(text)(Up 24 Char.|field-below)(|char_nospace)(checkbox:group1);
Matching Tag(select)(|)(Yes [+0.35](checkbox:group1);
Personalized Tag Name(text)(|)(|char_nospace)(checkbox:group,Select to purchase Personalized Tags.,24);
Personalized Tag Date(text)(|)(|char_nospace)(checkbox:group);
Personalized Tag Shape(select)(|)(Select Option,Diamond,Heart,Circle,None)(checkbox:group);
Personalized Tag Design(select)(|)(Select Option,Cupid,Cosmopolitan,Classical,Grecian,Victorian,Contemporary,Baroque,Garden,None)(checkbox:group);
Personalized Tag Color(select)(|)(Select Option,Red,Periwinkle,Pale Yellow,Blue,Light Blue,Ballet Pink,Burgundy,Pink,Lavender,Sage,Hot Pink,Mint,Pearl Gray,Deep Lilac,Coral,None)(checkbox:group,test);
Personalized Tag(select)(|)(Yes [+0.35](checkbox:group);
(select)(|)(No Tags)(checkbox:group2,No tags please.)

It's not checkbox, its radiobutton.  That displays it, but now i have some sort of javascript error.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 05, 2008, 17:16:57 pm
It is either way, you can have checkboxes or radiobutton, not both, Ben explained me.
But I don't know when you can set one or the other.
Have to ask Ben this, believe it has something to do with the extra template pages JK made.

I mentioned I am using J1.0.15 ... not J1.5...

Ok, didn't read your first post to well, with J1.0.15 you have to ask others, maybe start a new topic to see if you can get to a working version together.
This hack was made for J1.5 and VM1.1
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 05, 2008, 17:45:01 pm
After looking over the code, checkbox is not working, radiobutton is the one that works.  He did not include the checkbox include into the custom templates which invalidated checkbox.  After adding the include, checkbox worked.

On another note, aside from that issue, it works now, i figured out my problem is that my page had jquery also loaded into it and it overwrote javascripts default $$ with its own.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 05, 2008, 18:22:23 pm
Here's a working copy of v2.15 for VM 1.1.2.

Modifications:
*  Renamed the folder "custom attribute" to "custom_attribute" under the directory components\com_virtuemart\themes\default\templates\product_details\includes\
*  Added ps_product_custom_type_checkbox_selector.tpl.php include to text and select files under custom_attribute.

The example in one of the previous posts will work, and it will work with radiobutton and checkbox instead of just radiobutton.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on August 06, 2008, 07:29:46 am
Ok, didn't read your first post to well, with J1.0.15 you have to ask others, maybe start a new topic to see if you can get to a working version together.
This hack was made for J1.5 and VM1.1

giving up on it.. maybe will do a conversion to J1.5, but this is a headache too, as I have to rebuild template for J1.5, and many custom components and hacks for j1.0 are in there as well...

All I really wanted was the custom attribute of a drop down date field.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 06, 2008, 15:32:39 pm
Ok, didn't read your first post to well, with J1.0.15 you have to ask others, maybe start a new topic to see if you can get to a working version together.
This hack was made for J1.5 and VM1.1
giving up on it.. maybe will do a conversion to J1.5, but this is a headache too, as I have to rebuild template for J1.5, and many custom components and hacks for j1.0 are in there as well...
All I really wanted was the custom attribute of a drop down date field.

You should be able to load your 1.0 modules and components under 1.5 if you have legacy mode enabled.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gunerh on August 06, 2008, 17:33:32 pm
I am having problems with file upload attribute. I have done the instructions completeley but still no success in uploading files. Can anybody please help me out about that. I am using the last version of the hack for vm1.1.2 and j1.5.
thnx
Huseyin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 06, 2008, 18:03:16 pm
I am having problems with file upload attribute. I have done the instructions completeley but still no success in uploading files. Can anybody please help me out about that. I am using the last version of the hack for vm1.1.2 and j1.5.
thnx
Huseyin

The first option you must give it is a path to where it stores the files, have you made the directory you want it to store the files in?

Secondly, have you set the permissions for that folder to allow it for people to upload?  I believe it should be set to 766.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on August 06, 2008, 18:37:04 pm
Hi guys,

Here's a working copy of v2.15 for VM 1.1.2.
Modifications:
*  Renamed the folder "custom attribute" to "custom_attribute" under the directory components\com_virtuemart\themes\default\templates\product_details\includes\
*  Added ps_product_custom_type_checkbox_selector.tpl.php include to text and select files under custom_attribute.
The example in one of the previous posts will work, and it will work with radiobutton and checkbox instead of just radiobutton.

I tested this version, and it lookes like it is working ok now.

I'm willing to pay the $45 to ad also the textarea attribute to the template system. bgstovall, do you take care of this like you posted in #106, or do i need to contact JK myself? Let me know, than i will pay you trough Paypal.

An other question i have is that images added to an selectable item in a dropdown box don't show up anymore in this a bug or is this by design for this version? And if so, can they be added again to the Dropdown attribute?

thanks,

Ivo
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 06, 2008, 19:11:25 pm
I am having problems with file upload attribute. I have done the instructions completeley but still no success in uploading files. Can anybody please help me out about that. I am using the last version of the hack for vm1.1.2 and j1.5.
thnx
Huseyin
The first option you must give it is a path to where it stores the files, have you made the directory you want it to store the files in?
Secondly, have you set the permissions for that folder to allow it for people to upload?  I believe it should be set to 766.

In VM configuration there is an attribute tab, were you can set the default upload path. Even default max and min file size and file types can be set there.


I'm willing to pay the $45 to ad also the textarea attribute to the template system. bgstovall, do you take care of this like you posted in #106, or do i need to contact JK myself? Let me know, than i will pay you trough Paypal.
An other question i have is that images added to an selectable item in a dropdown box don't show up anymore in this a bug or is this by design for this version? And if so, can they be added again to the Dropdown attribute?

The price JK metioned at the time was while he was doing the whole modification for Ben Stovall. So, adding it now could be a different price.
Did the images show up right in the .13 version of the script, could you tell this? It could be a  version .15 bug.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ivo claessens on August 06, 2008, 20:53:59 pm
Quote
I'm willing to pay the $45 to ad also the textarea attribute to the template system. bgstovall, do you take care of this like you posted in #106, or do i need to contact JK myself? Let me know, than i will pay you trough Paypal.
An other question i have is that images added to an selectable item in a dropdown box don't show up anymore in this a bug or is this by design for this version? And if so, can they be added again to the Dropdown attribute?
The price JK metioned at the time was while he was doing the whole modification for Ben Stovall. So, adding it now could be a different price.
Did the images show up right in the .13 version of the script, could you tell this? It could be a  version .15 bug.
Ok, just make a price for it what it will cost now.
The images worked in version .13 yes. I creadet a string that worked then, but now not anymore.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 06, 2008, 21:44:52 pm
I will contact JK with your questions.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 08, 2008, 06:50:46 am
Hi guys,
Here's a working copy of v2.15 for VM 1.1.2.
Modifications:
*  Renamed the folder "custom attribute" to "custom_attribute" under the directory components\com_virtuemart\themes\default\templates\product_details\includes\
*  Added ps_product_custom_type_checkbox_selector.tpl.php include to text and select files under custom_attribute.
The example in one of the previous posts will work, and it will work with radiobutton and checkbox instead of just radiobutton.
I tested this version, and it lookes like it is working ok now.
I'm willing to pay the $45 to ad also the textarea attribute to the template system. bgstovall, do you take care of this like you posted in #106, or do i need to contact JK myself? Let me know, than i will pay you trough Paypal.
An other question i have is that images added to an selectable item in a dropdown box don't show up anymore in this a bug or is this by design for this version? And if so, can they be added again to the Dropdown attribute?
thanks,
Ivo

What text area attribute to the template? You mean to the grouping?  There's already a text area attribute in the mod.  If so, i can sell my services to do that.  Heh, poor college student myself, could use the extra cash.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gunerh on August 08, 2008, 17:20:12 pm
I am having problems with file upload attribute. I have done the instructions completeley but still no success in uploading files. Can anybody please help me out about that. I am using the last version of the hack for vm1.1.2 and j1.5.
thnx
Huseyin
The first option you must give it is a path to where it stores the files, have you made the directory you want it to store the files in?
Secondly, have you set the permissions for that folder to allow it for people to upload?  I believe it should be set to 766.
I have set all those accordingly but i get errors when I try to upload  any file. I need to finish my website. I love this hack .
Code: [Select]
....

Notice: Undefined index: Text Line 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 628

Notice: Undefined offset: 4 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 629

Notice: Undefined index: Photo in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 638

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 805

Notice: Undefined index: Text Line 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 805

Notice: Undefined index: Text Line 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 628

Notice: Undefined offset: 4 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 629

Notice: Undefined index: Photo in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 638

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405

Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 08, 2008, 17:33:39 pm
I am having problems with file upload attribute. I have done the instructions completeley but still no success in uploading files. Can anybody please help me out about that. I am using the last version of the hack for vm1.1.2 and j1.5.
thnx
Huseyin
The first option you must give it is a path to where it stores the files, have you made the directory you want it to store the files in?
Secondly, have you set the permissions for that folder to allow it for people to upload?  I believe it should be set to 766.
I have set all those accordingly but i get errors when I try to upload  any file. I need to finish my website. I love this hack .
Code: [Select]
....
Notice: Undefined index: Text Line 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 628
Notice: Undefined offset: 4 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 629
Notice: Undefined index: Photo in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 638
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 805
Notice: Undefined index: Text Line 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 805
Notice: Undefined index: Text Line 2 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 811
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 628
Notice: Undefined offset: 4 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 629
Notice: Undefined index: Photo in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 638
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 1 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 405
Notice: Undefined offset: 3 in /home/content/c/a/l/calinbek/html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69
Those are not errors, they're notices, your error reporting in php is set to display all issues, whether they're a critical problem or not.
TO fix this is fairly simple and there's a couple of ways to do this.

First way:
Open index.php and add the following line after the <?PHP
error_reporting(E_ALL ^ E_NOTICE);

Second way:
Open your php.ini file and change the following line
error_reporting  =  E_ALL

to

error_reporting  =  E_ALL & ~E_NOTICE

Third way, is create a php.ini file in your base directory where joomla is, and add this one line to it:

error_reporting  =  E_ALL & ~E_NOTICE

It should work on most shared hosting providers and what it does is loads a custom php.ini file to suit your needs.

Let me know if any of these help w/ your issue.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gunerh on August 08, 2008, 17:48:19 pm
I have delibrately set the error reporting to maximum value through global configuration of joomla admin. I am really helpless in achieving file upload attribute to work. I thought those warnings might help you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gunerh on August 08, 2008, 18:08:03 pm
yeah i got the error .. sorry for disturbance. virtuemart product scroller causes the error. i have unpublished it . thank you for your beloved helps
Huseyin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ssoltz on August 08, 2008, 19:06:51 pm
Anyone got a version of this to work in Mambo 4.6X?

Just trying to get ahead of the game. I don't need it yet but will soon.

Thanks,
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gunerh on August 08, 2008, 21:06:30 pm
I have problem with layout of custom attributes on internet explorer - done some search about it and it is due to float:left css attribute. has anyone of you resolved this issue. it looks really absurd.. thanks for your helps
huseyin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: clevey on August 08, 2008, 21:54:14 pm
This hack works great.  Because of my layout, I need to make the file upload textbox smaller (the browse button ends up unreadable off to the right).

Can anyone point me to where I could make this change?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 10, 2008, 18:31:36 pm
This hack works great.  Because of my layout, I need to make the file upload textbox smaller (the browse button ends up unreadable off to the right).
Can anyone point me to where I could make this change?
administrator\components\com_virtuemart\classes\ps_product_custom_type.php

Edit around line 613, should look similar to this:
Code: [Select]
if(!$field['attr_post_value']){
    $html .= "<input class=\"inputbox\" type=\"hidden\" name=\"".$titlevar."\" id=\"".$titlevar."_field\" value=\"\" /><input class=\"inputbox\" type=\"file\" name=\"".$titlevar."\" id=\"".$titlevar."_file\" onclick=\"document.addtocart.encoding = 'multipart/form-data';\" onchange=\"document.getElementById('".$titlevar."_field').value = document.getElementById('".$titlevar."_file').value;\" size=\"35\" />";
} else {
    $html .= "<input class=\"inputbox\" type=\"hidden\" name=\"".$titlevar."\" id=\"".$titlevar."_field\" value=\"\" /><input class=\"inputbox\" type=\"file\" name=\"".$titlevar."\" id=\"".$titlevar."_file\" value=\"".trim($field['attr_post_value'])."\" onclick=\"document.addtocart.encoding ='multipart/form-data';\" onchange=\"document.getElementById('".$titlevar."_field').value = document.getElementById('".$titlevar."_file').value;\" size=\"35\" />";
}
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 12, 2008, 18:55:25 pm
Hello,

I am using this hack (2.15) on VM 1.1.2 and Joomla 1.5.5.
I have an error when i use the Upload file option.

I fix the path of the upload file, with the permissions set to 766;
And i check on my server and the file are not here.

I display the cutom attribute in child product.

Some one can help me
Thank you.
 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 13, 2008, 04:10:26 am
Hello,
I am using this hack (2.15) on VM 1.1.2 and Joomla 1.5.5.
I have an error when i use the Upload file option.
I fix the path of the upload file, with the permissions set to 766;
And i check on my server and the file are not here.
I display the cutom attribute in child product.
Some one can help me
Thank you.

This is a quote from the first post:
Quote
The 2.1 version seemed to have a file upload problem and a cart update problem.

Now after doing much research into this issue, I've found where the problem lies.  The problem is not with the mod itself, but with virtuemart.  Virtuemart implemented ajax into the component, and ajax does NOT handle file uploads.  If you wish to get file uploading to work under the new Virtuemart, you must disable ajax in the Admin > Configuration > Site > Layout > Configuration and set the question "Use Ajax to add, update or delete products from the cart?" to No.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 13, 2008, 04:58:19 am
Quote
If you wish to get file uploading to work under the new Virtuemart, you must disable ajax in the Admin > Configuration > Site > Layout > Configuration and set the question "Use Ajax to add, update or delete products from the cart?" to No.

Hello,
I tested it, I don't have error but the file is not uploaded and after i add to cart i go to the home page.

Do you know witch version of VM,hack and joomla is working for custom attribute with child product ? it's because i really need to use the upload option for my web site.

thank you very much for your help.
 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 13, 2008, 05:20:56 am
Quote
If you wish to get file uploading to work under the new Virtuemart, you must disable ajax in the Admin > Configuration > Site > Layout > Configuration and set the question "Use Ajax to add, update or delete products from the cart?" to No.
Hello,
I tested it, I don't have error but the file is not uploaded and after i add to cart i go to the home page.
Do you know witch version of VM,hack and joomla is working for custom attribute with child product ? it's because i really need to use the upload option for my web site.
thank you very much for your help.
I'm using latest version of virtuemart, and the 112vm_ patch on the first page.  Let me look over it myself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 13, 2008, 05:25:43 am
I disabled Ajax myself, added the following to an item:
Code: [Select]
Upload(file)(|)(vmdocuments);
Selected a document from the product screen and added to cart and it uploaded just fine.  I didn't have to create the directory at all, it created and uploaded the file on its own.  In the line above, all uploads will be put in the vmdocuments folder of the website.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 13, 2008, 06:40:14 am
Thank you is working now.

I don't know why but i change the path and now it's working.
How did you manage to change that after you add to the cart you go to the home page?

thank you again.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 13, 2008, 14:29:14 pm
I actually modified mine to redirect to the cart once it was added.  To do that, search for the following code in administrator/components/com_virtuemart/classes/ps_cart.php
Code: [Select]
if( vmIsXHR() ) {
$GLOBALS['vm_mainframe']->scriptRedirect( $sess->url( 'index.php?page=shop.waiting_list&product_id='.$product_id, true, false ) );
} else {
vmRedirect( $sess->url( 'index.php?page=shop.waiting_list&product_id='.$product_id, true, false ) );
}
}

This code would be in the add function, and below it before the final closing brace to close out the function add the following:
Code: [Select]
if( vmIsXHR() ) {
$GLOBALS['vm_mainframe']->scriptRedirect( $sess->url( 'index.php?page=shop.cart&product_id='.$product_id, true, false ) );
} else {
vmRedirect( $sess->url( 'index.php?page=shop.cart&product_id='.$product_id, true, false ) );
}
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 13, 2008, 16:55:16 pm
I actually modified mine to redirect to the cart once it was added.  To do that, search for the following code in administrator/components/com_virtuemart/classes/ps_cart.php
Code: [Select]
if( vmIsXHR() ) {
$GLOBALS['vm_mainframe']->scriptRedirect( $sess->url( 'index.php?page=shop.waiting_list&product_id='.$product_id, true, false ) );
} else {
vmRedirect( $sess->url( 'index.php?page=shop.waiting_list&product_id='.$product_id, true, false ) );
}
}
This code would be in the add function, and below it before the final closing brace to close out the function add the following:
Code: [Select]
if( vmIsXHR() ) {
$GLOBALS['vm_mainframe']->scriptRedirect( $sess->url( 'index.php?page=shop.cart&product_id='.$product_id, true, false ) );
} else {
vmRedirect( $sess->url( 'index.php?page=shop.cart&product_id='.$product_id, true, false ) );
}

I just try it, i am sorry but it doesn't work on my web site.
Thank you anyway for your time, may be is come from my cart because i don't use the cart of VM. I will try to find a solution.

Thank you again
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: klke on August 14, 2008, 17:47:49 pm
hi, i tested this mod. i want show a attribute list(with checkbox) same than http://www.kayagrowshops.com/index.php?page=shop.browse&category_id=25&option=com_virtuemart&Itemid=1
i can use this mod for this?
please helpme
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Noob Programmer on August 15, 2008, 18:55:18 pm
I have two questions.

1. Is it possible to hide the (+ #.##) in the Cart but still show it when selecting your attributes?

2. Is it possible to use this hack to select/update your attributes in a Cart module off to the side instead of having to delete and re-add the item in question?

Thanks,
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Carlton Brooks on August 16, 2008, 23:38:44 pm
Thought I had the problem fixed but it just started to show up again. Do not know what is wrong, how I fixed before and what changed to unfix it.

I am using Joomla 1.5 and VM 1.1.2

My cuastom attribute is as follows
Code: [Select]
Brownie Options(checkbox-r)(Choose if you would like the brownies plain or iced|title-hover)( Uniced, Iced[+5.00])( |);Cutting Options(checkbox-r)(Let us know if you would like the brownies pre-cut|title-hover)( Do not cut, 2x2-inch 96pcs, 2x3-inch 64pcs, 2½x3-inch 48pcs, 3x4-inch 32pcs)( |);Place in dainty cup(checkbox-r)(For ease of serving we can place the small cut brownies in a dainty cup|title-hover)( Yes - Place in cup [+1.00], No thank you)( |);Special Instructions(textarea)(Please let us know of any special packaging or decorating instructions|title-hover)( |)
The display on the VM page looks like this (see attached)

Why if I list the price of the Iced Brownie of an upcharge of $5.00 it displays $5.41 an 8.5% increase. Is there some tax rate affecting this. I have deleted all taxes.

Thanks
Carltonb


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 17, 2008, 04:03:38 am
[EDIT: The attachment was deleted. Please see Reply #237]

Hi everyone, just reading this thread for the first time in a while. WOW! You guys have done a lot in my absence.

Sorry for being away for so long, I've been working on several websites. I paid JK for some extended features to this hack (with some help from Marco -- Thanks!) and am very happy with the results.

I'll answer any questions you have if I can, but it's hard finding the time to read through all of the thread. If you have any questions regarding the enhancements I had JK institute that I can help with, send me a PM and I'll give you my direct email address.

I now have this code working on a live website here:

http://www.iheartbabyfavors.com

Go to the Baby Shower Favors section to check out how it works.

JK told me it was going to be difficult and pricey to make the code work with both check boxes and radio buttons, so for my site's needs, I went with radio buttons.

This is working 100% with my live production site, however I was unable to get it working using AJAX. You will see that AJAX is OFF on my site.

If you are curious about the syntax I used, here is the syntax I used for the following page:

http://www.iheartbabyfavors.com/Candle-Favors/A-Baby-is-Brewing-Coffee-Cup-Mini-Candle.html

Quote
Matching Tag Name(text)(Up to 40 Chars|field-below)(|char_nospace)(checkbox:group1,Select to purchase Personalized Matching Tags.,24);Matching Tag Date(text)(Up 24 Char.|field-below)(|char_nospace)(checkbox:group1);Matching Tag(select)(|)(Yes [+0.35](checkbox:group1);Personalized Tag Name(text)(|)(|char_nospace)(checkbox:group,Select to purchase Personalized Tags.,24);Personalized Tag Date(text)(|)(|char_nospace)(checkbox:group);Personalized Tag Shape(select)(|)(Select Option,Diamond,Heart,Circle,None(checkbox:group);Personalized Tag Design(select)(|)(Select Option,Cupid,Cosmopolitan,Classical,Grecian,Victorian,Contemporary,Baroque,Garden,None)(checkbox:group);Personalized Tag Color(select)(|)(Select Option,Red,Periwinkle,Pale Yellow,Blue,Light Blue,Ballet Pink,Burgundy,Pink,Lavender,Sage,Hot Pink,Mint,Pearl Gray,Deep Lilac,Coral,None)(checkbox:group,test);Personalized Tag(select)(|)(Yes [+0.35](checkbox:group);(select)(|)(No Tags)(checkbox:group2,No tags please.)

Attached below are the exact files I am currently using on the above website. I should mention that I am using VM 1.1.1 and Joomla 1.5.4. 

Hope this helps.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nemesis02 on August 18, 2008, 18:02:26 pm
Thought I had the problem fixed but it just started to show up again. Do not know what is wrong, how I fixed before and what changed to unfix it.
I am using Joomla 1.5 and VM 1.1.2
My cuastom attribute is as follows
Code: [Select]
Brownie Options(checkbox-r)(Choose if you would like the brownies plain or iced|title-hover)( Uniced, Iced[+5.00])( |);Cutting Options(checkbox-r)(Let us know if you would like the brownies pre-cut|title-hover)( Do not cut, 2x2-inch 96pcs, 2x3-inch 64pcs, 2½x3-inch 48pcs, 3x4-inch 32pcs)( |);Place in dainty cup(checkbox-r)(For ease of serving we can place the small cut brownies in a dainty cup|title-hover)( Yes - Place in cup [+1.00], No thank you)( |);Special Instructions(textarea)(Please let us know of any special packaging or decorating instructions|title-hover)( |)The display on the VM page looks like this (see attached)
Why if I list the price of the Iced Brownie of an upcharge of $5.00 it displays $5.41 an 8.5% increase. Is there some tax rate affecting this. I have deleted all taxes.
Thanks
Carltonb

I believe i had a similar problem, ensure that you have virtual taxes on the Admin > Configuration page turned off and the independent state taxes deleted as well.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Noob Programmer on August 18, 2008, 20:55:33 pm
Matching Tag Name(text)(Up to 40 Chars|field-below)(|char_nospace)(checkbox:group1,Select to purchase Personalized Matching Tags.,24);Matching Tag Date(text)(Up 24 Char.|field-below)(|char_nospace)(checkbox:group1);Matching Tag(select)(|)(Yes [+0.35](checkbox:group1);Personalized Tag Name(text)(|)(|char_nospace)(checkbox:group,Select to purchase Personalized Tags.,24);Personalized Tag Date(text)(|)(|char_nospace)(checkbox:group);Personalized Tag Shape(select)(|)(Select Option,Diamond,Heart,Circle,None(checkbox:group);Personalized Tag Design(select)(|)(Select Option,Cupid,Cosmopolitan,Classical,Grecian,Victorian,Contemporary,Baroque,Garden,None)(checkbox:group);Personalized Tag Color(select)(|)(Select Option,Red,Periwinkle,Pale Yellow,Blue,Light Blue,Ballet Pink,Burgundy,Pink,Lavender,Sage,Hot Pink,Mint,Pearl Gray,Deep Lilac,Coral,None)(checkbox:group,test);Personalized Tag(select)(|)(Yes [+0.35](checkbox:group);(select)(|)(No Tags)(checkbox:group2,No tags please.)

I tried using the same syntax you've posted and I get checkboxes instead of radio buttons. I think it might have something to do with you using hack version 11 and I used 112. But what I am really interested in is if it is possible to add or remove options depending on what the user selected in a 'select'(dropdown) box?

Example for a pizza store:

I've been trying to come up with custom code to determine this but I have no idea where to insert it. VM is simply too complicated for me.



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on August 18, 2008, 22:28:44 pm
Hi!

I am looking at this component for the first time and need some help (please)!
The thing i am trying to do is:

 o Product quantity (0-50x)
   > subproduct costs 0,50
 
when
 
 o Product quantity (50-100x)
   > subproduct costs 0,60

Is this possible??
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 18, 2008, 23:19:34 pm
Hi Noob Programmer,

If you download the files I attached you will get radio buttons versus checkboxes. [EDIT: The download I provided has been updated to address this please see Reply #237]

As far as your second question, what it sounds like is you are wanting dynamic options.  In order to do this it would require a relational database call scenario, and is out of scope for this hack.

That is a feature I would love for Virtuemart to incorporate in the future but I think it would take some people willing to pay a programmer for that functionality for it to happen any time soon. Keep in mind though, it would be nearly impossible to perform upgrades after such major changes, so the goal would have to be to get the Virtuemart developers interested enough in it to include it in regular builds.  If you really need it, Joseph Kwan might be able to program something like that for you but it would most likely be a bit costly.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 18, 2008, 23:36:13 pm
Hi ikkes,

Do you absolutely need subproducts? If you use Virtuemart's built in functionality for quantity pricing you can do this, but a limitation of this hack is it doesn't support pricing for the sub-options. I kinda-sorta got around this because it does allow you to assign a price to a dropdown, so you'll see if you look at my website example in an earlier post how I charged a price in a dropdown field for a sub-item.

My work around probably won't help you with quantity pricing unless you get creative. :P
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on August 19, 2008, 12:23:50 pm
Hi,

Thank you for you're reply!
I want it like this (example: Scented Bath Salts in Glass Heart Bottle with Organza Bow)

o Color: Green - 21001GN
   > personalized Tag (+0,35)

o Color: White - 21001WT
   > personalized Tag (+0,45)

But instead of Colors i need quantity ;)

I hope i made it more clear!

Thank you in advance!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Noob Programmer on August 19, 2008, 16:37:08 pm
Thanks bgstovall for the quick reply. This saves me alot of time trying to make this hack work for me. Continue the hard work. So far the hack is looking great.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 20, 2008, 08:42:13 am
Hi again everyone,

In this post I'm going to address some things that affect everyone who is currently using my extended version of the hack, and also directly address questions asked of me from Carlton Brookes and Ikkes.

First off, I read some of the earlier threads and was surprised to find that a file name in the zip I gave Marco had an underscore missing from one of the folder names. This caused headaches for everyone, but I had no such issue... Weird, right? So I did some researching.

Here is the deal. The final file that was supplied to me from JK did not contain the same files as what I am running on my live site. I have no idea why, but I checked and they are not identical.  JK and I tested on my development server and I took the files directly from there and put them on my live site.

He then sent me the zip file.  Sorry for this. I did not think they were different.  In any case, if you would like a proper copy of the hack, I've attached it here. I'll be deleting the one I posted earlier to avoid any further confusion.

Okay, next on the agenda, Ikkes, if I understand you correctly you would need to do something like this:

Quote
Subcategory1(select)(|)(Yes [+.35],No [+.25])(checkbox:group,Product1);Subcatergory2(select)(|)(Option 1 [+.55],Option 2  [+.25]),(checkbox:group1,Product2)

Be sure you are using the new version of the hack that I attached to this message or this code won't work correctly for you.

And finally Carlton, I believe what you are trying to do can be accomplished like this:
Quote
Uniced Cut Size(select)(|)(2x2,3x3,4x4,Do Not Cut)(checkbox:group,Uniced);Uniced Paper Cup(select)(|)(Yes,No)(checkbox:group);Iced Cut Size(select)(|)(2x2,3x3,4x4,Do Not Cut)(checkbox:group1,Iced);Iced Paper Cup(select)(|)(Yes,No)(checkbox:group1);Decorated(textarea)(Decorated textarea is 10.00|field-below)(|10.00|all)

And again, be sure you are using the new version of the hack that I attached to this message or this code won't work correctly for you. All others: The same goes for the syntax I supplied for my website previously.

***NOTE: Although the syntax says "checkbox" it will actually display a radio button. This was a last minute change done by JK (untidy, I admit, but it works. :P)

Hope this helps!

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on August 20, 2008, 12:40:23 pm
I am so gratefull!! Thank you!!

Unfortunantly, i still have a question:

I want people to enter the quantity thereselfs:

How many [inputbox] (example input 0-500)
 > dropdownbox with yes (+0.35)
                    no  (+0.25)

How many [inputbox] (example input 501-1000)
 > dropdownbox with yes (+0.45)
                    no  (+0.25)

Or the input 0-500/501-1000 in a dropdownbox....

And again.....thank you!!
 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 20, 2008, 23:05:59 pm
Hi Ikkes,

Virtuemart only allows one quantity box function.  The ability to use multiple quantity boxes is not in the scope of this hack... HOWEVER you shouldn't need it to do what you are asking for.

Using the built in quantity pricing of Virtuemart you would set your volume or tier pricing. That way Virtuemart already knows that when a customer types in a specific quantity it will apply that price range to it.  Next, using the code I shared with you, you can use the sub-option dropdowns to charge them additonal cost for selecting that attribute.  In the example I gave, it would charge an additional .35 cents times the number they put in the quantity box. 

So, in the scenario I described they get the ranged price via stock Virtuemart settings and any additional option prices per piece by the hack. If you can't figure out how to do the quantity pricing (look at the quantity tables on the details pages of my website for an example) just let me know and I'll walk you through it, though you can find it in the forum if you search.

If I'm still misunderstanding you I apologize and ask for your patience.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Carlton Brooks on August 21, 2008, 02:50:39 am
To bgstovall

Thanks for the help. I now understand the flow and wording that must be done. I will now take what you have posted and fully adapt it to what I need.

Again thank you and all the others for the support.

carltonb
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Noob Programmer on August 21, 2008, 19:15:06 pm
Hi ikkes,

I know this is not part of this hack, but I did find a way to use multiple quantity boxes here (http://xrl.us/on6fj). You can find the developer's virtuemart profile here (http://forum.virtuemart.net/index.php?action=profile;u=8771).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 22, 2008, 00:16:33 am
Good call on the quantity box module Noob Programmer!  I completely forgot about Mark's mod. I noticed that it seems to now be included in the Virtuemart build under the Display Options tab for each product so it comes standard. No need to install a mod anymore! That rocks. (Lucky thing Virtuemart picked this up too, because Mark is not currently developing for VM 1.1 so you would've been out of luck as all of his mods are for VM 1.0).

ikkes, you might want to check that out. Just keep in mind that you won't be downloading it from there as it is already in VM now. The link Noob posted did not work for me so here is another one that gives you an example of what the mod can do:

Quote
http://design.markcallf.co.uk/virtuemart/1-Child-List/22-List-Children-Multiple-addtocart-buttons/Detailed-product-flyer.html

That will take you to the programmer's website.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 22, 2008, 21:06:40 pm
Hello,

First thamk you for this hack, I have a problem i use the hack 1.5 on vm 1.1.2
and joomla 1.5.6

I have 16 custom attribute, 10 select , 4 line and 2 file. Some doesn't work,
The second file doesn't work(no message in the cart and no file uploaded,but the first one work well), and the last 2 select doesn't work.

They appear in the page (you can select and choose the files to upload)but they are not show and not calculate in the cart.

Do you know a solution, Maybe i use to much custom attribute.

Thank you in advance for your help. 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: oursinai on August 23, 2008, 14:16:08 pm
Hello,

I resolve one of my problem the two select didn't work because i used "d'" ine the name. I think the hack din't manage name with "'".

But the second file upload style doesn't work.

Thank you for this hack and specially JK, Marco and all the people work for this exellent hack.   
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Carlton Brooks on August 23, 2008, 18:42:11 pm
With this new modified hack I am finally working through and understanding how it is put together.

Next question of mine is can a field be made to be required. In the old hack if we added "-r" to attribute type to make it required it worked great.

I have tried putting it after the  the checkbox like this (checkbox-r:group,xxxx) but did not give me the desired results.

Thanks
Carltonb
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bgstovall on August 24, 2008, 08:57:27 am
Carlton,

Making a field required was something I would have liked for the hideable sub-options, but it was going to cost me more money than I was willing to spend to have JK include it.  If you want to pitch in to get this done, depending on the price he quotes us, I would be willing to go in on it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on August 26, 2008, 12:55:56 pm
Hi bgstovall,

Thank you for all you're help!!
I just need to know one last thing:

How do i make other fields (text, etc) to display themselfs after clicking group1 or group2? i tried:

name(text:group,0-500)(1.00 per character|field-below)(|1.00|char);

But that does not work......

Thank you!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on August 29, 2008, 08:26:49 am
Did everybody forget about this project ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on August 31, 2008, 19:23:14 pm
There are only two Devs actively involved in VirtueMart despite numerous requests for help very few have shown interest, but even those have disappeared after a week or two almost all the time the reason no time, we even requested for submission of FAQs, proof reading and completion of the manual,

That is a shame as Virtuemart is such a great project. However, the threads started relating to getting new people involved don't get much response at all.

The VM team need to be more active in recruiting if they want new people. Perhaps VM could start by recruiting a recruiter.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: maksjm on September 20, 2008, 16:44:23 pm
Hello !

Is there a way to set a weight parameter in the custom attributes ? I need that to set different shipping costs with the standard module. Thank you so much !
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fastbox on September 22, 2008, 02:28:14 am
I have implemented this hack and am having trouble.

I'm using the following code:
Quote
Graphics Card(select)(tip here|title-hover)(NVIDIA [+0.00]|images/img_blue.jpg,ATI [+50.00]|images/img_red.jpg, NVIDIA SLI [+400.00]|images/img_blue.jpg)

If you click this page:

http://www.fastboxgaming.com/Micro-Gaming-Computers/The-LANBox.html

you will notice that when you hover your mouse over "graphics card"
it says something like "graphics card false tip here"

How do I fix this problem.




Also, can an image be set to display to the left of "graphics card"?

Thanks a lot,
Joel
Title: Complex custom items
Post by: jakeslife on September 23, 2008, 01:33:27 am
I'm so glad that I found this hack, as it saved my butt on the last few projects I have done. My current project is for a business which sells customized paper goods, and by customized I mean that not only the paper and font is customized, but the customer chooses whether they want assembly of invitations, embossing, gemstones (?!), return address printing, guest address printing, etc.

Here is the structure of each custom attribute so far, which is where this hack comes into play:

Backing Paper
Top Paper
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7

///These are all easy for me, as they won't be charged per character or higher for different backings or paper. It's the additional services that is getting me.///

Embossing (.50 extra per piece)
Gemstones (1.50 extra per piece)
Assembly (.35 per piece)
Return Address Printing (.35 per piece)
Guest Printing (.50 per piece)
Additional enclosures (.15 per piece)

This would be so much easier if the quantity was straight forward, but my client sells these items in packs of 25 up to 200 count each. I'm mystified as to how to do this with this hack. Should I allow the customer to put the quantity in the add-to-cart area, or should I create a drop down, check boxes, which would be easiest for this hack, and how do I implement this?

Any help would be very appreciated.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 24, 2008, 13:04:20 pm

Shouldn't the "Custom Attributes Extended Hack" be merged with the official VirtueMart release? Seems pretty popular. Any reason why it isn't?



Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jordank87 on September 24, 2008, 15:37:47 pm
Joomla 1.5.6
Virtuemart 1.1.2
Template: JA Mesolite from joomlart
vm112_custom_attribute_extended_2.15

Hi, I am trying to make the following custom attributes;

Your Number (Front):
(£2.50 per digit, 2 digits max)    

Your Number (Rear):
(£5.00 per digit, 2 digits max)    

Your Name (Rear):
(£1.00 per letter, max 12 letters, printed in capitals)

This is what im using but it doesnt work;

Your Number Front(number)(2.50 per character|field-below)(name here|2.50|char)

Your Number Back(number)(5.00 per character|field-below)(name here|5.00|char)

Your Name(text)(1.00 per character|field-below)(name here|1.00|char)

Any help on this would be great...

I have amended the code to look like this and it now looks like the attached picture;

Your Number Front(textarea)(2.50 per character|field-below)(number|2.50|char);
Your Number Back(textarea)(5.00 per character|field-below)(number|5.00|char);
Your Name(textarea)(1.00 per character|field-below)(name here|1.00|char)

Thanks


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 25, 2008, 12:12:24 pm
Hi,

I'm getting the following error when I click on the Circular Saw item in the demo cart:

http://localhost/joomlat/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=8&category_id=2&option=com_virtuemart&Itemid=1 (http://localhost/joomlat/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=8&category_id=2&option=com_virtuemart&Itemid=1)

Using:

Code: [Select]
( ! ) Fatal error: Class 'ps_product_custom_type_' not found in C:\xampp\htdocs\joomla\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 91
Call Stack
# Time Memory Function Location
1 0.0013 85128 {main}( ) ..\index.php:0
2 0.2313 4931832 JSite->dispatch( ) ..\index.php:68
3 0.2346 4946024 JComponentHelper->renderComponent( ) ..\application.php:124
4 0.2469 5076160 require_once( 'C:\xampp\htdocs\joomla\components\com_virtuemart\virtuemart.php' ) ..\helper.php:161
5 0.6572 10968720 include( 'C:\xampp\htdocs\joomla\administrator\components\com_virtuemart\html\shop.product_details.php' ) ..\virtuemart.php:214
6 0.9765 14784184 vmTemplate->fetch( ) ..\shop.product_details.php:424
7 0.9856 14865648 include( 'C:\xampp\htdocs\joomla\components\com_virtuemart\themes\default\templates\product_details\includes\addtocart_form.tpl.php' ) ..\template.class.php:213
8 1.0002 15147120 ps_product_attribute->list_attribute( ) ..\addtocart_form.tpl.php:31
9 1.0010 15148704 ps_product_attribute->list_attribute_drop( ) ..\ps_product_attribute.php:233
10 1.0153 15188760 ps_product_attribute->list_custom_attribute( ) ..\ps_product_attribute.php:260
11 1.0227 15228528 ps_product_custom_attribute->customAttributeHTML( ) ..\ps_product_attribute.php:821

I get the same error with VM 1.1.1/Joomla 1.5.2 and VM 1.1.2/Joomla 1.5.2. Also tried in Legacy mode ON with no success.

Any ideas?



Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 25, 2008, 12:47:38 pm
Ok, fixed it.

The problem was that I'd added a custom attribute to the demo object Circular Saw, but in the old format: myattrib1;myattrib2 and not in the new hack format Name(attribute type)(tip text|tip location)(attribute data);

How do I get the equivalent of a simple text field with no price influence like myattrib1; with the new notation?

Might add a new type class if the current hack doesn't support it.



Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Steve01 on September 25, 2008, 23:41:02 pm
This hack is great; it gives VM a lot more flexibility!!

Just a question, a wile ago there was a couple of posts asking for a kind of "multiplier", please see quote and link below

My English isn´t very good, but I´ll try explain my question.
The problem:
I want to sell packaged products with the choice of what the customer wants to put in this package. For example, if you have a chocolates factory and wanted to sell boxes of chololates but let the choice for the customer of how much he wants in the box and how much boxes he wants.
I need some way of adding to cart the Total= (items per box) x (nº of  boxes)
The solution?:
I have a possible solution, buy I don´t know to code it:
Using attibutes:
- attribute 1: quantity per box
- attribute 2: box needed (default 0 , customer must select a quantity)
Then when customer change attribute 2 the program change the "add to cart quantity" (= attibute 1 x attribute 2).But I don´t know how code this step.
I found in an other thread a function which  "Searches for an attribute of a given name" (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=20632.msg50385#msg50385)
Then using that function, if exist an attibute "box needed", that attributes input form in prodcut details need the param "onchange"  which change the variable $quantity in shop.product_details.php ( in ADD-TO-CART) $quantity= "quantity per box" x "box needed".
In general, I think is interesting to found a way to change "add to cart quantity" using attributes.
I post this here because I think this will be a good addition in this great hack.
Any help?
(Again, sorry for my English)

and


Thanks for responding.
You can see the same problem (better explained) here:
http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=25614.0
Quote
Using VM and Joomla, the website for my printing & copying business allows customers to place printing orders online. My situation is that my pricing breakdown is per page... but what if a customer wants several copies of a multiple page document? Well, until I figure that one out, I simply have two custom attribute fields: Number of Pages in Document, and Amount of Sets Needed. I instruct the customer that those two fields must be multiplied to achieve the right quantity, and that they must enter the solution to that equation manually.
I'd like to modify the code so that; a.)  the Quantity box updates automatically when these two fields are filled, b.) the Product is not added to the cart if either field is left blank, and c.) ....
This method has worked thus far, but there is always some confusion because no matter how easily you explain it, there's still always 3-4 persons who just can't grasp the concept for every 1-2 persons who do. Thusly, I must alleviate this confusion somehow, and that is the only way I can see as being the solution.


I search all over the forum, but I couldn’t find the answer, does anybody knows if it is possible to do that?

Many thanks in advance for your help
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 27, 2008, 15:53:19 pm

I've added the possibility to prefill custom attributes from values stored in the request URL query parameters or in the current user session.

Simply append the following code to ps_product_custom_type.php :

Code: [Select]
/***************************************************
 *
 * Variable element class
 * The class is used to manage the product custom attribute type.
 * Format: Name(variable)(tip text|tip location)(variable_name|source|default_value|warning_text|readonly|display_type)
  where:
    * variable_name: variable name in query/session where variable is stored
    * source: 'request'/'session'. Where should the variable be fetched from session or request (works with POST and GET)
  * default_value: default value if couldn't find variable in session/request
  * warning_text: displayed above field entry if didn't find variable's value in session/request AND attribute is set to -r required
  * readonly: 'readonly'/'editable'. If set to 'readonly' the field cannot be edited by user. Set to 'editable' (or anything else) if you want to be able to edit the field.
  * display_type: 'text'/'url'/'image'. 'text' will display the variable value as is. 'url' will assume the variable is a URL and display it as an html link. 'image' will assume the variable is a URL to an image and display it as an image img tag.

***************************************************/
class ps_product_custom_type_variable extends ps_product_custom_type_base {
var $classname = "ps_product_custom_type_variable";

    /**
* Outputs HTML for Custom Attribute
*/
function customTypeHTML($field=array()) {
    $html = "";
  $undef_magic_val = 'undefined_variable';
  $display_warning = false;
  $var = "";
 
$attr_value = explode('|',$field['attr_value']);
$var_name = $attr_value[0];
$source_type = $attr_value[1];
$default_text = $attr_value[2];
$warning_text = $attr_value[3]; //attribute must be set to required -r for warning message to appear
$readonly = $attr_value[4]=='readonly';
$display_type = $attr_value[5];

if(!$field['attr_post_value']){

if ($source_type=='request')
$var = JRequest::getVar($var_name);
elseif  ($source_type=='session') {
$session =& JFactory::getSession();
$var = $session->get($var_name);
}
//if variable is still empty:
if ($var=="" || $var==NULL) {
if  ($default_text!="" && $default_text!=NULL)
$var = $default_text;
elseif ($field['attr_req']==1)
$display_warning = true;
}

}
else
$var = $field['attr_post_value'];

if ($display_warning) {
//Doesn't output HTML INPUT field to prevent this product from being added to the cart, since it can only be valid
//if this fields is prefilled by values in the session or query
$html .= '<div class="alert" title="Error: Input field ['.$field['attr_title'].'] is not set and should be.">'.$warning_text.'</div>';
}
else {
if ($display_type=='url' || $display_type=='image') {

if ($display_type=='url')
$html .= "<a align='left' href=\"".$var."\">".$var."</a>";
elseif ($display_type=='image')
$html .= "<img  align='left' src=\"".$var."\" />"; //style=\"ALIGN:ABSMIDDLE;display:block;\"

//Still include input so it's submitted with the form, but hide it.
//Had to set visibility:hidden (instead of input type=hidden or display:none) otherwise layout was all messed up
$html .= "<input style='visibility:hidden' type=\"text\" id=\"".$field['attr_pagevar']."_field\" name=\"".$field['attr_pagevar']."\" value=\"".$var."\" />";

}
else
$html .= "<input type=\"text\" class=\"inputbox\" ".(($readonly)?"readonly=\"readonly\"":"")." id=\"".$field['attr_pagevar']."_field\" size=\"".(strlen($var)+2)."\" name=\"".$field['attr_pagevar']."\" value=\"".$var."\" /> ";
}

return $html;
}

/**
* Outputs Secure Value for Custom Attribute
*/
function customTypeSecureValue($field=array()) {
return '';
}

/**
* Outputs & Processes the submitted data for Custom Attribute to Cart
*/
function customTypeProcess($value, $field=array()) {
return $value;
}

}

The syntax is as follows:

Code: [Select]
Name(variable)(tip text|tip location)(variable_name|source|default_value|warning_text|readonly|display_type)
with parameters:

•   variable_name:
variable name in query/session where variable is stored
•   source:
'request'/'session'. Where should the variable be fetched from session or request (works with POST and GET)
•   default_value:
default value if couldn't find variable in session/request
•   warning_text:
displayed above field entry if didn't find variable's value in session/request AND attribute is set to -r required
•   readonly:
'readonly'/'editable'. If set to 'readonly' the field cannot be edited by user. Set to 'editable' (or anything else) if you want the user to be able to edit the field.
•   display_type:
'text'/'url'/'image'. 'text' will display the variable value as is.   'url' will assume the variable is a URL and display it as an html link. 'image' will assume the variable is a URL to an image and display it as an image img tag.

Example:

Syntax: TournamentID(variable-r)(tool tip|tip location)(TournamentID|request||No TournamentID detected!|readonly|text);

Description: Gets value of TournamentID from URL query parameter and puts it in the TournamentID custom attribute. If TournamentID is not declared in URL, it outputs an error message.

Example URL:
index.php....option=com_virtuemart&Itemid=104&TournamentID=512


Code hasn't been thoroughly tested, so please get back to me if you get problems. It uses Joomla 1.5 specific methods, but could easily be ported for Joomla 1.x if necessary.

Attached is vm112_custom_attribute_extended_2.15 with the modified ps_product_custom_type.php to support the variable type.

Enjoy!




[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 27, 2008, 15:56:33 pm
Hi again,

I've cobbled together an extensive documentation for Custom Attributes from browsing this thread and the thread for the previous version.

Tried to add as many examples, including screenshots, as I could.

Please feel free to add to it!

I couldn't include it in a new version of vm112_custom_attribute_extended_2.15 since it's too big a file for the 400K forum limit.

Note that it includes docs for the new variable type discussed above (http://forum.virtuemart.net/index.php?topic=39666.msg147808#msg147808).

Here are the files:



[attachment deleted by admin]

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Foxnet on September 29, 2008, 05:04:16 am
Hi all,

In first, please excuse my english (i'm french ^^).

I want to thank Ruppert for his awesome PDF which really help me for this hack.

But...there is always a "but", i've a pretty problem. I'm in French Polynesia and i prepare a sort of tour operator. We'll propose some package with accomodations and Activities. On the website, we'll propose some optional activities, i gonna show you my code for these options :

Voulez-vous ajouter une ou plusieures activité supplémentaires? -Le prix est valable pour une ou deux personnes-
(checkbox)( |field-above)(non merci*|,Quad
[+10000]|,Jetski
[+10000]|,Massage
[+10000]|);

On the frontend, the prices are : 10 XPF instead of 10 000...Does someone know how can i fix this? cuz 10xpf = ~1 cents so...you understand...

Excuse me again for my english, if you don't understand, i can try to explain again ^^

cya,

Fox
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jakeslife on September 29, 2008, 05:36:27 am
I found another post which showed functionality similar to what I needed, and after using the method they used I have this:
Quote
Couples' Names(text)(Type the names exactly how you want them to appear.|field-below)(|char_nospace)(checkbox:group1,Pack of 25.);
Wedding Date(text)(Select wedding date.|field-below)(|char_nospace)(checkbox:group1);
Wedding Time(text)(Enter in any format.|field-below)(|char_nospace)(checkbox:group1);
Wedding Place(text)(Building or venue name. Ex.: "Saint Mark's."|field-below)(|char_nospace)(checkbox:group1);
Wedding City(text)(City and State.|field-below)(|char_nospace)(checkbox:group1);
RSVP Date(text)(|field-below)(|char_nospace)(checkbox:group1);
Backing Paper(select)(|)(Select Option,Mahogany,Chestnut,Amber,Harvest,Stardust,Spice,Dune,Midnight,Ebony,Mercury,Chrome,Sanddollar,White Sand,Ivory,Evergreen,Bamboo,Aloe,Rainforest,Lemongrass,Ocean,Prussian,Twilight,Sky,Slate,Fog,Magnolia,Alabaster,Snow,Nautilus,Peony,Merlot,Amethyst,Aster,Blossom,Matte Blossom,Rose,Cosmo,Tazziberry,Crimson,Scarlet,Sunset,Frost,White,Cotton White,Cotton Ecru,Pearl Champagne,Pearl White,Pearl Ivory)(checkbox:group1);
Font(select)(|)(Select Option,Font 1,Font 2,Font 3,Etc,Etc,Etc)(checkbox:group1);
Embossing(select)($.50 per piece.|field-below)(No,Yes [+12.50](checkbox:group1);
Gemstones(select)($1.50 per piece.|field-below)(No,Yes [+37.50](checkbox:group1);
Assembly(select)($.35 per piece.|field-below)(No,Yes [+8.75](checkbox:group1);
Return Address Printing(select)($.35 per piece.|field-below)(No,Yes [+8.75](checkbox:group1);
Guest Address Printing(select)($.50 per piece.|field-below)(No,Yes [+12.50](checkbox:group1);
Additional Enclosures(select)($.15 per piece.|field-below)(No,Yes [+3.75](checkbox:group1);
This is one set of this code, I have five more in different groups which represent different quantity packs of wedding invitations. My only problem left is that I need each pack to have a base price. I am not sure how to do this as if I put the price into the product page of VM this will make the prices of greater quantity packs wrong. I am also not sure if I can put that price into this code somewhere, but then if I do that the browse pages will not list prices.
I'm kinda stuck here and browsed this topic from start to finish. All I need is a minute of someone's time, if you're able to give that. All I need to know is how to assign a base price to each of the radio button groups.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fastbox on October 03, 2008, 06:18:36 am
I have installed custom attributes, and have been messing around with it a little so far. Is it possible using custom attributes to allow a user to customize parts to design a computer?

For instance, if I gave the user a choice of power supplies at the end, the user should only see the power supplies which will work with the parts he has already chosen(amount of WATTS and amount of plugs).

Thanks,
Joel
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tw on October 05, 2008, 22:16:29 pm
Hi all
 I have this hack working just fine with Joomla 1.5.6 and 1.5.7 with VM 1.1.2 with no know problems.
 
I use the calendar hack and had to change the date layout from
      year, month, day    to    month, day, year.

The file to change is:
    \administrator\components\com_virtuemart\classes\ps_product_custom_type.php

For any one looking to do the same thing the code is:
******look for %Y-%m-%d and change it to %m-%d-%Y   ********

Code: [Select]
/***************************************************
 *
 * DATE element class
 * The class is is used to manage the product custom attribute type.
 *
***************************************************/
class ps_product_custom_type_date extends ps_product_custom_type_base {
var $classname = "ps_product_custom_type_date";

    /**
* Outputs HTML for Custom Attribute
*/
function customTypeHTML($field=array()) {
global $mainframe, $mosConfig_live_site;
    $html = "";
$titlevar = trim($field['attr_pagevar']);
$attr_value = explode('|',$field['attr_value']);
$default_date = $attr_value[0];
$date_type = $attr_value[1];

if(!$field['attr_post_value']){
$html .= "<input class=\"inputbox\" type=\"text\"

name=\"".$titlevar."\" id=\"".$titlevar."\" size=\"25\" maxlength=\"19\"

value=\"".$default_date."\" /><input type=\"reset\" class=\"button\" value=\"...\"

onclick=\"return showCalendar('".$titlevar."', '%m-%d-%Y');\" />";
} else {
$html .= "<input class=\"inputbox\" type=\"text\"

name=\"".$titlevar."\" id=\"".$titlevar."\" size=\"25\" maxlength=\"19\" value=\"".trim

($field['attr_post_value'])."\" /><input type=\"reset\" class=\"button\" value=\"...\"

onclick=\"return showCalendar('".$titlevar."', '%m-%d-%Y');\" />";
}

return $html;
}

/**
* Outputs Secure Value for Custom Attribute
*/
function customTypeSecureValue($field=array()) {
$attr_value = explode('|',$field['attr_value']);
$default_date = $attr_value[0];
$date_type = $attr_value[1];
if (!$date_type){
//$date_type = '+';
}

return '';
}


I rent items in my cart and would like to know if any one knows how to make the calendar not allow the user to pick a past day or even better for me would be if the customer could not pick current day and maybe the next upcoming day or two.


Thanks Troy
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on October 12, 2008, 17:45:23 pm

I've recently been having problems with the layout of the Add To Cart box when displaying multiple consecutive custom attributes. It somewhat displayed ok under FF3, but was completely messed up in Chrome/Safari and slightly only better in IE7. So after lots of head-banging, here is what I cobbled together to get it working. It's not perfect but it's a damn site better than before.

Note that I also increased the width of the Add To Cart box. Otherwise, each browser would deal with the smaller box in random ways.

Here are the modifications to carry out (for VM 1.1.2):

File: components\com_virtuemart\themes\default\themes.css

Was:
Code: [Select]
.vmCartContainer { /* Cart Container */
width: auto;
float: left;
background: #ADD8E6;
border: 1px solid #000;
padding: 3px;
}

Change to:
Code: [Select]
.vmCartContainer { /* Cart Container */ /* was width:auto */
width: 90%;
float: left;
background: #ADD8E6;
border: 1px solid #000;
padding: 3px;
}

Was:
Code: [Select]
.vmartChild { /* Container for the Child Product */

vertical-align: middle;
border: 1px solid #000;
padding-left: 2px;
padding-right: 2px;
margin-bottom: 2px;
float:left;
}

Change to:
Code: [Select]
.vmCartChild { /* Container for the Child Product */

vertical-align: middle;
border: 1px solid #000;
padding-left: 2px;
padding-right: 2px;
margin-bottom: 2px;
float:left;
width: 99%;
}/* had no width before */


File: components\com_virtuemart\themes\default\templates\product_details\flypage.tpl.php

Was:
Code: [Select]
<br style="clear:both;" />
<table style="width: 100%;">
  <tbody>

Change to:
Code: [Select]
<br style="clear:both;" />
<table style="width: auto;">
  <tbody>


File: components\com_virtuemart\themes\default\templates\product_details\includes\addtocart_custom_attribute.tpl.php

Was:
Code: [Select]
<div class="vmAttribChildDetail" style="float: left;width:30%;text-align:right;margin:3px;">
        <label for="<?php echo $attribute['titlevar'?>_field"><?php echo $attribute['title'?>
        </label>:
    </div>
    <div class="vmAttribChildDetail" style="float:left;width:60%;margin:3px;">
        <input type="text" class="inputboxattrib" id="<?php echo $attribute['titlevar'?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" />
    </div>

Change to:
Code: [Select]
<div style="float: left;width:30%;text-align:right;margin:3px;">
        <label for="<?php echo $attribute['titlevar'?>_field"><?php echo $attribute['title'?>
        </label>:
    </div>
    <div style="float:left;width:60%;margin:3px;">
        <input type="text" class="inputboxattrib" id="<?php echo $attribute['titlevar'?>_field" size="30" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" />
    </div>


File: administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php

Was:
Code: [Select]
// *** Label Side ***
$html .= "<div style=\"width:30%;float:left;text-align:right;margin:3px;\">";
if( ($field['attr_tip_position'] == 'title-hover') && ($field['attr_tip']) ){

Change to:
Code: [Select]
// *** Label Side ***
$html .= "<div  class=\"vmAttribChildDetail\"  style=\"width:30%;float:left;text-align:right;margin:3px;\">";
if( ($field['attr_tip_position'] == 'title-hover') && ($field['attr_tip']) ){

Was:
Code: [Select]
// *** Input Side ***
$html .= "<div style=\"width:60%;float:left;margin:3px;\">";
// Show Tip Above Input

Change to:
Code: [Select]
// *** Input Side ***
$html .= "<div  class=\"vmAttribChildDetail\"  style=\"width:60%;float:left;margin:3px;\">";
// Show Tip Above Input

Was:
Code: [Select]
$html .= "<input type=\"hidden\" name=\"custom_attribute_fields_check[".$field['attr_pagevar']."]\" value=\"".$field['attr_pagevar']."\" />\n";

return $html;
}

Change to:
Code: [Select]
$html .= "<input type=\"hidden\" name=\"custom_attribute_fields_check[".$field['attr_pagevar']."]\" value=\"".$field['attr_pagevar']."\" />\n";

                $html .= "<br style=\"clear: both;\">";
return $html;
}

I'm surprised some of these CSS classes haven't been assigned in the original Custom Attribute code. Was there any particular reason for this? Or was this just missed out? Or the "$html .= "<br style=\"clear: both;\">"; " line?

I haven't tested this on IE6. Dreading it actually, but I'll keep you posted.

The fix for the width of the Add to Cart box should also be helpful to people not using Custom Attributes, just the regular VM attributes.

Hope this helps,

PS: I'm using YooTheme Page Joomla templates. Maybe that exasperates these problems, in any case, I think it should help others.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: conzies on October 13, 2008, 10:43:29 am
I have this scenary:
1 product = price 2,5
+ Master(radio)(tip here|title-hover)([=5.00]) but added only once.
If i use PRICE (for example =5.00) and I choice n° X of product 5.00 its moltiply for X and isen't add only once.
Help???

Title: Problems
Post by: mrssnowhite on October 13, 2008, 21:50:45 pm
Ok, it's not really as dramatic as an exclamation mark, but whatever...

I'm not sure I did exactly right, but I tried...I downloaded the "...15" version.  I uploaded the files with filezilla, and I went to use my component.

Everything appeared to work on the administration end, but I got TONS of error messages on the user end.  I'll attach a screen shot, but it doesn't include all the errors.

I don't know enough code myself to fix this...

P.S.  Would anyone be willing to help me with some page styling for a fee (or free)?  I am php dumb.  I've gotten pretty decent at .css, but I don't know how to make the php pages read css styling.  Maybe by my last statement alone, I prove how inept I am...

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on October 15, 2008, 14:43:04 pm
mrssnowhite,

Sounds to me like you have malformed custom attributes.

Check your syntax against the documentation http://forum.virtuemart.net/index.php?topic=39666.msg147809#msg147809 (http://forum.virtuemart.net/index.php?topic=39666.msg147809#msg147809).

Try each attribute one at a time and make them as simple as poosible. Then if that works, add more complex ones and see how that goes. Otherwise, paste them in this thread if you can't figure it out.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Glen_f on October 16, 2008, 08:56:59 am
Hi!

I have a question about this hack. It has done all it promises, but I have small problems.

I have a form with textfield. My customers can add a small text to it. Some of them do add multiple paragraphs and this is what breaks the system. Is it anyway possible to get the form input out in html-format?

This is what the customer writes:
Quote
Lorem ipsun and even more. Then if Adam likes Eve do something nice.

The above stuff does this and this.
This is the output:
Quote
Lorem ipsum and even more. Then if Adam likes Eve do something nice.rnThe above stuff does this and this.rn
There are extra rn representing carriage return and new line (\n\r) which are escaped. Also with < and > the output is broken. Well, basically  periods and commas are the only punctuation marks that don't break the output.

edit.
What I would like to have is something like this:
Quote
Lorem ipsun and even more. Then if Adam likes Eve do something nice.
<br/>
The above stuff does this and this.

I know I'm asking a lot from this hack but any help or pointers would be appreciated.

By the way, regular expressions do not work. Or any other search and replace hacks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mondecyclotour on October 16, 2008, 11:36:23 am
Dear all,
I installed custom attributes extended and i find it very usefull.
I have a problem in my shop when I add in my cart more than one object with custom attributes.
I have the error 500 : premature end of script headers : php4

The thing is that if I add several objects in my cart, there is no problem, but I have always this error if i add two products which have custom attributes.

Did someone occur this problem.
Regards
Matthieu
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mtk on October 17, 2008, 13:25:45 pm
Hello,
I'm really happy to see such hack, but I have a tiny question:
all the talking here apply to attributes. what about product type?
after all, a product type is a way add constant attributes to certain products.
applying the hack on a single attribute is nice, but when having a lot of products this is just not applicable.

can this be applied to product types somehow?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Coucerbaum on October 20, 2008, 14:01:57 pm
dear cracks,

i use the attribute hack by barnett: http://forum.virtuemart.net/index.php?topic=39666.0

so i created a special individual attribut list like:

Code: [Select]
Brunnenauswahl(radio)(Bitte wählen Sie den gewünschten Brunnen mit einem Klick vor die Artikelnummer aus!|title-hover)(293A* [=1075.630]);
Optionales Zubehör(checkbox)(Zum Bestellen der einzelnen Zubehörteile setzen Sie bitte vor den/die gewünschten Artikel einen Haken!|title-hover)(LED-Beleuchtung & Auslauf [+82.3529],Funkfernsteuerung Ein/Aus [+40.3361])

it looks like:
http://www.terracotta-blumentopf.de/index.php?page=shop.product_details&product_id=23&flypage=flypage.tpl&pop=0&option=com_virtuemart&Itemid=1

so, and i want to hide only the prices from these attributes - the prices including the brackets...

now i want only to hide the prices of the attributes, not the attributes themselve... its very hard to find the location, where the prices and the brackets are included or converted in the quantity box...  Huh

greetz, coucerbaum
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ericweb on October 21, 2008, 12:58:02 pm
I have instal the file's
get Fatal error: Call to undefined method ps_product_category::count_categories()
com_virtuemart/html/product.product_form.php on line 263
Product Information
component- virtuemat list product- product information.
what can be the problem

problem solved . upload een wrong file.
sorry
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: semiotics on October 24, 2008, 23:12:59 pm
Joomla 1.5.7 with Custom Attribute Extended Hack 2.15 with VM 1.1.2 doesn't work:

Fatal error: Class 'ps_product_custom_type_' not found in /joomla/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 91

LINE 91: $product_custom_type = new $attr_type_class;
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nachojoaquin on November 05, 2008, 17:07:21 pm
Hi!,
I'm trying to use the "file upload" feature...
It all worked fine... The only problem I have is trying to avoid the product get added to the cart if the upload fails.

Anyone?

Title: custom attribute cause internal server error
Post by: gts0815 on November 11, 2008, 08:53:33 am
Hi,

i'm using j1.5, vm1.1.2 and the hack 2.13. if i have more than one custom attribute, i got this internal server error every time i click the order-button.
"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log."[/left]


I did some more tests: if you have a clean cache it works for the first order. but if you want to order a second product the error arises. you see it at www.pr-shop.at.
Product without custom attributes: all trainings
Product with only one custom attribute: category. foto, Product: fotoreportage
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gts0815 on November 13, 2008, 12:23:33 pm
what I have done so far:

after all of this, it still not working. Troubes arises only if you have a second product with two or more custom attributes.

is everyone here who could help?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mrssnowhite on November 18, 2008, 20:03:32 pm
I'm getting notices all over the place.  I saw someone said that these are not errors, but something has to be wrong or they wouldn't show up.  I don't want to unpublish or shut off everything that has notices to make a few things function.  I want to be able to use this awesome component to it's fullest potential.  I copied the files where they need to go, I see the custom attributes on the products, and they can be added to my cart, but I have errors showing up in my cart, in my all-n-one module, and on my admin page.

I know this is supposed to be some "developer" talented work around, and it seems like no one is helping.  I'd love to help, but I'm not a programmer.  I'm a self-taught developing programmer.  I can't fix it myself...I really need information.  Some of my notices are as follows:

Notice: Undefined index: charge in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\classes\ps_product_attribute.php on line 841

Notice: Use of undefined constant CUSTOM_ATTRIBUTE_UPLOAD_ROOT - assumed 'CUSTOM_ATTRIBUTE_UPLOAD_ROOT' in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\html\admin.show_cfg.php on line 1264

Notice: Use of undefined constant CUSTOM_ATTRIBUTE_UPLOAD_MINSIZE - assumed 'CUSTOM_ATTRIBUTE_UPLOAD_MINSIZE' in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\html\admin.show_cfg.php on line 1266

Notice: Use of undefined constant CUSTOM_ATTRIBUTE_UPLOAD_MAXSIZE - assumed 'CUSTOM_ATTRIBUTE_UPLOAD_MAXSIZE' in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\html\admin.show_cfg.php on line 1268

Notice: Use of undefined constant CUSTOM_ATTRIBUTE_UPLOAD_TYPE - assumed 'CUSTOM_ATTRIBUTE_UPLOAD_TYPE' in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\html\admin.show_cfg.php on line 1270

Notice: Use of undefined constant VM_SAVECART_DISABLE - assumed 'VM_SAVECART_DISABLE' in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\html\admin.show_cfg.php on line 1272

Notice: Undefined offset: 3 in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 69

Notice: Undefined index: attr_post_value in C:\sites\single18\intsportshack\webroot\g2f\administrator\components\com_virtuemart\classes\ps_product_custom_type.php on line 1033

Please help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: xrsixturbo on November 19, 2008, 00:47:09 am
hey we have a problem where we can only get about 70 attributes per product in VM - would this hack enable us to have more? we need about 120

Cheers
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: xrsixturbo on November 20, 2008, 07:09:51 am
anyone?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kram on November 24, 2008, 14:09:27 pm
Hello All,

I have a client running Joomla 1.5.8 with VM 1.1.2 & Custom Attributes Extended Hack 2.1

They use the following for the custom attribute:

Instructions(textarea)(|)( |);

If one types into the field and hits the enter key to have a Carriage Return
The text passed to the cart page contains "rnrn" When the order email is received with the custom text, it also contains "rnrn"

SAMPLE
Hi

Have a great day

Regards,
Me.

The customer gets the following in the response:

“HirnrnHave a great dayrnrnRegards,rnrnMe.”

Would anybody have a solution to this problem handy?


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: overeasy on November 24, 2008, 23:38:03 pm
Hi -

Like many others before me, I'm looking to broaden what I can do with my attributes, specifically by adding color swatches, since I sell apparel.  I have downloaded this hack and am beginning to try it out....but...is there a clear (for lack of a better term...) "user manual" on this?  What SHOULD this now allow me to do?  I know I can poke around, but if someone already knows, I'd be thrilled to have a concise outline of what additional options this allows for...

Thanks.

Ron
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: brendonhatcher on November 25, 2008, 22:00:09 pm
Hi

This hack looks really awesome.

I know this is really lazy of me, but reading through the thread makes by head hurt.  At this point, even a "yes" or "no" will do.

Can I use this hack to:

1. Select the quantity of the product
2. Display a number of textboxes equivalent to that quantity

Basically, I want to sell tickets to a seminar
If they want to buy 5 tickets, it shows 5 groups of textboxes for the name and email address of each attendee.

Thanks
Brendon
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on November 26, 2008, 03:08:52 am
This is hurting my eyes!!!! I am bouncing between VM, Magento, Zen!!!!!!!!!!!!! I cannot find one dag gone solution that is reliable for uploading images to your product. This is sickening me to the point where I am ready to take out a line of credit and hire a real dev to get it done for me. It seems that no one has interest at all in file uploading. Perhaps since traditional carts really never needed the function.

Is there anyone out there that has an idea of where us users can get a REAL file upload option to work with reliably in a production site?

PLEASE...

PLEASE...


Thanks
Jeff

www.modebook.com  (MAGENTO)
www.modebook.com/vmstore   (Virtuemart 1.1.2 in Joomla 1.5.8)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on November 26, 2008, 23:19:19 pm
Hi

This hack looks really awesome.

I know this is really lazy of me, but reading through the thread makes by head hurt.  At this point, even a "yes" or "no" will do.

Can I use this hack to:

1. Select the quantity of the product
2. Display a number of textboxes equivalent to that quantity

Basically, I want to sell tickets to a seminar
If they want to buy 5 tickets, it shows 5 groups of textboxes for the name and email address of each attendee.

Thanks
Brendon

Everything it does is listed in the first post, and the first post of the thread it links to. Seems pretty daft me going there to have a look to report back here.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on November 26, 2008, 23:23:04 pm
This is hurting my eyes!!!! I am bouncing between VM, Magento, Zen!!!!!!!!!!!!! I cannot find one dag gone solution that is reliable for uploading images to your product. This is sickening me to the point where I am ready to take out a line of credit and hire a real dev to get it done for me. It seems that no one has interest at all in file uploading. Perhaps since traditional carts really never needed the function.

Is there anyone out there that has an idea of where us users can get a REAL file upload option to work with reliably in a production site?

PLEASE...

PLEASE...


Thanks
Jeff

Is this anything to do with this thread? I personally have no idea what you mean? You can upload product images to all the shopping cart systems you mention, including VM.

I don't think you'll have any issue finding a good developer here, but I strongly recommend clarifying what you mean, perhaps starting a new thread in a better section.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: brendonhatcher on November 29, 2008, 22:52:30 pm
@MikeUK

Thanks for the response. However, I have trawled through the posts and don't see an answer. Short of installing and mastering the hack, I was hoping for confirmation of whether it is worth my time to investigate.

So, can anyone tell me yes or no? Just that.  I fully expect to work it out for myself.

Thanks
Brendon
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: artistguy on December 11, 2008, 18:17:19 pm
This works great in firefox and safari, but in ie7 the form fields are not lined up. They are all jumbled together like there is no formating. Is this a known problem? How do I get the form fields to line up in ie7?
Thank You





Here's a working copy of v2.15 for VM 1.1.2.
Modifications:
*  Renamed the folder "custom attribute" to "custom_attribute" under the directory components\com_virtuemart\themes\default\templates\product_details\includes\
*  Added ps_product_custom_type_checkbox_selector.tpl.php include to text and select files under custom_attribute.
The example in one of the previous posts will work, and it will work with radiobutton and checkbox instead of just radiobutton.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jordank87 on December 11, 2008, 19:49:04 pm
artistguy,

If you get a solution to this please let me know, i am having the same problem.

Thanks

Jordan
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: artistguy on December 11, 2008, 23:05:47 pm
I installed this and it works great except when a customer doesn't fill out all the fields on the form that are required. When they go back to fill out the missing information and click submit, it goes to a blank page on some browsers and ie7 says it can't display the page. Is this a known issue? Any way I can get this fixed?

There's also and page load error that says: Done, but with errors on the page.

I noticed one more thing, when you click to go back and fill out the missing form information, the quantity is set to 0.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: artistguy on December 11, 2008, 23:19:31 pm
Hi Jordan,
I fixed this somewhat on my site today. I changed a few things in the theme.css file; I think what did it was adding:
text-align:left;
to the class .addtocart_form
I'm not 100% sure though, so if you try it and it works for you too, let me know. If it doesn't work I'll try and figure out the some more of the changes I made!
But when the page loads I get the message, Done, but with erros on the page. Before you change anything, are you getting that error?
Also when I submit the form without filling out all required fields, then go back and fill them out, then submit again, I get the error: IE can't load the page. Do you get that too?
Thanks




artistguy,
If you get a solution to this please let me know, i am having the same problem.
Thanks
Jordan
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on December 11, 2008, 23:46:18 pm
If you've been experiencing problems with prices in the thousands >=1000 with this hack, then you might want to read on.

When I entered options in the SELECT field type say of [+5999] price, the displayed value in the field and the one added to the cart was converted to [+$5].

The problem was in the number_format method call in function getPriceWithTax($value) of /administrator/components/com_virtuemart/classes/ps_product_custom_type.php :

Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price * (1 + $tax_rate),2));
$value .=  ' ('.$operand.$price_with_tax.')';
}

which I changed to:

Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price * (1 + $tax_rate),2, '.', ''));
$value .=  ' ('.$operand.$price_with_tax.')';
}

This means it sets the separator for the decimal point to '.'  and more importantly sets the thousands separator to '' (nothing) instead of the default ',' on my setup. Somehow $CURRENCY_DISPLAY->getFullValue() doesn't like values of the type 1,999. Not sure why, or if there's a config param for this somewhere.

If you make that modification, values over $999 work fine again.



UPDATE: Currency Conversion Problems


I was finding that if you change the current currency, the prices of optional parameters don't display correctly. Although they are added correctly in the shopping cart.

I change the above code to :

Code: [Select]
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($GLOBALS['CURRENCY']->convert($price * (1 + $tax_rate)),2, '.', ''),'$');
and now it seems to work fine. It now converts the optional parameter value to the user's currently selected currency.
Has anyone experienced the same issues?







Hope this helps.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: artistguy on December 13, 2008, 06:47:18 am
What's the easiest way to uninstall this?
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: maevagiacometti on January 02, 2009, 19:29:40 pm
Hello,

Thanks for this wonderful work ! It works perfectly.

I have a custom attribute with radio button, and i would like that when one of this button is choosen it opens a link in a new window. Is it possible ?

Thanks in advance for your help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fiero on January 09, 2009, 18:01:29 pm
Hi Guys,

I hope you can help me.
how can i do this?

When you click on a product(Poster)you can choose at
4 formats (A3,A4,A5,A6) different prices,
After the customer make a choise then they can see the extra option for that format.
Example:
Format A3=1euro, extra option=3euro
Format A4=3euro, extra option=7euro

is this possible?

Thank for your help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on January 09, 2009, 22:02:26 pm
Yes you can do that. I don't think this modification does that.

Are you talking about staying on the same page (without refreshing the page)? If so, you need to use javascript to change the extra options based on the previous option. Or you could go to a new page with the new options and do it with php.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jordank87 on January 10, 2009, 19:34:09 pm
Hi i am trying to get the price not to show on the front end, does anyone know how to go about this? As i already have a graphic that informs the user of how much each part is.
thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fiero on January 12, 2009, 12:55:29 pm
Hi MikeUK,

Yes that's what i mean, staying in the same page, after you click on the format then the options will be visible.

i can't self do that mike:( is here some hack  maybe?

thanks for information

Yes you can do that. I don't think this modification does that.
Are you talking about staying on the same page (without refreshing the page)? If so, you need to use javascript to change the extra options based on the previous option. Or you could go to a new page with the new options and do it with php.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 14, 2009, 11:45:42 am
Thanks guys for this great hack!

Yes I am wondering, why not merge into the VM itself...:)

So, how can I customize the tooltip? (background color, etc..)

Many thanks,
Bulesz
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 14, 2009, 11:57:47 am
and, thanks Ruppert for the docs! ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 14, 2009, 15:29:47 pm
May I do with this hack the following:

Decor parameter with 5 EUR/meter and the user can give how many wants from that?

eg:

"Red decor (5EUR/meter) : 3 (5*3 EUR)"

?

Many thanks,
B.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on January 14, 2009, 18:36:29 pm
Hi MikeUK,

Yes that's what i mean, staying in the same page, after you click on the format then the options will be visible.

i can't self do that mike:( is here some hack  maybe?

thanks for information

Yes you can do that. I don't think this modification does that.
Are you talking about staying on the same page (without refreshing the page)? If so, you need to use javascript to change the extra options based on the previous option. Or you could go to a new page with the new options and do it with php.

I doubt it. It's a pretty specific modification. You'll need to get that done as a custom mod (as in paid job).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ikkes on January 15, 2009, 18:58:30 pm
Hi everybody!

I have been working with this extension for a while now....it's perfect!
The only thing i am missing is something like this:

http://forum.virtuemart.net/index.php?topic=44410.0

Is it possible with this extension to create a preview of text on a product? Maybe with:

Text(text)(1.00 per character|field-below)(text here|1.00|char);

Thanks for you're reply's!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 15, 2009, 20:59:00 pm
There is a component for that, or a modified VM as I know...you can find it on the extensions.joomla.org...

Its commercial, and horror expensive...:)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 15, 2009, 20:59:49 pm
How/where can I modify the style of the tooltip?

Many thanks,
B.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: troberts on January 16, 2009, 00:48:58 am
I have read through this thread, and may have missed the answer I'm seeking.  Hopefully not.

I am trying to create a product with multiple styles to choose from.  Currently, my custom attributes look like this:
Code: [Select]
Autumn(checkbox)(|)(SAU-012070|images/IMGP3163_150x99.JPG);
Winter(checkbox)(|)(SWT-012307|images/IMGP3168_150x99.JPG);
Spring(checkbox)(|)(SSP-012206|components/com_virtuemart/themes/default/images/noimage.gif);
Summer(checkbox)(|)(SSU-012070|images/IMGP3169_150x99.JPG);
St. Valentine's(checkbox)(|)(SSV-002140|images/IMGP3167_150x99.JPG);
St. Patrick's(checkbox)(|)(SSP-003176|components/com_virtuemart/themes/default/images/noimage.gif);
Easter(checkbox)(|)(SES-004205|images/IMGP3165_150x99.JPG);
Mother's Day(checkbox)(|)(SMD-005138|components/com_virtuemart/themes/default/images/noimage.gif);
Father's Day(checkbox)(|)(SFD-006130|components/com_virtuemart/themes/default/images/noimage.gif);
4th of July(checkbox)(|)(SFJ-007045|images/IMGP3166_150x99.JPG);
Halloween(checkbox)(|)(SHW-001031|images/IMGP3170_150x99.JPG);
Thanksgiving(checkbox)(|)(STG-011456|images/IMGP3170_150x99.JPG);
Christmas(checkbox)(|)(SCH-012258|images/_Sugah_Sax__494aaa264992c_150x150.jpg);
Patriotic(checkbox)(|)(SPT-707006|images/IMGP3164_150x99.JPG);
Maine(checkbox)(|)(SME-072008|images/IMGP3169_150x99.JPG);
Birthday(checkbox)(|)(SBD-011611|components/com_virtuemart/themes/default/images/noimage.gif);
Anniversary(checkbox)(|)(SAV-011745|components/com_virtuemart/themes/default/images/noimage.gif);
Graduation(checkbox)(|)(SGD-011867|components/com_virtuemart/themes/default/images/noimage.gif)
I need 2 things:
1. How can I make it so when a style is chosen, the quantity increases by 1?
2. How can I make it so a user can select the same style more than once?

Is this possible?

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on January 16, 2009, 09:54:16 am
I don't quite understand why you would want the quantity to increase. That is for the whole product. In other words, if you select 4 attributes, the quantity would then show 4, so clicking add to cart would have 4 products, with each product having 4 attributes.

I guess that's not what you want. Sounds like you want each attribute to act as 1 product. I think VM's child products might be better for you.

Of course, doing what you need could be done, but it looks like a fairly big customization job, assuming I've understood correctly.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 16, 2009, 10:30:56 am
How/where can I modify the style of the tooltip?

It has transparent background, and error on IE...:(

Many thanks,
B.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: JCarnley on January 26, 2009, 12:45:05 pm
I would like to modify the tooltip also.  It is transparent in FF3 and in IE7 the word false is underneath the tip making it hard to read.  Oddly enough this is a rare case where something looks much better in IE than in FF.  The layout is quite different.  After a lot of work it is usable except for the tool tip.  If I don't use the hover feature the tips generally mess up the layout because of their size.

(http://IE7_nice.jpg)
(http://FF3_usable.jpg)

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on January 26, 2009, 15:58:04 pm
Same question here...:(
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on January 29, 2009, 18:24:13 pm
Joomla 1.5.7 with Custom Attribute Extended Hack 2.15 with VM 1.1.2 doesn't work:
Fatal error: Class 'ps_product_custom_type_' not found in /joomla/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 91
LINE 91: $product_custom_type = new $attr_type_class;

If you are installing this hack and are having this problem, try removing any custom attributes you have already defined from the product database

Code: [Select]
UPDATE `jos_vm_product` SET `custom_attribute`=""
but of course, make a backup of this table before you do this... my system had this problem and removing the predefined custom_attribute fields did the job because the previously defined attributes are not in the expected format, which causes the error message. At least that is my thought process. Someone with more experience please correct me if I am wrong.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kingtech on January 29, 2009, 19:12:02 pm
has anyone got this working successfully on J1.5.9 & VM 1.1.3 ?

I am trying to use the date type custom attribute and it does not seem to work with my installation...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Justin Holstein on January 30, 2009, 06:13:27 am
Hey Ruppert...thanks for you solution on the issue of 'vm112_custom_attribute_extended_2.15' and its issue with not being able to take values over $999 (and not being able to add ',' in the field.

I searched the forums forever trying to find someone who has had the same problem. 

I made your changes, but it keeps giving me an error (expecting one string, but getting a T string or something like that) when I alter that line of code.  Here is what I took from your posting.  Let me know if this is correct:

ORIGINAL HACK:

Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price * (1 + $tax_rate),2));
$value .=  ' ('.$operand.$price_with_tax.')';
}

CHANGE TO:

Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($GLOBALS['CURRENCY']->convert($price * (1 + $tax_rate)),2, '.', ''),'$');
$value .=  ' ('.$operand.$price_with_tax.')';
}

Also, I am using Joomla 1.5.8 and Virtuemart 1.1.3.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ashiwebi on January 30, 2009, 09:44:51 am
Please give me the guide or some document to implement the stuff in joomal 1.5.4 and virtuemart 1.1.2
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Daniel.uww on February 04, 2009, 16:05:03 pm
Can anyone tell me if this modification will allow me to add an attribute to a product where the price of the attribute it added only once, instead of the quantity the customer selects for the product??
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Square Dancer on February 10, 2009, 20:44:46 pm
The Price attribute was set up for people adding donations but it may do what you want. Here is the link where there are examples on how to use the features. http://forum.virtuemart.net/index.php?topic=28192.msg79491#msg79491 I am currently personally have some issues with the hack but need to do some further research. Hope this helps you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ivko on February 12, 2009, 14:34:14 pm
Hello, is it possible to realize img]this (see pic below) with this hack? Did somebody already did this, and if yes how?

Regards Ivan

P.S. the first column in the picture is the quantity, the second price without tax and the third price with tax.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Daniel.uww on February 12, 2009, 17:26:31 pm
That doesn't work. It took to long to get a reply so I went ahead and added the functionality into the hack myself by creating a fake operand.

Only problem is the order confirmation emails display an incorrect subtotal along with the order report in the backend.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fmira on February 14, 2009, 12:11:58 pm
I want to use virtuemart for an online travel agency and I need some modifications for Custom Attributes Extended Hack.

My scenario is the following:

I have a product "cruise 1" with an attribure "Date". This product has some childs products and every one has one Property "Stateroom" and some attribures.

Product=Cruise 1   Date=03/09
Stateroom
   Interior=350
   Oceanview=450
   Suite=600

My problem is that the price for stateroom is a base price to calculate the total price based on number of persons. I have seen that I can use Custom Attributes Extended Hack to get the number of persons:

Adults(Number)(|title-below)(2|xxx);
Childs(Number)(|title-below)(0|xxx);

I need that "xxx" be a mathematical formula based on the price of Stateroom selected.

Adults(Number)(|title-below)(2|stateroom_price*1);
Childs(Number)(|title-below)(0|stateroom_price*0.25);

In addition I need to plus the final price with a taxes based on a total persons (adult+childs);

Final price=adult_totalprice+childs_totalprice+(total_persons*taxes);

Can someone do this modifications?

Best regards and sorry for my bad english.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on February 14, 2009, 16:57:31 pm
Hi Justin Holstein,

Quote
Hey Ruppert...thanks for you solution on the issue of 'vm112_custom_attribute_extended_2.15' and its issue with not being able to take values over $999 (and not being able to add ',' in the field.

I made your changes, but it keeps giving me an error (expecting one string, but getting a T string or something like that) when I alter that line of code.

I haven't had this error but I'm using VM 1.1.2. I'm switching to Joomla 1.5.9 and VM 1.1.3 and I'll let you know if I get the same problem and how I solved it.

Cheers

Ruppert


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on February 14, 2009, 18:11:05 pm
My problem is that the TEXT fields not appear! Nor the select... :o

But the "textarea" is working well... I am using VM 1.1.3 and J 1.5.9
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on February 15, 2009, 14:39:45 pm
Hi Justin Holstein,

I upgraded to VM1.1.3 and Joomla 1.5.9 and I haven't noticed your error. I did however do a very careful manual merge between my modified version of VM1.1.2 (with custom attributes and other tweaks) and the VM 1.1.3 patch.

I'll keep an eye out for your error and let you know if I get it.

Ruppert.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on February 15, 2009, 14:42:43 pm
Anybody up for merging Custom Attributes with the VM 1.2 SVN branch?

http://forum.virtuemart.net/index.php?topic=50073.0 (http://forum.virtuemart.net/index.php?topic=50073.0)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bulesz on February 15, 2009, 15:34:11 pm
Should be....whats next? what should we do?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kitties on February 15, 2009, 16:21:36 pm
@Daniel.uww
Can you tell me what you have changed? Please!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fiero on February 17, 2009, 00:38:09 am
Guys,
I have a problem with Fileupload, many customers are using the same names for the file's so it will overwrite the existing file. Is there a solution for it. Maybe adding the ordernummer to the file in place of date or maybe mailing the file to email address?

I hope you can help me

thanks anyway
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: belindab on February 18, 2009, 17:00:03 pm
Hi,
 I am getting
Fatal error: Class 'ps_product_custom_type_from gallery' not found

Do I really have to remove all my existing attributes in order to start using this? Makes me a bit nervous about the idea of including this in the main product stream - think it needs to be compatible with existing data before you can do that!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Square Dancer on February 21, 2009, 00:25:49 am
« Reply #269 on: October 16, 2008, 02:36:23 am »   

--------------------------------------------------------------------------------
Dear all,
I installed custom attributes extended and i find it very usefull.
I have a problem in my shop when I add in my cart more than one object with custom attributes.
I have the error 500 : premature end of script headers : php4

The thing is that if I add several objects in my cart, there is no problem, but I have always this error if i add two products which have custom attributes.

Did someone occur this problem.
Regards
Matthieu
__________________________________________________
I am having the same problems as Matthieu in IE7 I get the errors in FireFox I just get a blank page.

I have the file upload attribute on all my products and that works just fine. But when I add other custom attributes to my products I can only add one product with multiple custom attributes to my cart and it must the first item otherwise it errors and does not add to the cart. I have added Ruperts adjustments so the attributes line up reasonably.

Has anyone had this problem and solved it? Does anyone have multiple custom attributes on products and can have more than one of the products in thier cart?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mac666 on February 24, 2009, 14:50:43 pm
Hello,
can we install this on a production site on joomla 1.5.9 and VM 1.1.2?
I know that you say its not safe, but we will only use radio butons with picture feature, since it very usefull?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nataliya on February 25, 2009, 11:22:52 am
I upgraded to VM1.1.3 and Joomla 1.5.9 and I haven't noticed your error. I did however do a very careful manual merge between my modified version of VM1.1.2 (with custom attributes and other tweaks) and the VM 1.1.3 patch.

I'll keep an eye out for your error and let you know if I get it.

Ruppert.
Ruppert,
I've recently updated to Joomla 1.5.9 and VM 1.1.3. Everything seems now working except when I click on 'Add to Cart' button it does not adding anything to cart.

Did you or anyone else here had this kind of problem and how did you sorted it out???

Thanks alot in advance for help.

Regards,
Nataliya
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nataliya on February 25, 2009, 15:58:18 pm
Here the example of my Custom Attribute Services
Code: [Select]
First Name(text-r)(|)(|);Surname(text-r)(|)(|);E-mail(text-r)(|)(|);Tel No.(number)(|)(|);Mobile No.(number-r)(|)(|);Pick Up Date(date-r)(|)(|);Pick Up Time(text-r)(|)(|);Flight No.(number-r)(|)(|);Flight Time(text-r)(|)(|);Drop off at(textarea-r)(|)(|);If you chosen return journey please fill in details below(line)(|)(|);test(price)(|)(|)
I also have few standard Attributes.

But when I try to Add to Cart, it does not adding.

Any suggestions??????

Thanks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Island Boy on February 26, 2009, 00:53:13 am
hi, I'm having some issues when I added this hack.    I am getting this error  Notice: Undefined offset: 2 in /home/hustlerr/public_html/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 805  .. I'm getting the same error but on different lines..

I'm seeing that error when i add a product to the cart and it's in the VM cart module. 

Can someone help me to figure this out.

I'm using VirtueMart 1.1.3 with j1.5.8.

Will appreciate any help please.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: eman37 on February 26, 2009, 01:59:28 am
joomla 1.5.9 virtuemart 1.1.2
insert one field and it works insert more than one and it does not
Name(text);
Phone(text);
Email Address(text)

Or will say adding to cart and nothing appears in cart.

Of course any help would appreciated.
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nataliya on February 26, 2009, 10:59:08 am
Here the example of my Custom Attribute Services
Code: [Select]
First Name(text-r)(|)(|);Surname(text-r)(|)(|);E-mail(text-r)(|)(|);Tel No.(number)(|)(|);Mobile No.(number-r)(|)(|);Pick Up Date(date-r)(|)(|);Pick Up Time(text-r)(|)(|);Flight No.(number-r)(|)(|);Flight Time(text-r)(|)(|);Drop off at(textarea-r)(|)(|);If you chosen return journey please fill in details below(line)(|)(|);test(price)(|)(|)
I also have few standard Attributes.

But when I try to Add to Cart, it does not adding.

Any suggestions??????

Thanks.
I've done some testing today and found a bug (or maybe I am doing something wrong).

In a Custom Attribute List:
- text-r - works without problems
- date-r - works without problems
- textarea-r - works without problems
- number-r - not working, it prevent user to add info to cart and also do not display any warning messages.

I've tried to remove -r after the number, but then the info that have been entered in number fields is never shown in cart. The only way round for me, for the time being, to solve this problem is to replace number field with text field and leave a not at the bottom that user would need to enter numbers.

Nataliya
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nataliya on February 26, 2009, 17:09:38 pm
I spent whole day today trying to find out how hack works with VM 1.1.3. i created form and tested step by step, but at the end for some reson my form stoped working.

Code: [Select]
First Name(text-r);
Surname(text-r);
E-mail(text-r)(enter valid email for confirmation purposes|field-below);
Tel No.(text);Mobile No.(text-r)(e.g. +44 1234567890|field-below);
Pick Up Date(date-r);
Pick Up Time(text-r)(e.g.10.35 am/pm|field-below);
Flight No.(text-r);
Flight Time(text-r)(e.g.10.35 am/pm|field-below);
Drop off at(textarea-r)(full address|field-above);
Extra detail(line)(RETURN JOURNEY - please enter details below|field-below)(----------------------------------------------------);
Return Date(date);
Return Time(text)(e.g.10.35 am/pm|field-below);
Return Flight No.(text);
Return Flight Time(text)(e.g.10.35 am/pm|field-below);
Picking up from(textarea)(full address|field-above)

Matbe somebody could spot an error in the form or could provide me with ideas of what could've gone wrong?

Thnaks alot.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: 0m3rta on February 26, 2009, 20:31:30 pm
I've installed VM 1.1.0 on Joomla 1.5.3 and installed the hacked files.  The only part of the package I am really wanting to use is this:

Test(text)(1.50 per character|title-hover)(|1.50|char_nospace-d);

For some reason it isn't working for me though.  It just uses whatever the base price for the item is instead of adding on depending on how many letters they enter.

Anyone know what I'm doing wrong?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nataliya on February 27, 2009, 13:40:04 pm
I spent whole day today trying to find out how hack works with VM 1.1.3. i created form and tested step by step, but at the end for some reson my form stoped working.

Code: [Select]
First Name(text-r);
Surname(text-r);
E-mail(text-r)(enter valid email for confirmation purposes|field-below);
Tel No.(text);
Mobile No.(text-r)(e.g. +44 1234567890|field-below);
Pick Up Date(date-r);
Pick Up Time(text-r)(e.g.10.35 am/pm|field-below);
Flight No.(text-r);
Flight Time(text-r)(e.g.10.35 am/pm|field-below);
Drop off at(textarea-r)(full address|field-above);
Extra detail(line)(RETURN JOURNEY - please enter details below|field-below)(----------------------------------------------------);
Return Date(date);
Return Time(text)(e.g.10.35 am/pm|field-below);
Return Flight No.(text);
Return Flight Time(text)(e.g.10.35 am/pm|field-below);
Picking up from(textarea)(full address|field-above)

Matbe somebody could spot an error in the form or could provide me with ideas of what could've gone wrong?

Thnaks alot.

I've spoted errors myself and now everything work fine.

The error on the above code were:
- on the lines 3,4,5,8 & 15 after the word "No" I've added "." and it stopped all the form from working at all. Once I removed dot everything starts working again.

I'm not sure if it was correct problem/solution but at least it works for me. :-)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: JonathanNZ on March 07, 2009, 17:27:50 pm
For any interested parties, I've contacted JK about the proposed customizations I shared in post #102 of this thread. Here was his reply:

Quote
Adding a checkbox to control whether an attribute should be hidden is not difficult. ...

Here was my reply:

Quote
Okay, I'm interested in doing this. I'd like to start with...
Please see the following images for a visual of what I'm trying to achieve:

http://www.flickr.com/photos/25428873@N05/?saved=1 (http://www.flickr.com/photos/25428873@N05/?saved=1)

If I have this right the cost would be (assuming I only need browser side control):

Templating system - $90
2 Attributes converted (Dropdown, Text input) - $90
Quantity restriction - $120

Total cost - $300
Did this addition ever go through and get added to the hack? I am not sure how to implement it if it's included in v2.15 (which I gather is the most recent one). I'd be interested to know if this is included or not.

This is an incredible addition to VM. I have no idea why this sort of functionality (with the addition of GUI to make all the settings and stuff for those less technically inclined users) isn't part of VM core. It seems so jolly useful.

Thanks for your great work. So cool.

Jonathan
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on March 08, 2009, 19:25:23 pm
I am very interested in this same function. I fabricate custom wedding albums for photographers. The user has the ability to choose from a catalog of designs and some designs offer different options. I would like it if a user chooses a design, only the appropriate attributes pop up for them to choose from.

I would be willing to contribute to the effort. Please let me know as I am trying to get my website www.modebook.com functional and live within the next couple weeks.

Thanks
Jeff

PM me if you like or email me at jmacdoug at optonline dot net
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mac666 on March 09, 2009, 14:18:05 pm
Hello
This worked for our site but it doesnt work no more.
we use joomla 1.1.5 and vm 1.1.2
We get either error 500 when adding to cart, or the loading of the flypage failes with some class error.

who ever wants to fix this for $$$ mail me at marcus-AT-realit.se or skype macsy666, msn marcus-AT-realit.se
we pay 100usd, and we need to have it fixed QUICKLY!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: JonathanNZ on March 09, 2009, 16:25:59 pm
Hello
This worked for our site but it doesnt work no more.
we use joomla 1.1.5 and vm 1.1.2
We get either error 500 when adding to cart, or the loading of the flypage failes with some class error.

who ever wants to fix this for $$$ mail me at marcus-AT-realit.se or skype macsy666, msn marcus-AT-realit.se
we pay 100usd, and we need to have it fixed QUICKLY!!

I have J1.5.8 and VM 1.1.3 and this hack worked "out of the box" for me. I used version 2.15 of the hack (which I understand is the latest).
Not sure if this info helps you, but perhaps it does, and might save you paying someone to fix it...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5[solved]
Post by: grayceworks on March 11, 2009, 05:07:32 am
I love this! I just have one problem with getting it working the way I want to on my site: I need to have TWO date attributes... A first date, and a second alternate date. But when I use two lines with different labels, it doesn't show any date at all on the front end.

How do I get the second one to show up? I must be missing something here... Help?

Thanks!

EDIT: [solved] I WAS missing something... a semicolon... lol... I've been looking at this stuff for too long *rubs eyes*
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: markmg on March 11, 2009, 07:46:05 am
Hope someone can help me..

i am using this
Subcategory1(select)(|)(Yes [+.35],No [+.25])(checkbox:group,Product1);Subcatergory2(select)(|)(Option 1 [+.55],Option 2  [+.25]),(checkbox:group1,Product2)

only one problem, how can a add a image to product 1 and product 2 ... and so on
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on March 11, 2009, 23:34:29 pm
Hey there JonathanNZ..Have you gotten the conditional checkbox thing developed by anyone yet? I am looking all over the net for someone to do the exact thing for me.

Thanks

Jeff
www.modebook.com
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: grayceworks on March 12, 2009, 07:03:57 am
Can someone help me with a formatting issue with these attributes please? For some reason, in IE, they are all running together, instead of each being on their own line like in FF.

Screenshots attached, FF is how it should look, IE shows how after "Date1" the label for "Date2" starts on the same line, then runs out of room so the field is on the next line, followed by the label for the next attribute, etc... so I made the titles longer and that pushed things onto their own lines, but they're still lined up all crooked...

I can see that there's some hard-coded style info in the files for this hack, but not sure which to edit to get this to stop, or even if this is where I need to edit it. editing the theme's main stylesheet for the div classes had no effect whatsoever, so I'm assuming it's due to the hard-coded styles somehow?

The attributes I'm using are as follows:

Requested Date(date-r)(|)(|);
Alternate Date(date-r)(|)(|);
Requested Times(text-r)(|)(|);
Audience Size(number-r)(|)(|);


help? please? Thanks!


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Kim on March 13, 2009, 21:02:37 pm
Hello and thanx for a fantastic attributes hack that ads missing features in virtuemart:-)

One problem though. It doesn't accept the scandinavian characters ÆØÅ.

I'm currently bulding a site using the hack, but if an option contains ÆØÅ or even if the customer writes one of these characters in one of the input fields - the virtuemart cart "crashes" and the previosly bought items dissappear. Would be fantastic if someone could give me some pointers to how I can resolve this problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cer on March 16, 2009, 23:20:09 pm
Thanks for the hack one more time!
I searched the thread and did various new installs but endend up with the following nagging problem:

The CA 2.15 hack group/hide-feature (donated by bgstovall) doesn't seem work with child products. As soon as I group an custom attribute, the whole line disappears.

I believe it is a CSS/layout bug. Firebug does not show errors and the code does get parsed - I can find the missing lines in the source code. I just can't see them.

I also tried themes and child display options - maybe I am missing something in the settings.

I researched into this problem on various 1.5.9 installs on xampp (from ecommerce VM 1.1.2 bundle to 1.13 nightlybuilds). The 2.13 hack doesn't have this problem since it doesn't have the group/hide-feature, right?

I hope someone can point me in the right direction!
cer
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on March 24, 2009, 16:34:22 pm
Hi,

I am starting using hak. Everything is ok so far. I can use multiple attributes and I can upload files. Thanks a lot for this wonderfull package.

My question is regarding the file upload functionality. It would be better that:
- Store the uploaded file under a UserId/ProductID directories instead of putting all uploaded files in a flat directory.
- Enable file upload for only users who have already logged in so that we can use their userid.

Anybody have already met such needs? I beleive they are common needs.

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on March 24, 2009, 17:15:35 pm
For what it's worth (and feel free to completely ignore me), I doubt this thread will help anyone if it becomes only a list of requests for new features / assistance.

The original contributors have done more than enough I would say and I doubt they will still be regularly checking this. From my own experience with such things I'd say the quickest way to solve the problem is figure it out for yourself, or partly out, post the results and see who else might be able to help.

If there is no code to look at, no attempts to solve it documented, it is very difficult for other people to get involved, or people passing by to try and help.

Just my 2 cents.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on March 24, 2009, 17:51:10 pm
I indeed started on looking on the code. I'll put here any change I'll make even if I am not sure I'll manage to do it.

The idea was to know if anyone has already done something like that.

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on March 26, 2009, 13:39:44 pm
Hi,

I've got a very simple question: When an order is made are these custom attributes added to the database? which table? which field?

I searched in the forum looking for this information and I had a look on the tables without success . However it should be stored somewhere otherwise the extended attributes will be useless.

Any help ?
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Henry Peeters on March 26, 2009, 15:22:42 pm
Hi,

I'm using version 2.15 of this hack together with virtuemart 1.1.2 and joomla 1.5.8. I've installed the hack succesfully but there is one small issue which is quite annoying, i'll explain.

Customers must choose a color for the product, so this is mandatory. When customers click on add to cart on the category page, they will go to that flypage which tells them that they need to select an item, everything fine so far, now the problem is that the amount of product is reset to 0, instead of default 1. Any ideas how to solve this? It only happens when clicking "add to cart" on the category page. When click "product details" for example, that amount on the flypage stays 1.

Many thanks for an answer.

Rgds,

Henry
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: indiebindy on March 27, 2009, 18:40:06 pm
Great hack got it to work on my site... is it possible to add a wysiwyg editor like from the comments to the textarea so it's possible for the customer to format what they would like on their stamps?

joomla 1.5.9 / virtuemart 1.1.3 / hack 2.15
www.newprintersworkshop.com/npw
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on March 30, 2009, 02:01:47 am
Would it be possible to make dependent dropdowns or chained selects using this hack? If anyone can please let me know.

Jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 03, 2009, 04:20:03 am
I am not really sure if anyone has noticed my redundent posts but I am looking for someone to work in swfupload into the extended hacks that were updated by joseph kwan. I have sent him several messages myself with no rplies back to me. So, if anyone is looking at this and can make this happen for me, I am HERE!! My goal is to allow the client to upload multiple files at in one shot. It's not impossible.

jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Spaz on April 07, 2009, 19:43:45 pm
First off, great hack.  So far everything is working and was super easy to install.

My problem is that when I input custom attributes with pictures, they are all in one column.  There's enough room to show pictures in two columns but it doesn't seem to work that way.  Anyone know what I need to change in order to get the custom attributes to display in two columns (like the original hack had in his example picture?)

Thanks in advance.

(http://www.apollopercussion.com/images/custom_attributes.jpg)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kelfy on April 08, 2009, 17:31:05 pm
Hi,

This is my first time to use this component but I'm having problem with Date attribute and the calendar. It doesn't show the calendar when I click the button. When I look into Javscript console it shows error with showCalendar(). Anyone can help?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 09, 2009, 15:51:23 pm
What I would like to know is how deep can the "Hidden Options" setting go. For instance, If you choose SIZE A, certain options appear below, then if you choose one of those options, another set of options goes below. I am hoping this can happen in 3 levels. Right now it looks like 2.

This would be very helpful. Also, will there be any additions to this hack? SWFupload maybe?

Jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 09, 2009, 15:58:17 pm
I also wanted to ask this as well and is purely for aesthetics. When an option is chosen the sub-options just "pop in". Is there any way to have them appear to "drop smoothly"? Just curious. I have seen it in other sites.

Jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on April 09, 2009, 16:42:34 pm
Hi,

I've asked in a post above if it is possible to store the uploaded file under a directory whose name is the user id. This was a stupide question because user can add a product in the cart without logging in. However there is still the problem that if two users upload 2 files with the same name, the second user will erase the file of the first one. The second user will not be happy when he'll receive his command. I am really surprised that this does not bother the other users of this hak unless there is something I did not understand.

Any way, I haked the hak so that the user receives an error message that the file exists already if this is the case. However, the product is still added to the cart with empty files fields. It woul be better to cancel the add to the cart if anyone knows how to do it.

I am putting here the hak I made if someone is interested:
Before code:
Code: [Select]
// return if file upload failed
$save_file_name=date('Y-m-d').'.'.strtolower($file_name);
if (!move_uploaded_file($_FILES[$titlevar]['tmp_name'], $uploaddir.$save_file_name)){
$vmLogger->err( $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE . ' ' . strtolower($file_name) );
return false;
} else {
JPath::setPermissions($uploaddir.$save_file_name);
}
After code:
Code: [Select]
$current = getdate();
// turn it into a string
$current_date = $current['year'] . '.' . $current['mon'] . '.' . $current['mday'];
$uploaddir=$uploaddir . $current_date.'/';
// create directory if doesn't exist

if(!is_dir( $uploaddir ) && !is_file( $uploaddir )) {
JFolder::create( $uploaddir );
$refresh_dirs = true;
}
// return if file upload failed
/* $save_file_name=date('Y-m-d').'.'.strtolower($file_name); */
$save_file_name=strtolower($file_name);
if( file_exists( $uploaddir.$save_file_name ) ) {
$vmLogger->err( 'the file '.$file_name.' already exists, please choose another name');
return false;
}
if (!move_uploaded_file($_FILES[$titlevar]['tmp_name'], $uploaddir.$save_file_name)){
$vmLogger->err( $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE . ' ' . strtolower($file_name) );
return false;
} else {
JPath::setPermissions($uploaddir.$save_file_name);
}

Suggestions are welcome.
Regards
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on April 10, 2009, 11:18:17 am
Hi,

I found a bug related to the use of attributes and fixed it. I put it in a new post since it is not specially related to this hak. You can find it here: http://forum.virtuemart.net/index.php?topic=54154.0

Regards
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on April 10, 2009, 12:04:15 pm
I found another bug related to the use of children products when Ajax is not used. Users of extended custom attributes to upload files don't use Ajax so it is possible that you have already met this problem. A help will be welcome. The problem is described in this link: http://forum.virtuemart.net/index.php?topic=54156.0

Hope you can help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pandoreweb on April 14, 2009, 15:19:16 pm
Hello

I use VM 1.1 and Joomla 1.5

When I add to cart my product with the attribute (type number), everything is ok and the cart displays the good price.
But when I click on "checkout", the cart displays a wrong price, that is to say the price without the attribute.

There is a post about my issue here : http://forum.virtuemart.net/index.php?topic=36469.0

But this is for old joomla 1.1

Can you help me ?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: toastguy on April 17, 2009, 19:06:37 pm
Nice, 25 pages of posts. I'm fresh to this thread. What is the current status? It looks like this is work in progress. Perhaps I can contribute help as I'm a php developer.

Thanks in advance for the update.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: zrylux on April 19, 2009, 01:59:04 am
Hello.

Seems i've found an extrange error. On the first order all works correctly but when I go the shop again and buy again, when I hit " add to cart" returns a blank page.

Now if I go to delete all m,y temporary files and cookies, and works fine again. It seems to be a problem with cookis or tmp files?

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 19, 2009, 05:06:10 am
OK, check this out... When you go to this link on my site notice how it does not work when you choose a child product

http://www.modebook.com/joomla/build-your-book?page=shop.product_details&flypage=flypage.tpl&product_id=3&category_id=2


Now, if you change that to without the www it works

http://modebook.com/joomla/build-your-book?page=shop.product_details&flypage=flypage.tpl&product_id=3&category_id=2


The second problem I am having is that hidden attributes do not work on child attributes. Try to click a radio on my child product. Nothing happens. Any suggestions?

Jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cer on April 23, 2009, 09:32:55 am
I already posted my problem regarding the group/hide-feature a couple of months ago (see this http://forum.virtuemart.net/index.php?topic=39666.msg172262#msg172262 (http://forum.virtuemart.net/index.php?topic=39666.msg172262#msg172262).

Since I didn't find a solution I'd like to try something different: I want to remove the CA-lines for the attribute type "text" if there is no user input. that means if the default text is not altered or the input box is empty there should be no entry in the minicart or the cart itself.

I know that it has to do with the function "getDescriptionWithTax" in "ps_product.php" (around line 1936ff.). But I have a hard time finding the right variables for an if/then-statement.

help is really appreciated!!
   
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on April 24, 2009, 14:46:58 pm
Hi,

Anyone is using this hack with joomfish? It works but the joomfish input box where to put the translated attributes is too small. There is no enough room to write all the attributes.

 I am trying to find where to extend this box without success. If you have already met this problem your help will be appreciated.

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on April 24, 2009, 18:04:23 pm
I found a solution about my question above regarding joomfish: in the file administrator\components\com_joomfish\views\translate\tmpl\edit.php, I added the line:
Code: [Select]
$maxLength = 1000;


after the line:
Code: [Select]
$maxLength = ($field->MaxLength>0)?$field->MaxLength:60;

Hope this help
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dravas on April 28, 2009, 17:27:44 pm
Is this HACK compatible with 1.1.3?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 29, 2009, 05:39:18 am
you're beating a dead fish here. no one is interested in this hack anymore..not even for money. it's sad. I have made several attempts to request what I need and most do not even answer me.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dravas on April 29, 2009, 16:49:03 pm
Jeff,

Your correct, I did'nt get an answer... But it is working in 1.1.3 ok... Some issues with formatting.. but that's a flypage issue..

The hack works well thank you!
d
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on April 29, 2009, 17:13:24 pm
Well, I am not very optimistic about the future of the VM project. I know it is open source. I have gotten a great response from Magento as far as support (community support) that is. Anyway, good luck. You will find some annoying quirks with this hack across different browsers.  I have been playing with it for a while so I could share what I have learned with it thus far.

Best,

Jeff
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dravas on April 29, 2009, 19:42:15 pm
Jeff,

There are some issues, especually trying to find out details and getting a response.  I find this typically as a problem in forums such as these.  I do not think vm is going anywhere soon, it works, provides a solution and seems to be getting better all the time. 

Typically, opensource support seems to be directly attrbuted to users, reading, forum participation and a good IRC.  The DOJO Toolkit has a great support effort beyond the developer's its the community. 

Granted VM may not have the population of DOJO but their team is pretty handy and responsive, at least in my short experience.  When your under the gun immediacy is relevant eh?

Perhaps you could share the browser issues.  I am starting to implement DOJO in my cart to resole some known issues (IE7 BLAH) but beyond that VM has been berry berry good to me!

Cheers Mate,
d
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: john on April 29, 2009, 22:59:36 pm
Hello,
I have implemented Converted Custom Attributes Extended Hack 2.15 hack and it worked perfectly, I can see the images select them.. one problem though im setting up a photo site where the user selects which layout he would like as a background and adds it to the cart with his selected package, but in order to select the layout he would have to preview it or I don't know hover over the image so it expands and selects his option. Is there anyway this can be done..? i could create thumbnails 100X100 but i have 40 different layouts.

Please let me know so i can continue with this project.

Thanks,

John
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Jeff on May 02, 2009, 18:34:28 pm
I am using the hidden groups syntax to achieve what I need. The only issue I have is that I would like to use "dropdown select" rather than the radio. Can anyone help me out with this?

Thanks a bunch
Title: Custom attributes images are not displayed in row
Post by: diligent on May 05, 2009, 08:40:43 am
 I am using virtuemart 1.1.3 & joomla 1.5.9

      for this setup i am using custom attribute list with option  radio button & respective images

problem
        1) in Firefox custom attribute's images are displayed in Column
           while in IE7 they are shown in one row.

     In which php file i should do changes so that in both browser images are Displayed as per layout below.
         
           img1 img2 img3 img4
           img5 img6 img7 img8
            .......... so on


Thanks
Diligent

         
     
     
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alienfulla on May 12, 2009, 12:18:36 pm
My initial testing with this is good - Looking like exactly what I'm after
Great Job Guys
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tokidoki2005 on May 12, 2009, 23:40:37 pm
Is there a version for joomla 1.5 and Virtuemart 1.1.3? and php5?
Mahalo!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alienfulla on May 16, 2009, 04:32:09 am
I am not really sure if anyone has noticed my redundent posts but I am looking for someone to work in swfupload into the extended hacks that were updated by joseph kwan. I have sent him several messages myself with no rplies back to me. So, if anyone is looking at this and can make this happen for me, I am HERE!! My goal is to allow the client to upload multiple files at in one shot. It's not impossible.

jeff

You should be able to do this using multiple (file) fields
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: notelseit on May 29, 2009, 17:51:34 pm
i want to have a textarea with lengh
i want to have a textarea with width
i want it to calculate ALONE the surface

Lenght(text)(|field-below)(lenght in m|);
width(text)(|field-below)(width in m|);

and after ? Huh
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kevin on May 30, 2009, 00:03:35 am
I have the same problem with text fields not displaying. Been working on this all day with no fix. Tried all of the sample syntax examples. Everythng else seems to work fine. Any help would save my weekend. VM 1.1.3 Joomla 1.5.10

Kevin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kevin on June 03, 2009, 21:59:43 pm
Found the solution... it's called magento.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: phoogland on June 06, 2009, 13:11:59 pm
Thank you very much for this hack i hope it works.

i'm using virtuemart 1.5 and virtuemart 1.1.3 do you know if this wil work?
I want to be able to add options to a product using a checkbox and a dropdown list.

by the way I think this is usefull update but it's difficult to find.  ;D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Geister on June 15, 2009, 12:22:19 pm
Nice Hack. It works in Virtuemart 1.1.3. However, as far as I understood, it damages the childitem hack that is implemented in Virtuemart 1.1.3. Am I right?
Is it possible to keep Child-product function and use this Custom Attributes Hack?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cer on June 17, 2009, 17:19:52 pm
bump
Thanks for the hack one more time!
I searched the thread and did various new installs but endend up with the following nagging problem:

The CA 2.15 hack group/hide-feature (donated by bgstovall) doesn't seem work with child products. As soon as I group an custom attribute, the whole line disappears.

I believe it is a CSS/layout bug. Firebug does not show errors and the code does get parsed - I can find the missing lines in the source code. I just can't see them.

I also tried themes and child display options - maybe I am missing something in the settings.

I researched into this problem on various 1.5.9 installs on xampp (from ecommerce VM 1.1.2 bundle to 1.13 nightlybuilds). The 2.13 hack doesn't have this problem since it doesn't have the group/hide-feature, right?

I hope someone can point me in the right direction!
cer

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on June 25, 2009, 22:29:56 pm
I tried the file upload attribute for artwork.

When I clicked add to cart I get a message popup that simply says "Error" with no defined error. But the artwork does not make it to cart. I am allowing .AI, .EPS and .JPG. None of which worked.

Any ideas?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: draqi on July 06, 2009, 13:56:45 pm
Great hack! I was testing this and came up the follow:

I have a product in different sizes and a extra price for a bigger one.
But is it possible to add a weight on a other size? So the product dont have only one weight anymore.


See image of the testing:

(http://img14.imageshack.us/img14/8258/probleeml.jpg)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: inthysite on July 19, 2009, 22:09:51 pm
Is there any way to calculate square footage?  I have a client that sells floor mats.  They sell standard sizes and as the size increase so does the prices, but they also sell custom size in which the customer needs to enter the width and height and the cart needs to calculate the price based on square footage.

Is there a way to hack the hack to make it do this?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: protonite on July 24, 2009, 19:06:22 pm
In using syntax like listed belowe... And I'm wondering if it's possible to somehow hide (+$5.00) in product page and in a cart...

I have a shop set as some sort of catalog, where user can add products to cart and then send cart for order. All he get's is total price. So I would need that actual price +5$ is calculated but not displayed... Is that possible?

Checkbox & Radio & Select & Multiple:
Name(checkbox)(tip here|location)(option1|image1,option2*|image2,option3 [+5.00]|image3);

Thanks for answer.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jurgenv on July 29, 2009, 09:34:06 am
Its great this hack is here though i dont get why its not a standard option in virtuemart. I have some issues with the layout. In Internet Explorer 7.0 the layout is correct (except for the big blue space), but in Firefox and Internet Explorer 8.0 the letters get underneath the checkboxes for some strange reason. I tried solving it in the stylesheet and php file but to this moment i did not have any luck with it. Anyone who can direct me in the right direction? Thanks. Screenshots attached. And this is an example of the attribute im using:

Problem solved for now, see post below.


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: one on August 01, 2009, 02:05:36 am
Hello all!

I have the same problem... Any one can help us?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pallavan on August 01, 2009, 15:08:40 pm
In using syntax like listed belowe... And I'm wondering if it's possible to somehow hide (+$5.00) in product page and in a cart...

I have a shop set as some sort of catalog, where user can add products to cart and then send cart for order. All he get's is total price. So I would need that actual price +5$ is calculated but not displayed... Is that possible?

Checkbox & Radio & Select & Multiple:
Name(checkbox)(tip here|location)(option1|image1,option2*|image2,option3 [+5.00]|image3);

Thanks for answer.

Yes it is possible,
On the file

webroot/administrator/components/com_virtuemart/classes/ps_product_custom_type.php

Around line 56 you have a line like this..

$value .=  ' ('.$operand.$price_with_tax.')';

Just comment out this..

Now you can see the options without showing prices and the cart working the same
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jurgenv on August 04, 2009, 09:30:13 am
Hello all!

I have the same problem... Any one can help us?

I solved it (for now atleast)

This post helped me a lot:
http://forum.virtuemart.net/index.php?topic=39666.msg149698#msg149698

But not entirely i still had some issues i made some changes on my own (can't remember what) and then it worked.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: germ on August 04, 2009, 11:16:08 am
I already started one new topic http://forum.virtuemart.net/index.php?topic=58745.0 regarding changing the weight of the product by the customer. However, if no general solution exists, I would like to ask experts in Custom attributes hack-is it possible to transfer data from the custom attribute to the shipping module. For example-I create text field where user can insert weight of the product. How this value can be directed to one of the shipping modules?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bpryor on August 09, 2009, 18:50:24 pm
I have install the converted hack in J1.5 and VM 1.1.3 and it's mostly working though I'm experiencing an issue that I can't find addressed in this thread and it would be pretty common so I'm wondering if it was introduced in VM 1.1.3.

When I add an additional cost in a list of items, on the product page they display with 8.25% added to each amount($20 shows as (+$21.65), etc). That just happens to be the VAT amount, which I do not have turned on.  In the cart it is displayed correctly without the additional percentatge.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jimmyshushine on August 16, 2009, 01:46:37 am
Hi all,
I want to pre fill a custom attribute field when the product page loads. Is the best way of doing this via the url? So for example I have a form in the website that the customer fills out, the form checks the data and gives the customer the available choices, so for example, the customer enters "Brian" the form runs a check and tells them that "Brian" is available. The customer clicks "buy now". They are redirected to the product page, where the custom attribute "Brian" is filled in when the page is loaded and they can complete purchase.

I have tried passing the data via the url in this format

http://localhost/etc//index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&category_id=15&product_id=62&Itemid=53&Name=Brian

The page loads but the custom attribute remains blank.
This is done without the hack. Will the hack be able to solve this problem for me? I can't really find a definitive answer in the VM forum.

Can someone please point me in the right direction here. I would be eternally grateful and am out of ideas. Thanks everyone for your time and help.

Viva Virtuemart!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dbzeroone on August 17, 2009, 22:06:12 pm
Joomla 1.5.14 - VirtueMart 1.1.3

I've been reading this thread and the previous one (for version 1.0.x) and I can honestly say I'm totally confused.

First, where can I find install instructions? The old steps don't correlate to the files anymore.

So I'm trying to push my way through as best as I can, but at best I get a textbox for 'Custom Attributes' in Product Status. Clicking on the item that should contain the donation field returns a blank white page.

Am I wasting my time here? Has this been integrated into 1.1.3? All I need to do is allow users to enter whatever donation amount they want. Can anyone point me in the right direction? Many thanks in advance!

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on August 19, 2009, 00:36:42 am
I think all instructions are those in the thread here. I don't think the steps should have changed. It does sound though like you don't have all the files you should. I have had a working version of this for either 1.1.2 or 1.1.3 (not sure which) and just followed instructions from first post. However, I only tested some of it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: markspillane on August 27, 2009, 07:54:33 am
Joomla 1.5
VirtueMart 1.1.3 stable

I have a Joomla charity website where I want to give people the ability to donate a user defined amount using virtue mart.

Can someone help me with this?

For instance, I would like a user to be able to click on a "donate" button on the site, and be directed to the virtuemart product page where they define how much they want to donate, they then register, make the payment via our merchant services payment gateway and then receive a receipt. We then also have a history of payments.

PLEASE HELP :)

mark@gunmedia.com.au
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bhoult on September 08, 2009, 23:20:41 pm
I posted this in an older thread, but it seems like this location would be more appropriate, since I am using Joomla 1.5.9.

Could anyone verify for me that adding a cost to a (file) updates the price in the javascript, it does not seem to be working for me and I am not sure if it is a problem with the hack or with my implementation of it.  Everything else seems to be working except this.

I have tried the following format variations:

Photograph 2(file)(test|title-below)(vmdocuments/|.jpg,.gif,.tif|25.00);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|25);
Photograph 2(file)(test|title-below)(vmdocuments/|.jpg,.gif,.tif|+25.00);
Photograph 2(file)(|)(vmdocuments/|.jpg,.gif,.tif|[25]);
Photograph 2(file)(|)(vmdocuments/|.jpg,.gif,.tif|[+25]);

The complete custom attribute list I am using is as follows:

Services(radio-r)(|)(Electronic Broadcast Only {Available M-F},Electronic Broadcast add on fee + emailing[+50]);
Renewal Fee(checkbox)(|)(Yes - renew broadcast after 2 week initial posting period[+20]);
Press Release(file-r)(|)(vmdocuments|.doc,.pdf);
Photograph 1(file)(Additional charge of $25 per photograph|field-above)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 3(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 4(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 5(file)(|)(vmdocuments|.jpg,.gif,.tif|+25)
Items to be emailed(checkbox-r)(What items would you like emailed when your press release is sent out?|field-above)(News Release,Photo);
Release Date(date-r)(When would you like your press release to be sent out?|field-above);
Number of Pages(number-r)(|);
Subject Line(text-r)(The title of the email being sent out.|field-above)

My installation:

Joomla 1.5.9
Virtumart 1.1.2

Thanks in advance for any help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: inthysite on September 10, 2009, 00:09:20 am
For those of you who are experiencing 500 Internal Server Errors when using the file uploads here is what resolved the issue for me.

I was having the problem that the first upload would work but then any attempts after that would result in the Internal Server Error.

I was frustrated because the file upload worked perfectly on my local server running WAMP so I compared my PHP settings to those on the live site and discovered a few differences.

Changing the following in my php.ini (on the live site) resolved my problem:
magic_quotes - changed from on to off
memory_limit - changed from 64M to 128M
register_globals - changed from on to off
register_argc_argv - changed from on to off

Hope this helps someone else.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dr_pole on September 15, 2009, 14:14:41 pm
hi,
if have installed extended hack 2.15 on vm 1.1.3, but i can't fix that with the php notice-messages. i added 30 atributes and when add a product with some attributes it shows me the php notices in my cart.

Notice: Undefined offset: 3 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 301

Notice: Undefined offset: 3 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 301

Notice: Undefined offset: 3 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 69

Notice: Undefined offset: 1 in /var/www/web61/html/shop/administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 301

what can i do to fix that?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dr_pole on September 18, 2009, 08:33:34 am
fixed my problems, called the server admin -> turned off php notices

works fine with VM 1.1.3 and J 1.5.9

only thing to mention about: the taxes are not calculated correctly in the attribute list, but in cart its ok.

any solutions?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ruppert on September 25, 2009, 01:33:45 am
I want to pre fill a custom attribute field when the product page loads. Is the best way of doing this via the url?

...


You might want to look at my hack for this: http://forum.virtuemart.net/index.php?topic=39666.msg147808#msg147808
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: srini28 on October 08, 2009, 05:47:53 am
Does this hack work with Joomla 1.0? I tried installing it on Joomla 1.0 with VM 1.1 today but got an error -

Fatal error: Class 'JHTML' not found in /home/simplosy/public_html/backlinkman/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_form.tpl.php on line 25
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on October 08, 2009, 09:54:31 am
I strongly recommend updating Joomla. It will be more and more difficult to get help for Joomla 1.0x.

There was a custom attribute hack for 1.0x (link in original post). I think everyone in this thread will be Joomla 1.5x.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MrWhy on October 08, 2009, 23:26:26 pm
Hi,

could somebody show me, where i find the function, which shows the images under the  Radio/Checkbox selector? I can´t find the function... I think i have searched through all files of the hack but i don´t find the part where the images are loaded, (where the html is generated  for the selection  box + the image).

Thx a lot!

Greetz and n8

Mr.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: shinbet on October 15, 2009, 19:44:50 pm
ok, i'm trying to use the custom atttributes to add accessroies to my photography packages,For this example i am adding a picture magnet, option
for the most part it works, but for some reason, it does not all appear on one line, even though there is plenty room, the image is very small.
Do I have to write something after the image to make it right align to the text?



Magnet(checkbox)(another tip|title-hover)([+10.00]|images/accessories/magnet.jpg);


any help would be appreciated

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Exie on October 16, 2009, 15:54:59 pm
I installed this hack (Joomla 1.5.10, VM 1.1.3) and at first sight it works like a charm. But for some reason i'm not able to add two products to the cart when using the custom attributes.

For example:

Below is a screenshot of a product with multiple colors. When I add one product with a color it works. Product goes to the cart etc. When i try to add another one with the same or different color the "add to cart" button does nothing. No error.....

I tried a full copy of the website on a home server (Xampp) and everything works fine when adding multiple products with different colors etc.

Anyone got any ideas why it fails for multiple products on the production server?

(http://www.scipita.nl/bokt/image.jpg)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: shinbet on October 16, 2009, 16:29:44 pm
I installed this hack (Joomla 1.5.10, VM 1.1.3) and at first sight it works like a charm. But for some reason i'm not able to add two products to the cart when using the custom attributes.

For example:

Below is a screenshot of a product with multiple colors. When I add one product with a color it works. Product goes to the cart etc. When i try to add another one with the same or different color the "add to cart" button does nothing. No error.....

I tried a full copy of the website on a home server (Xampp) and everything works fine when adding multiple products with different colors etc.

Anyone got any ideas why it fails for multiple products on the production server?

(http://www.scipita.nl/bokt/image.jpg)

are you using a radio button?
shouldnt you be using a checkbox for multiple options
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Exie on October 16, 2009, 16:39:00 pm
Quote

are you using a radio button?
shouldnt you be using a checkbox for multiple options

Sorry if I wasnt clear in my previous post (english is not my first language ;) )

Isn't checkbox for selecting multiple options? I only want the customer to be able to select one color. The color selection works fine.

It's the adding to the cart for the second product after i added a product with custom attributes that gives problems.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: shinbet on October 16, 2009, 16:58:40 pm
Quote
It's the adding to the cart for the second product after i added a product with custom attributes that gives problems.

oh, i am not sure, perhaps someone can advise you here
one thing, your layout seems very nice , the image followed by the radio button all on one line, for some reason, my layout does not look so nice,
are you able to tell me how you get the image and text on one line
this is mine (http://)

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Lars Nielsen on October 25, 2009, 00:02:24 am
Hi.
What am i doing wrong when the attribute comes out as pure text, just as i had put in the userdefined attribute box? Im using joomla 1.5.14 and WM 1.1.13
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: shinbet on October 26, 2009, 22:03:01 pm
does anyone please have a minute to help me
hi
I am trying to display something with custom attribute. but i am not succeeding

I am trying to show a series of accessories for a product
i want my layout to be Product name,  checkbox,  image and product description

But for some reason, i can only get the description to work as a tool tip.
Here is my syntax

(http://)

Code: [Select]
accessory name(checkbox)(description|title-hover)([+1.00]|images/accessories/apron.jpg);

Do i have to change something else in one of the php files?
I have read thru the custom attributes several times over, and have read the documentation, but to no avail

Please help

Thanks

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: srini28 on November 03, 2009, 19:45:07 pm
I strongly recommend updating Joomla. It will be more and more difficult to get help for Joomla 1.0x.

There was a custom attribute hack for 1.0x (link in original post). I think everyone in this thread will be Joomla 1.5x.


Thanks Mike. I upgrade Joomla to 1.5.14 and VM to 1.1.3. Can I use this fix now?

Which version of the fix should I download?

Thanks,
Srini
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on November 03, 2009, 20:43:15 pm
I am not involved in the mod, and I don't think it is actively supported. All the info available is in this thread.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MrWhy on November 09, 2009, 11:59:32 am
Hi Srini,

yes you could use this fix now. I am evaluating this fix for my site, for that I am using this version:

vm112_custom_attribute_extended_2.15.zip

greetz

Mr.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bmacwire on November 14, 2009, 15:14:54 pm
Having read a bunch of posts about this hack it is a long and somewhat sad history.  VM has been aware of this hack for over two years, and yet it has never been included in an upgrade, nor have they come up with their own solution.  I would seriously be willing to pay $100 for a module that did this.  I'm sure there are many, many others that would as well.  The fact that no has done it gives me grave doubts about VM as a long term solution for my needs.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on November 14, 2009, 17:01:21 pm
@bmacwire   You could try the commercial thread. I agree that VM, and open-source projects in general, is probably not the solution for you. These types of projects are about give and take. Your comments about this hack and VM might have some weight if you had mentioned what you have added to this hack or the VM project.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: simple79 on November 19, 2009, 09:50:14 am
Looking for some help guys.

I'm using Joomla v1.5, VM 1.1.3 and Custom Atrribute Hack 2.15.

The problem I'm facing is when adding a further product when one exists in the cart.  If I have a product with no custom attributes, then there's no issue.  However if I add an further products that contain custom attributes - then I get a blank page and the product is not added.

Store / Category:

hxxp://keepstakes.chocolatelimehosting.co.uk/index.php?option=com_virtuemart&page=shop.browse&category_id=6&Itemid=10

I have a product with no custom attributes - you can add, remove and re add this product.  Try doing that with any of the other products (which contain custom attributes) and you get a blank page and no error log.

Any thoughts or help is most appreciated.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: LilMissLotus on November 19, 2009, 17:36:52 pm
I searched the thread and couldn't find anything about how this will work with my inventory. In my store I have shoes that I only have one of a certain size... Is there a way to have it update the inventory? I had the easy inventory (http://www.nextphasedesigns.com) module installed but when I installed the files for this it erased the easy inventory files. Can I have both somehow?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Thaimon on December 02, 2009, 20:04:04 pm
Hey,

Has anyone got this hack working with VM 1.1.4. ?

If so, please share how.

Thnx in advance,

Thaimon
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Solle on December 11, 2009, 13:53:44 pm
Hey,

I just found a big problem for me! I have a store whith this hack and very happy whith the hack!

Only one problem;

I cant use the letter å in none of the fields! If i use the letter å the cart will empty it self and all i get is "Cart Empty". I wierd things is that the hack works fine whith ä,ö but not å.

Please help me!

/Solle
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: hondotech on December 15, 2009, 02:54:14 am
Does anyone have any experience with this mod?
Anyone know if it will function with current Joomla/VMart?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: MikeUK on December 15, 2009, 09:17:47 am
You've posted this question twice, and did the same with your last post. If everybody did that it, it would not help the forum.

Best thing to do is use the information in the thread.  If you are not comfortable testing modifications yourself, the best thing to do is to pay someone to do it for you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: yaani on December 31, 2009, 03:35:53 am
I would also like to know if this hack works for Virtuemart 1.1.4

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cococococococo on January 02, 2010, 21:36:40 pm
Hello everybody.

I have a question related to the storage of the custom attributes.

By looking in the database how the value of the custom attribute are stored we can see that all the value are stored in the same field and every value is separated with </br>.

My question is how to store every value in separated field ?Does anyone has idea how to store individually every field ?

I would like to do that in order to be able to sort out order per attribute.

Thanks in advanced for your help.

Regards
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: inthysite on January 06, 2010, 18:55:37 pm
I've installed this on VM 1.1.4 and it seems to be working okay.  At first I got a lot of errors but noticed they weren't errors but Warnings and Notices.  I tried turning error reporting off in Joomla but that didn't help so I added the following in components/com_virtuemart/virtuemart.php:
Code: [Select]
error_reporting(0)
This prevents the warnings and notices from displaying and everything appears to be working.  I haven't fully tested this yet but I've added a couple of checkboxes and price attributes and they seem to work.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dbzeroone on January 08, 2010, 18:29:55 pm
I just added this to Joomla 1.5.15/VM 1.1.4 for the variable donation amount function. I posted before that I was totally confused by this... no idea what I was thinking. Installation was straightforward and configuration was easy thanks to a chunk of sample code from Barnett (see below):
Code: [Select]
Date(date)(tip here|field-above)(|);
Color Options(checkbox)(another tip|title-hover)(test1 [+10.00]|images/img_1.jpg,test2 [-20.00]|images/img_2.jpg,test3 [-10.00]|images/img_3.jpg,test4 [+30.00]*|images/img_4.jpg,test5 [-5.00]|images/img_5.jpg);
Divide(line)(tip-here|field-below)(<b>---------------------------</b>);
Engrave(text)(3.00 per character|field-below)(name here|3.00|char);
Donation(price-r)(help us out|field-below)(25.00|+);
File Upload(file)(20.00 for file upload|field-below)(images/|.jpg,.doc|20.00);

I simply stripped out the stuff I didn't need.

Thanks to everyone involved for this! Cheers!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: David Richmond on January 09, 2010, 21:28:56 pm
Hi I've been using this hack on several sites since the first 1.0x Joomla versions and I love it.  I have a very specific problem with a new site i just deployed Joomla 1.5.9 VM Version 1.1.3. and i have contributed a couple of items to the hack (formatting fixes.)

Everything with this current site works as expected except for photo uploads *DISCLAMER IVE DONE EXTENSIVE SEARCHING IN THE FORUMS* Ajax is turned off but i dont even think thats the problem. The permissions and ownership of the directories and paths in VM are correct.  This is confirmed by deleting the directory and allowing the function to create the non existant directory and write the .html file that prevents direct access. The product gets added to the cart with all other custom attributes, but I get a vm logger msg ERROR: <blank> (The blank msg is a lack of the $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE not being in the language file but it would read "File/Image Upload Failed" if it where there but i digress...)

I tracked down where the error is thrown in this file:
/var/www/virtual/usankf.org/htdocs/administrator/components/com_virtuemart/classes/ps_product_custom_type.php


On or about Line 650 there is the function that handels uploads 'function customTypeProcess($value, $field=array())' I have traced the error to a simple boolean expression on or about line 710 of this function

Code: [Select]
if (isset($_FILES[$titlevar]) && is_array($_FILES[$titlevar])){
  
    ... Does a bunch of validation and uploads the file and logs problems...

}

Well the simple problem is that $_FILES is indeed an array but it is empty.  So with an empty array there is no filename passed into the function to init the upload.  With that said when I debug VM and look at the global $vars the filename of the upload IS contained in that array.

Code: [Select]
product_id => 18
Last_Name => David
First_Name => Richmond
Middle_Initial => P
Address_Line_1 => 110 anywhere st
Address_Line_2 => Suite A
City => Tomons
State => Hidalgo
Zipcode => AB4k33
Phone_Number => 44343250003
Email => nospam@thanks.com
Date_of_Birth => 5/15/89
Upload_Photo => IMG_0317.JPG
minimum_quantity => 0
flypage => shop.flypage.tpl
page => shop.cart
manufacturer_id => 1
category_id => 6
func => cartAdd
option => com_virtuemart
Itemid => 6
RokMicroNews => {"0":{"open":true,"element":"section-3-6"},"1":{"open":true,"element":"section-3-8"}}
ys-vmconfiguration-active => s:ext-comp-1005
ys-dashboard-active => s:ext-comp-1003
ys-debugpanel-active => s:ext-comp-1004
ja_purity_tpl => ja_purity
switchmenu => 8
virtuemart => 0230673836761533558d5eb174e2ec65
9aad8b7fa1d531ce90e6a50544104382 => 0230673836761533558d5eb174e2ec65
cbcc6125788040a19323045f8e5af6d6 => c4525bef2a4177724b98ccd7360bcd9e
order_subtotal_withtax => 50
payment_discount => 0

One post mentioned this was AJAX turned on but as I mentioned mine is off. I also contemplated some sort of Template error since i use a rocket theme and i did find a post about a problem with one of their themes.  So to eliminate that as a problem I changed back to the Default 1.5 Joomla Template and the behavior did not change.  Then to beat a dead horse i took a site that already had VM 1.1.3 and this hack working and copied the administrator/ and components/ for VM over to this site and it STILL didn't change the behavior.  I also systematically unpublished every module so that it was a default joomla template AND only VM and the Cart to eliminate any module conflicts. I am now thoroughly stumped and cant figure out why that variable is staying empty.  I am using ssl but only on checkout so I dont think that would matter but i mention it for completness.

Can anyone lend a hand?

Solved: In the crappiest way possible...a complete reinstall of everything including VM 1.1.4 and the 1.1.2 v1.5 extended attribute hack.  So for all the people who keep asking if it works with 1.1.4 ever read this deep in the thread -- IT WORKS FOR 1.1.4 FOR ME.

David Richmond

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Francois on January 14, 2010, 08:07:10 am
Feedback on VM 1.1.4

I did a fresh install of VM 1.1.4 and the vm112_custom_attribute_extended_2.15 hack.
Everything seems to work fine with ajax turned off. The major problem I am encountering is that the donation amount gets added to the cart, but reverts back to $00.00 when I refresh or go to Checkout.

I don't know where to start on this one.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: loganmail on January 14, 2010, 18:23:18 pm
Thanks very much for this hack, I have success implemented on VM1.1.4 and Joomla 1.1.15. The only problem was showing prices > 999 but I could fix easy with this thread.

Thanks again
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on January 15, 2010, 18:31:20 pm
Hi,

When user choose an attribute that adds 10$ for example to the displayed price, this one is not refreshed with the new price (old price +10). Do you know a way so that the displayed price be refreshed to include the price of the chosen option?

At least any one know where in the code should I look to refresh the price?

Thanks in advance
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: fludewig on January 16, 2010, 20:50:05 pm
Hello. Mine is bad in English.
I have a shop in Germany with prices including value added tax and would like to use the “Hack”. Problem: The attribute prices are net prices and later the value added tax is still calculated in addition. I would like to prevent this.
Since in the article details in the Frontend the attribute prices are indicated Net. Because the shop is, however, including value added tax, all prices must be indicated Gross. Also the attributes! But there are in Germany juridical problems. How can I change this? I would want this the given attribute prices Gross prices are. Thank you greeting Frank

Germany-Text.
Hallo.
Mein englisch ist schlecht.
Ich habe einen Shop in Deutschland mit Preisen inklusive Mehrwertsteuer (tax rate) und  möchte den Hack benutzen.
Problem: Die Attribute-Preise sind Nettopreise und später wird noch die Mehrwertsteuer dazu gerechnet. Das möchte ich verhindern.
Denn in den Artikel-Details im Frontend  werden die Attribute-Preise Netto angezeigt. Da der Shop aber inklusive Mehrwertsteuer ist, müssen alle Preise  Brutto angezeigt werden. Auch die Attribute!  Sonst gibt es in Deutschland rechtliche Probleme.
Wie kann ich das ändern?
Ich möchte das die eingegebenen Attribute-Preise Brutto Preise sind.
Danke Gruß Frank
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 27, 2010, 10:20:00 am
Some of you are requested for a modification to let add surface type attributes. I'm working on an extension of the hack to let you have "surface" type of attributes (that's it, width*lenght, charged based on surface).
It's a work in progress, you can see it in action here:
http://www.spandoeksite.nl/spandoeken/bysonil?page=shop.product_details&flypage=flypage.tpl&product_id=92&category_id=15 (http://www.spandoeksite.nl/spandoeken/bysonil?page=shop.product_details&flypage=flypage.tpl&product_id=92&category_id=15)
As I will have a stable version, will post it here. The hack is minimalist, only one file from the original hack is modifyed, and 2 language variables are added.
The last part may not be needed for the final release, in fact the needed strings existing in 'product' lang file, but for whatewer reason I failed to use them.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: klutzon on January 27, 2010, 23:37:27 pm
Some of you are requested for a modification to let add surface type attributes. I'm working on an extension of the hack to let you have "surface" type of attributes (that's it, width*lenght, charged based on surface).
It's a work in progress, you can see it in action here:
http://www.spandoeksite.nl/spandoeken/bysonil?page=shop.product_details&flypage=flypage.tpl&product_id=92&category_id=15 (http://www.spandoeksite.nl/spandoeken/bysonil?page=shop.product_details&flypage=flypage.tpl&product_id=92&category_id=15)
As I will have a stable version, will post it here. The hack is minimalist, only one file from the original hack is modifyed, and 2 language variables are added.
The last part may not be needed for the final release, in fact the needed strings existing in 'product' lang file, but for whatewer reason I failed to use them.

I can see how your solution works, and it's rather elegant I must admit. I've wanted this feature for a while and I could never figure out how to do this, but you've managed to come up with something quite effective. :) I wonder, though, if it would be possible to translate this code for the back-end as well, so that when you manually add an item to an order in the back-end you can have the calculation work there as well. That would be the icing on the cake! :D

Regardless though, I'm really looking forward to working with your hack extension once you've got it stable, there are many more like me who can't wait to use it... :P
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 28, 2010, 07:46:46 am
1. Backend ... Humm, let's see, it's an interesting challenge ;)
2. Stable - yeah, need some work to get it there, I have a commercial assignment to do it, and part of the deal is to make the original hack to be also entirely up to date - currently some files are downgraded to their 1.1.12 version, there is that language file part, etc.
These missing pieces of the puzzle aren't affecting the hack's stability or functionality, but I'd like to make it as should be, up to date and easy to use, before to release it for free use in community. So, a bit patience, please!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: inthysite on January 30, 2010, 00:37:22 am
Hello All,

I have a client running Joomla 1.5.8 with VM 1.1.2 & Custom Attributes Extended Hack 2.1

They use the following for the custom attribute:

Instructions(textarea)(|)( |);

If one types into the field and hits the enter key to have a Carriage Return
The text passed to the cart page contains "rnrn" When the order email is received with the custom text, it also contains "rnrn"

SAMPLE
Hi

Have a great day

Regards,
Me.

The customer gets the following in the response:

“HirnrnHave a great dayrnrnRegards,rnrnMe.”

Would anybody have a solution to this problem handy?




Does anyone know if this was ever addressed?  I'm having the same problem and my client is complaining about it.

I've looked through this tread but haven't found any answers and I can't find where in the code this is happening.

Also, if anyone knows, on radio and checkboxes if I use a dollar sign in the attribute the totals in the cart come up as $0
(ie. Donation Dollar Amount(radio)(|)($18.00 [+18.00]|,$36.00 [+36.00]|,$50.00 [+50.00]|);
Title: Add to cart button has disappeared
Post by: jakeslife on February 07, 2010, 07:29:22 am
Something went wrong between the Joomla 1.5 and VM 1.1.2 user sync so I recently removed VM, made sure all tables for it were dropped, upgraded to the newest version, reinstalled this hack (which is awesome, saved my butt more than once on projects), but now the add to cart button is missing. I don't think it's hidden because I can't find it in View Source on the page or by clicking a field and hitting enter. It's just not there.

I've gone over and over the forums, Google, and the files on the server to try to figure out what's wrong, but can't seem to find it.

Any suggestions?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: 021prod on February 10, 2010, 07:29:54 am
I trying to install this at my JM1.5.15 and VM1.14 site.
But it will not work.

Can someone kind person help me install it?

On saturday I must have my site up running.

Please help me!!!

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 10, 2010, 09:31:25 am
I can help. Contact me.
BTW, I received a number of messages regarding to the added "surface" type Custom Attribute (aka the possibility to calculate product type by use of lenght/width pair of attributes).
It has some rough edges, but works!Just had no time to finish it, I'm working on extending it's capabilities (a commercial job).
As I'll finish it, will upload to the VM forums. Until then the hack is up on my homepage in Downloads/Joomla 1.5/Component Hacks section:http://www.webgobe.ro/component/option,com_phocadownload/Itemid,24/id,3/view,category/ (http://www.webgobe.ro/component/option,com_phocadownload/Itemid,24/id,3/view,category/).
Has one file changed compared to the original hack, and needs a small modification in one of language files. All needed info is in the package.
Denes
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: emeelio on February 10, 2010, 21:05:39 pm
BTW, I received a number of messages regarding to the added "surface" type Custom Attribute (aka the possibility to calculate product type by use of lenght/width pair of attributes).
It has some rough edges, but works!Just had no time to finish it, I'm working on extending it's capabilities (a commercial job).
As I'll finish it, will upload to the VM forums. Until then the hack is up on my homepage in Downloads/Joomla 1.5/Component Hacks section:http://www.webgobe.ro/component/option,com_phocadownload/Itemid,24/id,3/view,category/ (http://www.webgobe.ro/component/option,com_phocadownload/Itemid,24/id,3/view,category/).
Has one file changed compared to the original hack, and needs a small modification in one of language files. All needed info is in the package.

Thank you for your effort Webgobe. Amazingly, you posted today what I needed today! Thank you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Misty-t on February 11, 2010, 12:46:30 pm
Hi all, I have applied this hack on VM 1.1.14 and all working great, just wondering is there a way to NOT show the price on the flypage and throughout checkout process

(+3.00)

I don't want this to show at all.  My problem actually is that when i apply (=3.00) in the syntax, the = sign shows as + sign on the flypage and throughout.   So I am looking to either NOT show the price at all OR be able to fix the = to + sign error.

Many thanks



Ok, so I found the answer to my sign problem.  Again the = sign was showing as + on flypage and throughout checkout.  So within:

administrator/components/com_virtuemart/classes

File: ps_product_custom_type.php

Line: 50 reads
if ($operand=='=') $operand='+';

I changed to
if ($operand=='=') $operand='=';

And Problem Solved.  No need to undisplay prices within brackets as sign now fixed.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: klutzon on February 18, 2010, 15:41:50 pm
I just sent this email to Joseph Kwan to see what feedback I'll get, but I'll post it here in case anyone wants to take a stab at it in the meantime...



Updating CAE Hack for VM 1.1.4

I've got a site set up with Joomla 1.5.15 and VM 1.1.4 (latest nightly, from 03.02.10), and I've reached the point where I want to install the CAE hack, but the files in the current package available are using VM 1.1.2 files. The problem arises when I want to install Bixie's VM-Chronoform plugin (http://www.bixie.org/en/downloads/cat_view/20-virtuemart-chronoform-module.html), which allows you to insert a Chronoform in place of custom attributes to take down product attribute details and commit them to the cart.

The VM1.1.4 version of the plugin includes a few template modifications as well as a separate ps_product.php, stored in the user_class folder in the themes\default folder. This is called by the plugin when a Chronoform is used. However, VM1.1.2 does not support custom user classes, and if I attempt to include the relevant code in the main ps_product.php file, the front-end breaks.

There is also the matter of code fixes / updates / refinements present in the latest code which the current CAE does not take into account, primarily the change in how classes are called - ps_config to vm_ps_config (for example). I plan on installing a few more hacks to the core code, most of which are at least 1.1.3 compatible if not completely supporting 1.1.4, and some will require adding to core files that currently are forced to use old VM1.1.2 code on account of this current CAE hack.

Therefore, since I don't have the necessary skills, kindly take a look at the attachments I've sent with this email and let me know how easy it will be to update the CAE to use VM1.1.4 files / calls instead. (I personally think it's high time it was done anyway... :))





I've attached the CAE I packed with the original modified 1.1.2 files and the necessary 1.1.4 files to modify. I honestly don't think that any heavy-duty coding is required, just some modifications to allow the CAE code to run using VM's new class system should do the trick. Anyone willing to take a look and make the necessary modifications? You'll be helping me out big time (and the rest of us, naturally! :D)



[edit]: Since this post, I figured out what my problem with the Chronoform plugin was, misread the manual and thought I required CAE to work it but I only needed a slight modification to the ps_cart.php. Slight mixup there, I know. :) Anyway, to let you know, the Chronoform plugin does not require CAE, nor can it work with it (so says Mr Kwan). But the need to convert to VM1.1.4 still stands (even though I understand that there is a VM1.1.5 coming out soon...)

[attachment cleanup by admin]
Title: price in a fill-in form box?
Post by: ccvid on February 19, 2010, 18:01:09 pm
There's so much to read here, sorry if I missed this one. 

I'm working with a ministry that would like customers to be able to pay more for a product, if they want to.  Is it possible to allow the customer to choose how much they want to give, instead of listing suggested donations with radio buttons?

In other words, right now I have
Sermon Download:
                 Free (+0.00)
                 Suggested Donation (+5.00)

Can we have it be
Sermon Download:
                 Free (+0.00)
                 Suggested Donation (+5.00)
                 Other Amount |$_____|

Is this possible?
Thanks for the awesome hack!
Ben
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 19, 2010, 18:18:02 pm
Short answer - yes. Long one - if you don't find your way around - there is a lot of info in the thread, including a great document about howto things ;), send me a PM!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ccvid on February 19, 2010, 21:51:09 pm
Based of the original syntax, this is the best solution I could find. 

Code: [Select]
Donate(number)(To add a donation, enter the dollar amount in the text box above.  i.e. $5.00|title-below)(5.00|1.00)
Is that the cleanest way to do it?  I like the text below option better than the text-hover option.  The only thing I don't like is that some of the text is covered up by the text box.  Is there anything that can be done about that?

Here's a link. (http://faithworksnow.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=23&category_id=6&option=com_virtuemart&Itemid=29)

Thanks for the help.  I'm impressed by the quick response!

Ben
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 22, 2010, 09:37:48 am
You need to play with your CSS file,  add something like
Code: [Select]
.vmCartAttributes .tip{
line-height 15px;}
to increase the line height of the tip. Or anything similar you like.
Denes
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ccvid on February 22, 2010, 21:35:00 pm
Wouldn't it be this?

Code: [Select]
.vmCartAttributes .below{
line-height 15px;}

I tried both things, and many variations of them, over three to four hours today.  The below text is still hiding behind the text box.  I'm calling it a day for now. 

Thanks!

Ben
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 23, 2010, 08:07:18 am
No, the source code you must format using CSS is this:
Code: [Select]
<div class="vmCartAttributes">
   <div style="width: 30%; float: left; text-align: right; margin: 3px;"><label for="Donate_field">Donate</label>:<br>
<span style="" class="tip">To add a donation, enter the dollar amount in the text box above.  i.e. $5.00</span></div>
<div style="width: 60%; float: left; margin: 3px;">
<input class="inputbox" id="Donate_field" size="5" name="Donate" value="5.00" type="text"></div>
So to archieve the result you need to play with some (or all) of the existing containers:
.vmCartAttributes label
.vmCartAttributes span .tip
.vmCartAttributes  .inputbox
Denes

PS. you don't have any container class "below" there ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: NumbDreamer on February 24, 2010, 18:55:51 pm
Hello All,

Someone pointed me to this hack for VirtueMart, but I'm not really sure if this hack is what I need, so I hope one of you can help me out

I'm building a webshop where people can buy cycle clothing. I've got shirts and shorts on my website, and of course the shirts are in various colours. I want to know if it possible to show an image of the colour, like a small square in a blue colour if it is a blue shirt. Would it also be possible to have dropdown menu with several colours where each colour has its own square next to it.

I know it is possible to do this with different sizes, but I'd like to be able to do this with the colours too, where the buyer can actually see which colour it is.

Thanks in advance for your answer.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 24, 2010, 19:22:43 pm
You can do it, but not with dropdowns, but radio buttons with images.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: adan on February 26, 2010, 16:02:34 pm
Hi webgobe,

Do you have any idea how to acheive the following, several persons are looking for a solution:

When user choose an attribute that adds 10$ for example to the displayed price, this one is not refreshed with the new price (old price +10). Do you know a way so that the displayed price be refreshed to include the price of the chosen option?

At least any one know where in the code should I look to refresh the price or to put a button refresh?

Thanks in advance
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 26, 2010, 17:07:30 pm
As is for now the hack can't do that. I guess one want this functionality need to write a dedicated function (AJAX, I suppose) for that. I see no easy way to achieve this.
But IMHO the majority of VM site owners can live without this... If you use a cart module in your site, the contents of the cart will reflect instantly the correct value as you click on the Add-to-cart.
But, of course, I can be wrong... and someone hopefully will write this. I will be pleased if I will have time to finish the couple of mods my clients asked for (and will share with you as are presentable).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: klutzon on February 27, 2010, 10:41:25 am
Hi webgobe,

Do you have any idea how to acheive the following, several persons are looking for a solution:

When user choose an attribute that adds 10$ for example to the displayed price, this one is not refreshed with the new price (old price +10). Do you know a way so that the displayed price be refreshed to include the price of the chosen option?

At least any one know where in the code should I look to refresh the price or to put a button refresh?

Thanks in advance


The hack you're after is available, it's called "Auto Update Price" and it's available from VirtueMart Extensions for $29.99.

"* Auto Update Price enables on the fly updating of attribute prices.

    * Auto Update Price does not update price on quantity change.
    * Auto Update Price does not work when product is discounted.
    * Auto Update Price does not work with price table."

More info and purchase here: http://www.virtuemart-extensions.com/index.php?page=shop.product_details&flypage=flypage_autoprice.tpl&product_id=10&category_id=7&option=com_virtuemart&Itemid=3
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cinr11 on February 28, 2010, 17:55:51 pm
HI,

I'm new to this hack and virtuemart and everything and need help using this hack. Basically I'm looking to accomplish the attributes found on this site (http://www.perfectmatchfavors.com/shop/all-products/key-to-my-heart-bottle-opener-in-adorable-pink-or-blue-pram-box.html).

I'm looking to create the "Includes Personalization" function and the "Personalized Tags" at the bottom. I don't how to use this hack to achieve this. Can someone please help? I read through the document that came with the hack but I'm lost and need some direction.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 03, 2010, 11:44:34 am
Hello all,
I have a strange problem.
I am using Joomla 1.1.15, the Rockettheme Mynxx with VM 1.1.4.
Now i added the CAE hack 2.15.
I can add fields. for example Name(text-r)and they show up with the article.
But as soon as i add a second attribute for example Name(text-r);Surname(text-r) i can not add the article to the cart and my apache is down.(error 255 in apache log)

It doesnt matter if i add a required field or optional field..
as soon as i add a second attribute it fails.

Does anyone have an idea?
Thanks in advance...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 03, 2010, 12:56:58 pm
Did you separated the attributes with a semicolon?
The syntax is
Attribute 1 full param list;
Attribute 2 full param list
In my experience this is the most common mistake first time CAE hack users are doing.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 03, 2010, 13:04:32 pm
Thanx for your reply..

the box looks exactly like this:
Name(text-r);Surname(text-r)

and not

Name(text-r);
Surname(text-r)

does it make a difference?

Ok, i gave it a try but..
after i changed it, it worked once but as i tried it the next time, i have the same problem again.
Doesnt anyone have a running VM 1.1.4 with the hack included and ready for setup? :D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 03, 2010, 13:35:05 pm
No, I may be not clear enough, here's an example:
Code: [Select]
Banner (surface)(tip here|title-hover)(0|0|100|14|200|13|300|14);
Donation(price)(please enter donation|title-below)(1.00|+)
I'm talking about the semicolon after the end of the first row.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 03, 2010, 13:38:07 pm
yes i have a semicolon
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 03, 2010, 16:18:55 pm
Just for fun i did try the lines you mentioned as example:

Code: [Select]
Banner (surface)(tip here|title-hover)(0|0|100|14|200|13|300|14);
Donation(price)(please enter donation|title-below)(1.00|+)

what i get now is an error

Fatal error: Class 'ps_product_custom_type_surface' not found in ***************\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php  on line 91
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 03, 2010, 17:56:34 pm
The example was for my version - available at webgobe.ro.
The surface type of attribute isn't available in the base hack, so no wonder, if you got that...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 03, 2010, 18:20:06 pm
aaah ok

but do you have any other idea?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 03, 2010, 18:34:15 pm
Not without taking a look to exactly what you have there. Is hard to guess blindly ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 05, 2010, 08:41:56 am
thanks for your help...
ok , what do you need?
I added you to my skype list. please let me know what you need.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 05, 2010, 08:47:36 am
Let's talk that directly ;)I'm here today after 11 GMT, but usually on bussiness days between 6:00-20:00 GMT.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bdsigned on March 05, 2010, 09:26:59 am
great, thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on March 05, 2010, 17:02:31 pm
Hi,

First of all - great work on the hack. I can see that it's what I've been looking for. I've read through the thread (and the previous thread from the older hack) and can see that with all the help that has been posted most of my future question will probably have been answered! - so that's great :)

The only problem is that I can't use it yet because I'm struggling to find VM 1.1.2. (I hope this isn't too much of a newbie issue!) I'm using VM 1.1.4 but I need to downgrade in order to use the hack - all I've found is patches between versions but no stand-alone VM 1.1.2. Perhaps some one could point me in the right direction?

Thanks a million.
Staecows
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 05, 2010, 17:10:51 pm
I have the pack, but the server don't allow me to upload it. Send me a mail.
BTW, the hack is made on 1.1.3 version, and if you don't use other hacks needing the 1.1.4, you can use it safely on a 1.1.4 site.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 08, 2010, 15:21:13 pm
Hi mr Webgobe,

I wonder if it is possible to let the customer let design his one text, so he can choose the width an height, the font family, the amount of letters he uses and the color.
The price must automatically change according to the input.
 
This text will be printed on foil (max 200x116 cm) so it can used on walls.
Do you know a solution?
Greetings
Ruud Schuring
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 08, 2010, 17:08:32 pm
Using this hack you have all the ingredients to do it. There is a color picker, a charge-per-character number, charge-per-surface custom attribute, with the image selector you can display font examples and charge based on user selection, so with a little imagination (and maybe a little custom programming) you can put together something workable.
The one thing missing is the visual feedback for the client, but using sIFR technique, some (more) programming one can do that too.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 09, 2010, 10:06:16 am
Mister Webgobe,

I installed the customattributesextendedsurface.zip from your website, is this the right hack?
I cannot see the color picker, how do I do that?
Thanks

Greetings
Ruud



Greetings
Ruud
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 09, 2010, 13:15:01 pm
http://forum.virtuemart.net/index.php?topic=28192.msg79805#msg79805
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 09, 2010, 14:17:32 pm
Dear mr Webgobe thanks a lot, it is working now.
I have a final question...
I want that the customer add the width an height of there product in a text box, Now I want automatically calculate the surface and the price.
(I set the price per square cm)

Can you help me with that?

Greetings
Ruud
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 09, 2010, 15:35:43 pm
In the ACE-surface.txt in the downloaded pack is described how it works ;)
you should use something that:
Code: [Select]
Dimensions (surface)(Some nice tip to be shown|title-hover)(default width|default length|limit1|price1|limit2|price2|limit3|price3) You will find in the text file detailed description of each parameter. YOU MUST USE ALL OF THEM!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 09, 2010, 17:06:06 pm
Dear mr Webgobe,

I used this example: Folie(surface)(Max B=116 L=200|title-hover)(100|100|1|18|10|16|25|14);
But the price is empty in the basket.
What Am I doing wrong?

Greetings
Ruud
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 09, 2010, 17:38:13 pm
Maybe this is the problem:
Max B=116 L=200
Try to use here a plain sstring, withouth =
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 09, 2010, 17:52:40 pm
I used now Folie(surface)(Some nice tip to be shown|title-hover)(100|100|1|18|10|16|25|14);

Just as in the ACE surface.txt , But there is still a empty price in the basket.


Greetings
Ruud
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 09, 2010, 20:00:32 pm
weird... send me a link
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ruud2000 on March 09, 2010, 23:24:39 pm
I sent you the link via a PM

Greetings
Ruud
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: madmaxyou on March 11, 2010, 19:28:26 pm
Mr. Webgobe

I loved your surface hack. I got it to work fine. I'm building a webshop as a complete novice for window decoration (panelcurtains etc.). I want to use the hack to let a customer insert their measurements, width and height. I think your hack is based on a total surface calculation. I need a calculation in which the price will go up as the width will increase by example steps of 4 and the height by steps of 8. for example a custom measurement of width 112 by height 123 cm will fall in the categories width 110-120 and height 120-130. If the height increases to 133cm it will be in the category 130-140 and 4 dollars will be added to the total price. Offcourse I can do this with a text field and normal attributes, but it would look much nicer if the price is calculated automatically from a text field. Is this possible with this hack? If not how can I adjust it? I'm looking into it myself to, but I sure could use some input.

Best regards,

Max
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 11, 2010, 20:08:56 pm
Humm, that need a partial rewrote of the hack... and an in-depth one. Won't go now in details... but isn't a 2 click adjustment!
Let me think about!
Denes
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: madmaxyou on March 11, 2010, 20:54:56 pm
Thank you for the quick reply. I think it would be a very nice extra for webshops who deliver custom made products on which the price is depending on the size. I will search the internet for an alternative solution in the meantime.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ccvid on March 18, 2010, 00:05:51 am
Remember me?  I'm that guy from page 31, whose text was hiding behind the inputbox.  I never got this figured out.  But I think I have a solution.  The custom attribute is inheriting the line height from my website's body.  If I could create a <BR> before the other code in the custom attribute list, I would have the result I want, I think.  Like this...

Code: [Select]
;
Donate(number)(To add a donation, enter the dollar amount in the text box above.  i.e. $2.50|title-below)(2.50|1.00)

Code: [Select]
<br>
Donate(number)(To add a donation, enter the dollar amount in the text box above.  i.e. $2.50|title-below)(2.50|1.00)

The only problem, neither of these codes work.  When I insert "<br>" or ";" I get an error.  Is there a way to code a line break?

Thanks for the help, and the patience with me!
Ben

No, the source code you must format using CSS is this:
Code: [Select]
<div class="vmCartAttributes">
  <div style="width: 30%; float: left; text-align: right; margin: 3px;"><label for="Donate_field">Donate</label>:<br>
<span style="" class="tip">To add a donation, enter the dollar amount in the text box above.  i.e. $5.00</span></div>
<div style="width: 60%; float: left; margin: 3px;">
<input class="inputbox" id="Donate_field" size="5" name="Donate" value="5.00" type="text"></div>
So to archieve the result you need to play with some (or all) of the existing containers:
.vmCartAttributes label
.vmCartAttributes span .tip
.vmCartAttributes  .inputbox
Denes

PS. you don't have any container class "below" there ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 18, 2010, 08:57:19 am
OK, then here we go:
1. Make a backup. (I keep my fingers crossed ;) )
2. grab your favourite code editor (plain notebook is great)
3. open /administrator/components/com_virtuemart/classes/ps_product_custom_type.php
4. locate this:
Code: [Select]
if(!$field['attr_post_value']){
$html .= $VM_LANG->_('PHPSHOP_WIDTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field1\" size=\"5\" name=\"".$field['attr_pagevar']."1\" value=\"".$default_width."\" onblur=\"totalprice();\" /> cm</span><br />";
$html .= $VM_LANG->_('PHPSHOP_LENGTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field2\" size=\"5\" name=\"".$field['attr_pagevar']."2\" value=\"".$default_lenght."\"  onblur=\"totalprice();\" /> cm</span>";
$html .= "<input  name=\"".$field['attr_pagevar']."\" type=\"hidden\"  readonly=true />";
} else {
$html .= $VM_LANG->_('PHPSHOP_LENGTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field1\" size=\"5\" name=\"".$field['attr_pagevar']."1\" value=\"".$field['attr_post_value']."\" /> cm</span><br />";
$html .= $VM_LANG->_('PHPSHOP_WIDTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field2\" size=\"5\" name=\"".$field['attr_pagevar']."2\" value=\"".$field['attr_post_value']."\" /> cm</span>";
$html .= "<input  name=\"".$field['attr_pagevar']."\" type=\"hidden\"  readonly=true />";
}
It's between lines 1124-1132 in the latest version of the hack - available, as usual from webgobe.ro (http://webgobe.ro)
5. make your changes. You probably will need to replace the 2 instances of
Code: [Select]
$VM_LANG->_('PHPSHOP_WIDTH',false). with something like
Code: [Select]
"<br />".$VM_LANG->_('PHPSHOP_WIDTH',false).Good luck!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 18, 2010, 17:42:40 pm
Due to popular demand I made a version wich has the sizes and prices all set to centimeters/square centimeters. Basically, for the same units, so if you sell parcels on Moon, you can set it to nautical miles too  ;D
you can download it from there:
http://www.webgobe.ro/index.php?option=com_phocadownload&view=category&id=3&Itemid=24 (http://www.webgobe.ro/index.php?option=com_phocadownload&view=category&id=3&Itemid=24)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ccvid on March 18, 2010, 20:01:34 pm
Thanks for crossing your fingers.  The good news is I didn't screw anything up!  I also got an up to date version out of the deal.  (I had downloaded an older version that was mentioned earlier in this thread.)  But I still didn't get that text down a few notches further.  I'll keep working with it.  Now that I have a newer version, I may get it.

Thanks for the help!
Ben
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 18, 2010, 20:27:07 pm
Send me an URL when is ready to show - or don't hesitate to ask me.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ccvid on March 18, 2010, 21:44:27 pm
Got It!!!!

I edited administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line #112 under the "// Show Tip Below Title".
Here's the Before
Code: [Select]
$html .= "<br /><span class=\"tip\">". $field['attr_tip'] ."</span>";
Here's the After
Code: [Select]
$html .= "<br /><br /><span class=\"tip\">". $field['attr_tip'] ."</span>";
Here's a link to see one of the products: Link (http://www.faithworksnow.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=33&category_id=6&option=com_virtuemart&Itemid=29).  Scroll down and you'll see the description underneath "Donate" field. 
Thanks for the help!!!

Ben
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 19, 2010, 04:04:45 am
Hi - I would like to implement this hack from the ground up but a lot of time has passed since the OP's last update. Which is the latest version i should download and install?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 19, 2010, 13:24:19 pm
The ones in the site above are the freshest. Check with two-three comments up for the URL.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 19, 2010, 13:53:48 pm
Thanks, I signed up and DL'd the file. Just to be clear, customattributesextendedsurface.zip from webgobe.ro is the only file I'll need?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 19, 2010, 15:41:21 pm
Yes, right. You have everything in it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on March 19, 2010, 20:01:48 pm
Got It!!!!

I edited administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line #112 under the "// Show Tip Below Title".
Here's the Before
Code: [Select]
$html .= "<br /><span class=\"tip\">". $field['attr_tip'] ."</span>";
Here's the After
Code: [Select]
$html .= "<br /><br /><span class=\"tip\">". $field['attr_tip'] ."</span>";
Here's a link to see one of the products: Link (http://www.faithworksnow.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=33&category_id=6&option=com_virtuemart&Itemid=29).

Really useful piece of info! Thanks!  ;D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 23, 2010, 13:44:08 pm
What an awesome hack, thanks so much for your contributions webgobe. I can't get files to upload but I think thats because I can't turn off AJAX in my Mynxx theme. I'm going to check with those guys to find an AJAX workaround.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: zrylux on March 25, 2010, 00:39:47 am
Help! Could somebody tell me why is appearing this astronomical price when I buy something? I just used the sample that appears on the PDF...



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 12:08:25 pm
There are two "flavors" of the hack with differences in handling the (surface) custom attribute, the original one which accepts sizes in centimeters and prices/limits for square meters (and makes the appropriate changes, transformations in the background), and the never one which uses the sizes and prices in same units - so for example width/length in centimeters and prices/limits set for square centimeters. From what you have attached here I guess you have the second one installed, and the calculation is done correctly for that case, 101*155 cm is 15655 square cm, which falls in uppermost price category with 14 bucks for square centimeters resulting in a total price of 219.170 greens. So the hack is working as expected ;)
So, or you need to use the other version which uses the prices/limits set to be in square meters, or you need to adjust your settings accordingly, for example by adding four zeros at the end of the limits and divide your prices by 10.000. Whatever you prefer.
Both versions are up on the server for your convenience, the difference between them is only a half line of PHP code.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 15:10:41 pm
I am getting no response from the guys at RocketTheme about how to fix this issue with the file upload on my Mynxx template. I *suspect* it is the AJAX add to cart issue where it is turned off but there is still the cart popup. Mr. webgobe ... is there any way you might be able to help? Perhaps there is a different reason the file upload is not working? I can give you temporary admin access if need be.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 17:04:41 pm
Try to disable flash upload from Joomla's main configuration. That's knowingly misbehaves on some settings.
If that not fix it, let me know.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 17:26:55 pm
Here are the way my media settings were (and are at this moment).

Thoughts?

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 17:57:44 pm
hmm, these are okay. What error you det when you try to upload? May be a write rights error....
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 18:16:13 pm
I actually don't get an error. The cart flyout comes up that tells me products were added to the cart. I proceed to the cart and the product is there ... with engraving text (using this same hack) but the file upload field is blank. I'm never prompted and nothing ever stalls for an upload. It simply ignores the input field. however, in the cart there is a container for the file ... it actually sais "File Upload" but nothing is there.

I think the problem might be with that add to cart flyout. Even though I have AJAX turned off for this template, it still shows the user a "products added to shopping cart" flyout towards the top instead of going right to the cart.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 18:25:18 pm
Can you show me the exact code for the custom attribute, to doublecheck it - just in case...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 18:35:11 pm
Engraving Line 1 (text)(Optional|field-below)(|0.00|char); Engraving Line 2 (text)(Optional|field-below)(|0.00|char); File Upload(file)(Optional - EPS Files only|field-below)(images/|.eps,.jpg|0.00)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 19:36:23 pm
Humm, and the images/ folder is writeable?
I don't see any other problem with the hack itself. I just can suggest to try to switch temporarly to some other template and see, if then works. To be sure, that Mynxx is the culprit.
I'm a RocketTheme fan (I have developer account at them, and use frequently their templates), but Mynxx is the top buggiest template they released.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 20:18:29 pm
WOW. Surprise, surprise ... I switched to the default VM theme and the file upload didn't work. I then went into config, turned off AJAX and it still didn't work. Again, the product travels to the cart with the engraving text but the "File Upload" field is empty. So I guess its something else, not Mynxx.

EDIT: and yes, the /images folder is writable. i actually logged in via cPanel's file manager just to make double-sure.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 20:24:07 pm
Let me do some testings. This part of the hack isn't my work, but I used it in many sites with success. Must be a minor stuff, a typo somewhere or an incompletely hacked file ;) BTW, what VM version you have?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 20:25:39 pm
1.5.15 Joomla
1.1.3 VM

Do you want admin access?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2010, 20:27:40 pm
Later, maybe. I'm gone off to take my shower and to grab my pillow, it's getting late there! Will get back to you tomorrow after I do some testing on my own!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 25, 2010, 20:37:29 pm
Thank you sir!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 26, 2010, 08:27:07 am
I can confirm, that there is a problem with the file upload... will investigate and get back to you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 26, 2010, 22:48:11 pm
Thanks! Just to let you know, i was having problems with the setup on my host so I switched hosting providers. I checked just to make sure but the file upload still didn't work. I'm sure you know this by now but just figured I'd let you know anyway.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Alessandro on March 28, 2010, 09:36:50 am
Hello,
sorry for my english.
I want insert 1 image for 3 options.
And i want add Title name e description.
See the attach image.
What are the correct syntax.
Tnk u.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alpertheidiot on March 28, 2010, 23:11:02 pm
is it possible to remove the link to homepage from "Optionals" in this syntax?

eg: Optionals(checkbox)(Select|title-hover)(test1 [+0.50],test2 [+0.50],test3 [+1.00]|,test4 [+1.00]*|,test5 [+1.00]|)

thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: quickturn on March 30, 2010, 00:47:00 am
I can confirm, that there is a problem with the file upload... will investigate and get back to you.

Hi there, any luck yet?

You think I should overwrite it with an older version and see if that works?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 30, 2010, 16:30:42 pm

Hi there, any luck yet?

You think I should overwrite it with an older version and see if that works?
Yes, please, download the one posted there. I did not had time yet to work with. Other duties... you know!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 30, 2010, 16:35:18 pm
is it possible to remove the link to homepage from "Optionals" in this syntax?

eg: Optionals(checkbox)(Select|title-hover)(test1 [+0.50],test2 [+0.50],test3 [+1.00]|,test4 [+1.00]*|,test5 [+1.00]|)

thanks
Try this:
Code: [Select]
Optionals(checkbox)(|)(test1 [+0.50],test2 [+0.50],test3 [+1.00]|,test4 [+1.00]*|,test5 [+1.00]|)Should fix your problem
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 30, 2010, 16:36:54 pm
Hello,
sorry for my english.
I want insert 1 image for 3 options.
And i want add Title name e description.
See the attach image.
What are the correct syntax.
Tnk u.
With the current hack you can't do that. The code must be tweaked to let you do something similar..
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alpertheidiot on April 04, 2010, 03:41:47 am
thanks for your help webgobe..
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Waynarky on April 12, 2010, 11:44:43 am
@Ruppert

Thanks for the thousand error fix! You're a legend!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on April 14, 2010, 14:09:33 pm

I've recently been having problems with the layout of the Add To Cart box when displaying multiple consecutive custom attributes. It somewhat displayed ok under FF3, but was completely messed up in Chrome/Safari and slightly only better in IE7. So after lots of head-banging, here is what I cobbled together to get it working. It's not perfect but it's a damn site better than before.

Note that I also increased the width of the Add To Cart box. Otherwise, each browser would deal with the smaller box in random ways.

Here are the modifications to carry out (for VM 1.1.2):
....
....


Rupert, I realise yours is quite an old post at this stage but I just wanted to say thanks for posting this fix for the add to cart box size. I am quite inexperienced and was having difficulty finding all the places I needed to make edits. I'm now going to follow your instructions and hopefully I'll learn a thing or two along the way.

Thanks!
-Staecows
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on April 14, 2010, 18:25:09 pm
Hi everyone,

Does anyone know if the following is possible - can you have multiple, optional file uploads with each upload increasing the price of a product:

Code: [Select]
Image 1(file-r)(upload image file of type .jpg|title-hover)(images/|.jpg);
Image 2(file-r)(upload image file of type .jpg|title-hover)(images/|.jpg);
Additional image(file)(upload image file of type .jpg, $25.00 charge per additional image|title-hover)(images/|.jpg|25.00);
Additional image(file)(upload image file of type .jpg, $25.00 charge per additional image|title-hover)(images/|.jpg|25.00);

The goal above was to have two images required [image 1, image 2] (therefore charge basic price of $50) and to have two optional upload slots [Additional image] (each increasing the price by $25). [So if the user uploaded 3 images the price would increase to $75 and 4 images = $100 but two images are required at a minimum for $50 total.]

The problem I found is that, while the two required images upload fine every time, only the last of the optional (price-increasing) uploads registers with the cart. I.e. if four images were uploaded, as per above, the 3rd image slot in the cart would display "no image uploaded" and only the fourth image (successfully uploaded) would increase the price. (If I had 3 optional upload slots then, again, only the last would register and the first two would not).

I have searched the thread but am still not sure how to correct this (that is, if it can be done).

Any suggestions would be greatly appreciated (even if you can just point me in the right direction ;)).

Thanks,
Staecows
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 15, 2010, 13:03:53 pm
Hmm, you may discovered a bug there ;) probably the code need to be revised to find what's going on in fact.
I noted on my to-do list, will take a look to it, but I'm not the author of the file upload part - maybe he's tuned too to this thread and have a quick fix for it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on April 15, 2010, 13:28:12 pm
Thanks for your thoughts Webgobe
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alpertheidiot on April 18, 2010, 04:30:51 am
I wonder would that be possible to give multiple price to attributes using this hack (dynamic pricing depending on previous options)?

for example, think of a pizza shop: on the product page pizza will have different sizes: S, M and L. and on the same page, there will be checkboxes for toppings. now the big question is, how to change topping prices according to pizza size (eg they will be 0.50 for S, 0.70 for M and 1.00 for L pizza).

please advise if this can be done with this hack. or any other help to overcome this problem is much appreciated.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 19, 2010, 09:01:07 am
As is right now, no. You need to add some Java Scripting wizardry at least - the Surface custom attribute already uses the technique - but can be developed further to do the job. But I guess you can achieve the same result using the Product Types - a core VM feature.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jtdo84 on April 19, 2010, 22:45:14 pm
To my knowledge using Product Types would not help your situation alpertheidiot.  If your using the latest VM, I know of a way solution that would let you have a dropdown attribute for your size using the regular advanaced attributes by making the price "=X" (X being the price).   You would have to mod the addtocart_advanced_attribute.tpl.php to hide the advanced attributes and dynamically call each attribute and also create custom check boxes that link to your advanced attributes.  Its possible in your case.  I'm working on a calculator that uses the calculated results to equal the price.  I still can't figure out my problem.  I don't know if I should go back to VM 1.1.2 to use this hack.  Is VM 1.1.2 reliable?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alpertheidiot on April 20, 2010, 00:23:22 am
thanks for quick response guys. I have not used product types before, and from what I understan it is used to add extra info regarding product types.

webgobe, I appreciate if you could give an example how to do this with product types. to keep it simple, say I have two sizes, M and L. and I have one topping, it is 0.50 for M and 0.90 for L. could you give an example?

jtdo84, same again, please could you give an example? when you say regular advanced attributes, do you mean without the hack being discussed in this thread? and how do you hide advanced attributes, dynamically call each attribute and create custome check boxes? I appreciate if you could explain further.

PS. Im using 1.1.4 and never used 1.1.2, so I dont know if it is reliable. I presume 1.1.4 would be more reliable and improved.

thanks for answers.. much appreciated..
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 20, 2010, 13:09:49 pm
The hack is working currently on 1.1.3. Parts of aren't working on 1.1.2 - you need to manually re-hack the 1.1.2 files. also there are some known (marginal) problems in 1.1.4. Did not had yet the time needed to rewrite it to be fully 1.1.4 compliant.
Will be back with more.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: alpertheidiot on April 20, 2010, 13:39:29 pm
ok, thank you.. I will be checking for your posts..

cheers
alper
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ewy on April 22, 2010, 14:34:54 pm
I'm trying to install CAE-surface on my Joomla 1.5 installation with Virtuemart 1.1.4.
So far it's working fine - I can enter width and length of my article, and it's also taken over into the basket with that comment.

But: I had no luck with the correct price calculation. Whatever I do, I always get the standard price of the article only - independent from the actual price per square meter.
(When I don't enter an article price, I can't order the article but only get an option to ask for price. So it seems like I have to enter an article price anyhow.)

Am I missing anything here? Do I have to adjust any further files? In some earlier thread articles I read about adjusting language files, but the "manual" does not have any comment on this. (I'm using German language, if that's of any interest.)

Greetings,

Christian
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 22, 2010, 15:24:53 pm
In the pack you will found all modified files - including the modified English language files.
Yes, you need to enter a price for the item you want to add "surface" attribute. The price calculated by the hack is added to that. The presumption is that you have a price set for the article corresponding to the minimal weight/height, and the hack calculates the additional price to be added to the basic price for the extra surface.
So, theory says ;) that you need to take the hacked files as they are, to copy over to your VM 1.1.3 or 1.1.4 install, add the new language things to the eventually used non-English languages and you can use it. Some problems where signaled by other users too, so I will revisit the package and will update it and will post here what was changed. Probably a clearer explanation is needed, quite a big number of users where able to install and use it. As is for now, I'm aware of 95 downloads from which 3 where reported with problems.
I'm a bit overwhelmed right now (among other things some new extensions of the hack are in work), but I will do my best to doublecheck and post here the latest findings!

PS. I downloaded the hack as a common user from my page (to be sure that I use what's published there), applied it to a fresh Joomla 1.5.15/VM 1.1.4 install, and used this code:
Code: [Select]
Fläche (surface)(Tragen Sie Länge und Breite der Plane ein|title-hover)(10|10|100|18|1000|16|2500|14)Works on my end. But probably I don't do some of the mistakes an average user can do... so definitively an update of the documentation is needed.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ewy on April 23, 2010, 09:38:32 am
Hi Webgobe,

thanks for your detailed and patient explanation!

So, theory says ;) that you need to take the hacked files as they are, to copy over to your VM 1.1.3 or 1.1.4 install, add the new language things to the eventually used non-English languages and you can use it.

I just tried it again using your sample code. Still the same issue - no price change.
I guess my issue is based on the marked quote - did you describe anywhere what I have to change in my (german) language files to get it running?

Thanks,

christian

Update: Hm. Switched the language of my Joomla setup to English to test it. Unfortunately, it didn't change anything, so the price is still the original one without any additional charge :-/ ...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ognjenko on April 23, 2010, 14:22:11 pm
man youre great!

Just quick question, does this hack allow custom user text box to fill in when adding product to bag?
Thanks a lot
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 23, 2010, 15:15:21 pm
man youre great!

Just quick question, does this hack allow custom user text box to fill in when adding product to bag?
Thanks a lot
Yes.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ognjenko on April 23, 2010, 16:03:46 pm
Is there any usage manual maybe?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ash on April 23, 2010, 16:48:12 pm
Hi I have added the hack to my site fine, vm 1.1.3 and Joomla 1.5.15

The issue i seem to have is i can add one custom attribute to each product, for example
NI Number(text)(|)(|);  works fine and i can add it to the cart

BUT if i add more than one like this

NI Number(text)(|)(|);message(textarea)(|)(|);

I get the Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

I can not seem to work out why this is, if anyone can shed some light i would be most great full The full code i am trying to add is below...

Code: [Select]
Ni Number(text)(|)();Preferred Test Date(date)(tip here|location)(|);
Special accommodation(textarea)(tip here|location)(default text|price|charge type);Preferred Test City(select)()(Aberdeen|Aberdeen ,Armagh|Armagh,Bangor|Bangor,Bath|Bath,Belfast|Belfast,Birmingham|Birmingham,Bradford|Bradford ,Brighton and Hove|Brighton and Hove,Bristol|Bristol,Cambridge|Cambridge,Canterbury|Canterbury,Cardiff|Cardiff,Carlisle|Carlisle,Chester|Chester,Chichester|Chichester,Coventry|Coventry,Derby|Derby,Dundee|Dundee,Durham|Durham,Edinburgh|Edinburgh,Ely|Ely,Exeter|Exeter,Glasgow|Glasgow,Gloucester|Gloucester,Hereford|Hereford,Inverness|Inverness,Kingston upon Hull|Kingston upon Hull,Lancaster|Lancaster,Leeds|Leeds,Leicester|Leicester ,Lichfield|Lichfield,Lincoln|Lincoln,Lisburn|Lisburn,Liverpool|Liverpool,London Center|London Center,London East|London East,London West|London West,Londonderry|Londonderry,Manchester|Manchester,Newcastle upon Tyne|Newcastle upon Tyne,Newport|Newport,Newry|Newry,Norwich|Norwich,Nottingham|Nottingham,Oxford|Oxford,Peterborough|Peterborough,Plymouth|Plymouth,Portsmouth|Portsmouth,Preston|Preston,Ripon|Ripon,Salford|Salford,Salisbury|Salisbury,Sheffield|Sheffield,Southampton|Southampton,St Albans|St Albans,St Davids|St Davids,Stirling|Stirling,Stoke-on-Trent|Stoke-on-Trent,Sunderland|Sunderland,Swansea|Swansea,Truro|Truro,Wakefield|Wakefield,Wells|Wells,Westminster|Westminster,Winchester|Winchester,Wolverhampton|Wolverhampton,Worcester|Worcester,York|York)

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 23, 2010, 17:18:23 pm
I just tried it again using your sample code. Still the same issue - no price change.
Take a look there:
http://portefenetrepvc.be/pvc/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=2&category_id=1&option=com_virtuemart&Itemid=32 (http://portefenetrepvc.be/pvc/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=2&category_id=1&option=com_virtuemart&Itemid=32)
It is a site in development, in that page the "surface-cm" attribute is set with this code:
Code: [Select]
Fläche (surface)(Tragen Sie Länge und Breite der Plane ein|title-hover)(10|10|100|18|10000|16|2500000|14);And seemingly works.
Give me 10 minutes to upload the latest version of the hack with updated instructions to my site - including what to change in language files! Will be back with a message.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 23, 2010, 17:29:44 pm
Hi I have added the hack to my site fine, vm 1.1.3 and Joomla 1.5.15

The issue i seem to have is i can add one custom attribute to each product, for example
NI Number(text)(|)(|);  works fine and i can add it to the cart...
Some important thing you missed: even if you don't need ALL arguments, they need to be filled!!!
So, syntax for "text" is this:
Code: [Select]
Name(text)(tip here|location)(default text|price|charge type);so you should use it like:
Code: [Select]
Ni Number(text)(|)(||);and not as you did, omitting the pipe chars:
Code: [Select]
Ni Number(text)(|)();This is a hack. So, the code isn't "fool-proof", you need to follow the guidelines/syntax strictly! Else you can wreac havoc in your VM install!
Will do some testings... but I did not experienced using multiple attributes at once.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 23, 2010, 17:45:26 pm
Hack updated with a bit more info added - including what and how to change in language files. Also there are added some new attributes, as "window" and "window-sill". The new attributes are explained on the homepage, explanation included in the downloadable packages too. These are of limited interest, tough, so I keep the package with only "surface" attribute also available.
http://www.webgobe.ro/en/downloads/component-hacks.html (http://www.webgobe.ro/en/downloads/component-hacks.html)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: grayceworks on April 23, 2010, 20:44:47 pm
Is there any usage manual maybe?

Yes, if you read through this thread (a lot of reading, I know) there's a lot of useful snippets and examples you can use, and the original syntax you use for most stuff is listed in this thread for the older version of the hack, however, it still applies to this updated version...

http://forum.virtuemart.net/index.php?topic=28192.0 (http://forum.virtuemart.net/index.php?topic=28192.0)
Title: No charge for jpg files only?
Post by: jthrongard on April 23, 2010, 21:43:17 pm
Ok, I've got some weirdness.  I am just testing this out right now but I LOVE this hack!!! Why is this so buried and hard to find???  We need to make this a serious component...

Anyways, I've got something really weird.  I am having people upload images and it works great.  However, there is a $50 charge that gets applied.  But it never charges it on jpg files.  Works on all other files but not jpgs!  Super weird.  What have I done?  I'm attaching screenshots.

Also why does it say "Filename: Filesize: 0 bytes" for the png file?  I can confirm that is is uploading.  Can I get help with that too?

And is there some type of upload success message or status bar that we have made?  Sometimes the files I'll be having uploaded are GIANT.  Suggestions are welcome and thank you!

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 26, 2010, 10:14:08 am
Is there any usage manual maybe?


http://forum.virtuemart.net/index.php?topic=28192.0 (http://forum.virtuemart.net/index.php?topic=28192.0)
The excellent PDF file from that link, with a text file regarding the usage of the my own additions is included in the eact of 3 downloadable versions on my site too.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 26, 2010, 10:27:28 am
Ok, I've got some weirdness.  I am just testing this out right now but I LOVE this hack!!! Why is this so buried and hard to find???  We need to make this a serious component...
Agree. But there is a small problem ;) the hack is result of contributions of more, than a duzine of volunteers, spread over more, than 4 years.
All where contributed for free or just released some results of commercial assignments to the public (as I did - both scenarios, in fact). Nobody had the time and the resources to take it, polish it and write a good manual for it for obvious reasons - the contributors mainly are living from commercial jobs - or at least making partially their live from those.
The hack is pretty complex, and would need a bit more, than a few hours of extra time to get really polished. Who will support that?
The alternative is to wait, in the time the hack evolved a lot from the original release and the docs for it where getting better. So, in time definitively the result will be far more usable as is right now.
I found myself as "maintainer" of the hack practically against my will ;) but will continue to do it, as (and if) i will find resources. But don't expect wonders! I must make my needed income first...
Anyways, I've got something really weird.  I am having people upload images and it works great.  However, there is a $50 charge that gets applied.  But it never charges it on jpg files.  Works on all other files but not jpgs!  Super weird.  What have I done?  I'm attaching screenshots.

Also why does it say "Filename: Filesize: 0 bytes" for the png file?  I can confirm that is is uploading.  Can I get help with that too?

And is there some type of upload success message or status bar that we have made?  Sometimes the files I'll be having uploaded are GIANT.  Suggestions are welcome and thank you!
Some small mistakes ;)
Take a look to your screenshoots:
In the fist one you have a problem, where you added the filetypes allowed for upload probably you just copy&pasted the description, and in type list you have something like>
Code: [Select]
... .png; or .tiff... That extra "or" definitively can wreak havoc in your setup ;)
The rest of errors may be side results of this.
The file upload isn't my code, so I just guessing here.
Try to delete that  "or" and re-test it.
 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jthrongard on April 26, 2010, 22:27:54 pm
That was it!  Weird how sensitive it is considering that was just part of the tip...

But now I've got a new problem.  The formatting is all messy and weird.  It is also completely different between IE8 and FireFox.  I know there are other posts about this and I've tried to implement solutions but they just made it worse.  Where do I need to edit to make all attributes aligned left and the attribute box the right size?  Please see screenshots.



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on May 19, 2010, 05:52:28 am
Great work on the hack!  I use J1.5.17 & VM 1.1.4.  I configured CAE with radio buttons to enable customers to select product color.  It works, except the [+10.00] price entered in the admin site displays on the website as $10.83, yet when I add the product into the shopping cart, the cart correctly displays the attribute as $10.00 and it correctly adds $10.00 to the total product price.  I did some testing by varying the [+10.00] price up and down and it consistently adds $0.825 for every $10 increase or decrease in the attribute price.   Any idea why this is happening?   
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 19, 2010, 09:17:06 am
Because you have the default tax rate of 0.85 coming standard with each VM install ;) Go to tax rates, and delete it, if you need it, or tweak your config (and products) to not use tax - if you don't need it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on May 19, 2010, 10:14:37 am
That was it! You're the best! Thanks for the quick reply.  I had to delete the Tax record.  I couldn't get it to stop adding the tax to CAE any other way.  The product's VAT was set to None, and it didn't add tax to any other prices, including the regular attribute prices.  Is there an easy way to have the CAE prices check the product VAT setting?  I'm not sure if that's a simple enhancement, but that way CAE would be consistent with the other prices.  Not to mention newbie's like me wouldn't need to bother you about this! ;) 
Thanks again for the great work!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 19, 2010, 10:17:12 am
CAE is only piggybacking on existing tax-handling infrastructure of VM, just does what other parts of VM are doing. But it's an interesting ideea ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on May 23, 2010, 22:07:04 pm
Hi Webgobe, is there anyway to have one attribute list be dependent on the user's selection of a property from another attribute list?  For example, if I have an attribute list with property values "A, B, C", and when the user selects "B", the second attribute list would dynamically change to only show the property values associated with "B". 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 24, 2010, 10:26:59 am
Not as is for now. But the capability can be added to the hack. Need some custom coding. In fact two of my additions to the basic hack are doing something similar (the "window" and the "pizza" attributes)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: joshlfisher on May 25, 2010, 01:35:38 am
I tried this on VM 1.1.4 and Jm 1.5.17, and I am getting parse errors when trying to view the flypage.   Is there a trick to getting this to work?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 25, 2010, 09:05:05 am
No, should work out of the box. Can you post an URL?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: joshlfisher on May 25, 2010, 15:28:22 pm
Dunno what the problem was, I re-uploaded and it seems to work.  One problem,
The attributes price seems to be listed weird. More than likely a problem with my attribute code.

Here is the URL:
http://mayonnaise-lovers.com/store.html?page=shop.product_details&product_id=24&flypage=flypage.tpl&pop=0 (http://mayonnaise-lovers.com/store.html?page=shop.product_details&product_id=24&flypage=flypage.tpl&pop=0)

Here is the attribute list:
Code: [Select]
Size (radio-r)(Please select a size|field-above)(Single Notecard [4.5]*,Set of 4 Notecards [15.0],4x6 [3.5],5x7 [10.0],8x10 [15.0])
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 25, 2010, 15:42:28 pm
Yea... Try this!
Code: [Select]
Size (radio-r)(Please select a size|field-above)(Single Notecard [4.50]*,Set of 4 Notecards [+15.0],4x6 [+3.50],5x7 [+10.00],8x10 [+15.00])
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: joshlfisher on May 26, 2010, 01:03:21 am
That didn't seem to work with the formatting. It also causes the pricing to be incorrect.  Each separate size needs a separate price, not a base price with the attributes increasing the price by the specified amount.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 26, 2010, 09:08:00 am
The hack supposed to work as is working: by ADDING a price to the base.
You can work around by setting the base price to zero, apply the hack to show products with prices set to zero, and then will have the result you're searching for.
Or you can hack the hack ;)
As for the price - you have problems with the first price only, the rest are working.
Formatting: the attributes are placed in divs, with hardcoded settings - was not my choice, a previous contributer set it this way. You're free to modify the code. Search for this:
Code: [Select]
<div class="radio_box" style="margin: 1px; padding: 1px; float: left; height: 170px; width: 140px; overflow: hidden;" align="center"> in ps_product_custom_attribute.php, and rewrite it as you like!
Hey, this is a user contributed hack - more, than 10 people added code here over YEARS, and all work was - and is - done for free.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: joshlfisher on May 26, 2010, 12:23:57 pm
Formatting: the attributes are placed in divs, with hardcoded settings - was not my choice, a previous contributer set it this way. You're free to modify the code. Search for this:
Code: [Select]
<div class="radio_box" style="margin: 1px; padding: 1px; float: left; height: 170px; width: 140px; overflow: hidden;" align="center"> in ps_product_custom_attribute.php, and rewrite it as you like!

Ahh, I wasn't aware the styles were hard coded. Thanks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on May 27, 2010, 11:42:00 am
Hello, I want to introduce a custom attribute that contains the date in Version 1.5.1915 joomla vm1.1.4

Is that possible with Custom Extended Attribues 2.1 [Hack]?
Tell me how I can do it thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2010, 11:48:35 am
Hey, guys! Anyone out there want a pizza? Yea, a fresh backed, crispy Custom Attribute Extended for pizza!
Here how it works:
Go and download the latest version of the hack from my site:
http://www.webgobe.ro/en/downloads/component-hacks.html?download=7 (http://www.webgobe.ro/en/downloads/component-hacks.html?download=7).
Install it. You can find a detailed howto in the package.
Create the product in your shop, and add the code to the "Custom Attribute List box on the Product status tab.
What code? Something like this:
Code: [Select]
Pizza (pizza)(|)(Mini,Medium [+1.00],Big [+2.00]);
Cheese (topping)(|)(Mini [+0.10],Medium [+0.50],Big [+1.00]);
Salami (topping)(|)(Mini [+0.20],Medium [+1.00],Big [+2.00])
Let's explain how it works: First of all, the product price should be set for the smallest sized pizza's price, without toppings (let's say 5 &euro;).
Then you set the attributes, first for the pizza itself, using the syntax:
Pizza name (topping)(|)(size1 [extra price1],size2 [extra price2],....)
There are no limits of number of attributes, and the syntax is exactly the same as the general syntax for the CAE hack.
One special note, tough: since there is no special protection implemented, and the above values are used elsewhere, you must begin the extra attribute names WITHOUTH SPACES IN FRONT, so
Code: [Select]
...,sizeN [priceN], ... is correct,
Code: [Select]
..., sizeN [priceN], ... is incorrect!!!!

The toppings syntax is similar, but more restrictive:
The attribute names part of the list of extra attributes MUST BE EXACTLY THE SAME AT CHARACTER LEVEL AS THE LIST IN PIZZA ATTRIBUTE!!!
So: if we use the above example, then

Code: [Select]
Cheese (topping)(|)(Mini [+0.10],Medium [+0.20],Big [+1.00]); - is good

Code: [Select]
Cheese (topping)(|)(Mini [+0.10], Medium [+0.20],Big [+1.00]); - is wrong (The space in front of "Medium" is the wrong thing)

Code: [Select]
Cheese (topping)(|)(Mini [+0.10],Medium [+0.20],Extra [+1.00]); - is wrong, the Big in original Pizza attribute was replaced by Extra)
Toppings attribute(s) must be used only together with (pizza), in the above sequence. The good news is, that there is no limit on (toppings) you can add to a (pizza) ;) maybe only your stomach's capacity!
Enjoy!!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2010, 11:53:08 am
Hello, I want to introduce a custom attribute that contains the date in Version 1.5.1915 joomla vm1.1.4
Can you be a bit more specific?
What date?
An arbitrary date, choosen by a user?
Supposing you want to know when your user want to get the goods delivered, add this:
Code: [Select]
Delivery date(date)(Choose a date!|field-above)(|);If you want something else, try to describe in detail what you need!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on May 27, 2010, 13:06:27 pm
Hi webgobe  and thanks for your time, my intention is to have a date attribute where a customer can select a date from a calendar.
Select your date of visit
thanks

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2010, 13:10:08 pm
Then you should add:
Code: [Select]
Date of visit(date)(put here some nice tooltip to let them know what this field is good for|field-above)(|);And bingo, you're done!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on May 27, 2010, 13:19:37 pm
Where do I have to insert the code you provided me?
where I can download the Converted Custom Attributes Extended Hack 2.1 for work with my version 1.1.4 + VirtueMart J1.5.10
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Staecows on May 27, 2010, 13:53:50 pm
Webgobe - that Pizza extension looks like a great added function!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2010, 13:57:50 pm
Any feedback/testing is appreciated!
As usual, it is an outcome of a commercial assignment, so some applause should go to the buyer too ;) who agreed that the hack to be released to the community!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2010, 13:59:34 pm
Where do I have to insert the code you provided me?
where I can download the Converted Custom Attributes Extended Hack 2.1 for work with my version 1.1.4 + VirtueMart J1.5.10
See above, but here's the link again:
http://www.webgobe.ro/en/downloads/component-hacks.html?download=7 (http://www.webgobe.ro/en/downloads/component-hacks.html?download=7)
You will find a complete description of the hack, how to apply it and how to use it in the package.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on May 28, 2010, 10:55:32 am
Hi Thanks for your input, everything works fine.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on June 03, 2010, 03:27:32 am
Hi Webgobe,
Is there anyway to have the CAE images, which are thumbnail in size, open up when clicked to a fullsize image in a lightbox?
Thanks,
Chuck
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 03, 2010, 09:32:32 am
Can be done, you need only some slight code change in ps_custom_attribute.php. Isn't built in at this moment.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pakito1 on June 03, 2010, 16:23:33 pm
Hi

Is this hack valid for the current version of VM? 1.1.4

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 03, 2010, 16:32:20 pm
No, it is for VM 1.1.3, but works in 99% of cases for 1.1.4 version too, despite the fact that the modified files are for 1.1.3 - I use almost exclusively on sites powered by 1.1.4 version of VirtueMart, but you must be aware of the above.
Maybe someday someone (maybe myself :) ) will have some spare time to port it to 1.1.4....
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 07, 2010, 17:11:16 pm
I'm having issues with products that have more than one custom attributes defined when adding to cart.  I'm using J15 and VM114 with Ajax off.

When I try to add a product to the cart with more than one custom attribute I get a 500 error.  This is consistent for all products and all attributes.  I've also noticed that the very first time I add the any product to the cart (with or without multiple attributes) it works fine.  Then any thereafter with multiple attributes will return the 500 error.  This was discovered by switching browsers and trying the same product for 3 different browsers.  I also notice that after a period of time has passed it'll allow the product to be added one time.

The only changes I've made was some css and a function that hides the price display for attributes that are set to [0.00].

Below are a couple of attributes that I use to make sure that I'm using the correct format.  I've been staring at them for too long over the past few days...could use another set of eyes.

If you have any other troubleshooting suggestions it would be appreciated.

Code: [Select]
Logo(radio-r)(|)(Babe Ruth Baseball [0.00]|/images/baberuth-baseball.jpg,Babe Ruth Softball [0.00]|/images/baberuth-softball.jpg,Cal Ripken Baseball [0.00]|/images/calripken-baseball.jpg);
Code: [Select]
Column(radio-r)(|)(Baseball [0.00]|/images/column-baseball.jpg,Stars & Stripes [0.00]|/images/column-starsstripes.jpg,Flame/Black [0.00]|/images/column-blackflame.jpg,Blue/Gold [0.00]|/images/column-bluegold.jpg,Green/Gold [0.00]|/images/column-greengold.jpg,Silver/Gold [0.00]|/images/column-silvergold.jpg);
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 07, 2010, 19:08:20 pm

If you have any other troubleshooting suggestions it would be appreciated.

Code: [Select]
Logo(radio-r)(|)(Babe Ruth Baseball [0.00]|/images/baberuth-baseball.jpg,Babe Ruth Softball [0.00]|/images/baberuth-softball.jpg,Cal Ripken Baseball [0.00]|/images/calripken-baseball.jpg);
Code: [Select]
Column(radio-r)(|)(Baseball [0.00]|/images/column-baseball.jpg,Stars & Stripes [0.00]|/images/column-starsstripes.jpg,Flame/Black [0.00]|/images/column-blackflame.jpg,Blue/Gold [0.00]|/images/column-bluegold.jpg,Green/Gold [0.00]|/images/column-greengold.jpg,Silver/Gold [0.00]|/images/column-silvergold.jpg);
A quick one:
The character "&" in "Stars & Stripes":  it's something can wreak havoc if it's passed as a variable to some PHP code - and this time that's what is happening.
Will try to test your code in one of my testbeds and will get back with the results, but I'm afraid that this and other similar things are in fact the problems behind your 500 errors. The attributes are parsed each time the cart is accessed for any reason. So even if in first attempt the & is slipping through somehow (when you put it into basket), on the second attempt you have no guarantees from the system, that will be interpreted as an ordinary text item, instead as being seen - and parsed like - a PHP reserved character (operator).
The hack have absolutely no protection against this kind of problems... and probably won't have. If you absolutely need to use &, ', " in your attributes, try to use the HTML codes instead!
The fact that you use multiple attributes shouldn't be a problem, I have site with some products with 10-12 custom attributes, running without errors of any kind.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 07, 2010, 19:43:51 pm
Ah yes, I read a post regarding these characters and skimmed through replacing my attribute codes.  I must have missed this one.  I just double checked all of them to be sure, thanks.

However, I just did a test using a single basic text box attribute and then another test with two basic text boxes.  I still receive a 500 error when the second box is added to the product.

Code: [Select]
Text (text)(|)(|);Text (text)(|)(|);
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 07, 2010, 19:56:54 pm
Name the second one to Text2 or to something else ;) the attribute name is used as unique identifier in the code ;), so you  just "planted" a  new nail in your own foot by wreaking havoc in the code once again LOL.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 07, 2010, 20:05:22 pm
:-[

Code: [Select]
Text 1 (text)(|)(|);Text 2 (text)(|)(|)
Still 500 error, though.

I think I may just do a fresh install (Joomla/VM) on a new account tonight and see if I can get this working first.

If you have any other suggestions feel free.  I'll report back on my findings in case anyone else has the same issue.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 07, 2010, 20:16:41 pm
Thank you, any data regarding the hack is interesting to me. You must have done something wrong... that can be a minor stuff - a misplaced comma in the modification made by you...
If I can have a suggestion, first test it without your mod, then apply it, to be sure that the problem is related with the hack itself or the mod you made to it.
And share your code, if proven to be error free, let's addi ti to the package!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 07, 2010, 21:03:55 pm
Okay, I created a new account.  Installed Joomla 1.5 and VM 1.1.4 w/ sample data.  Applied the most recent version of the hack.  Added two simple attributes to one of the sample products.  First time Add to Cart is fine.  The rest that follow return 500 error.

I notice if I clear my browser cookies (and subsequently my cart) it will allow me to add the product to cart again. Once.

Could there possibly be something with my server environment that is affecting this?  If I have time I will try this same process on a friends server.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: elisaf on June 08, 2010, 00:49:34 am
Hi!
 I´m using Joomla 1.5.18 and Virtuemart 1.1.4  with the vmj genx template. I copied the custom attribute files into the vmj_genx folder (includes) but when i type in the custom text for my product it doesnt appear in the cart. I tried everything but i don´t have a clue how to solve this.

Can somebody help me?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 08, 2010, 01:49:41 am
Hey Guys, I'm also getting the 500 Error. It works once, and then it doesn't seem to work thereafter... (until browser refreshed, cookies wiped or simply clearing the cart by logging in and then out)...

Also... running with Ajax, I have found that I am actually achieving the same thing. As in, it works once, and in subsequent attempts, the 'add to cart' button appears 'inactive'... No 500 Error... Just inactive.

Here is the code I am running for each product... (they all have the exact same code for each)...

Quote
Front Line 1(text)(|)(||);Back Line 1(text)(|)(||);Back Line 2(text)(|)(||);Back Line 3(text)(|)(||)

Judging from previous posts, it may be that this issue is bigger than the text above...

If you guys strike gold with this issue, awesome... Also if I can assist at all in the investigation into this, please let me know. If I can help at all comparing settings and so forth, I'd be happy to do so.

Cheers!

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 08, 2010, 01:55:12 am
Actually guys... I think I narrowed it down to the Semi-Colon.... This has probably already been established... But it looks like using one custom field works fine.

Gah! I'm going to keep playing with it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 08, 2010, 02:48:15 am
Yes McQuade, I have no issues with any of my attributes when they are enabled as a single attribute.

Are you also running VM 1.1.4?  I was going to try a fresh install of 1.1.3 to see if that was the problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 08, 2010, 06:39:51 am
Yeah, running 1.1.4

I've jumped into 'addtocart_form_no_ajax.tpl.php' and pin pointed the following code (at about line 36).

Quote
<form action="<?php echo $mm_action_url ?>index.php" method="post" name="addtocart" id="<?php echo uniqid('addtocart_') ?>" class="addtocart_form">

For some reason, this redirect simply doesn't work properly on subsequent 'add to cart' attempts...

I did have a theory though... If by having the multiple fields in the same text box is destroying it... Could we have multiple text fields to input our custom code? Thus keeping them separate?

I have made a quick visual below of what I mean...

(http://www.choicepettags.com.au/extra-custom-fields-visual.jpg)

This would theoretically keep them separate?

I personally don't think I have the skill set to pull this off... But perhaps its an answer/solution to this issue?

Hopefully VM's big guns could offer a solution? Not sure..
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: elisaf on June 08, 2010, 08:16:02 am
I´m sorry i found out that my problem was created by myself by type in some false attribut-code.
Is there any way to limit the characters in textboxes automaticly and individually?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 08, 2010, 09:52:45 am
So I have this hack working like a champ on one site so I decided to use it for something I thought would be much simpler on another site. I need for visitors to be able to upload anywhere from 1-5 photos when they place their order. I have gone over the syntax but I am sure I must have it wrong I get multiple errors when I add to cart (see pic). I created a directory in my root directory. I also have ajax turned off. Any help would be great.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 08, 2010, 10:10:36 am
So I have this hack working like a champ on one site so I decided to use it for something I thought would be much simpler on another site. I need for visitors to be able to upload anywhere from 1-5 photos when they place their order. I have gone over the syntax but I am sure I must have it wrong I get multiple errors when I add to cart (see pic). I created a directory in my root directory. I also have ajax turned off. Any help would be great.
Did you set the exact upload folder location at the new tab in VM config?
May be that simple LOL.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 08, 2010, 10:31:18 am
Hopefully VM's big guns could offer a solution? Not sure..
Humm, I'm ... at most a middle-sized gun :-*, but to demonstrate, that not the fact that the extra attributes are placed in the same box is the problem here are few pages with tons of attribs for you:
http://portefenetrepvc.be/pvc/component/virtuemart/Produit/1/1/fenetres-pvc-un-vantaux/un-canat-fix (http://portefenetrepvc.be/pvc/component/virtuemart/Produit/1/1/fenetres-pvc-un-vantaux/un-canat-fix)
http://www.mamaandteddy.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=25&category_id=1&option=com_virtuemart&Itemid=13 (http://www.mamaandteddy.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=25&category_id=1&option=com_virtuemart&Itemid=13)
Anyway, to implement the ideea - isn't impossible, BTW - the core of VM would need to be hacked more deeply. And that's not needed IMHO.
You can see that the above sites are full with multiple attributes for the same product - and no 500 errors or other similar problems are showing at all. I have many more examples to support the ideea, if you wish.
So, the problem isn't the hack itself, but or with the server environment (I can confirm that I had the bad chance to run into 2 server configurations creating problems, both where fixed), or in the way you use the hack.
Most common errors are syntax related. A missing semicolon, an extra comma, an ampersand in the name all can wreak havoc in the system. This is not a foolproof solution. It's made for smart guys, and you're all smart, I'm absolutely positive. Just maybe a bit lazy (as myself, in fact  :D )
The second set of errors are related with applying the hack. If you don't use the default template, then you must have some PHP skills and VM templating knowledge to apply it correctly.
Remember, it is a CORE HACK!!! It is not for fainthearted. If you don't find your way around, better ask for professional assistance. I'm sorry, I'm here for you, wanting to help, but in most of the cases without taking a look to the exact situation (that is, examining in detail what was done) I can't help.
Unfortunately my aunt from America did not left me a fortune - I'm living from this ;) - so for that  - if you want me to assist with onsite debugging - I will need to charge you at least a small amount. And that's the situation with most of those who where contributed to this hack, this is a collective "product" of more, than 10 contributors!!!
But, the experience over couple of years (the original hack is more, than 4 years old) demonstrated, than with some experimenting and by asking around and reading here in the forum in most cases those trying to use the hack all succeeded themselves! So I can keep waiting for the auntie  :P
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 08, 2010, 17:19:52 pm
I tired with a fresh Joomla 1.5 and VM  1.1.3 using sample products and sample custom attributes and I'm still getting 500 errors on multiple add to carts with two or more custom attributes.

I forgot to turn off Ajax in VM at first and noticed that the first time the product is added to cart (just like when it's off) it works fine...but the second (and all later attempts) do nothing at all (no 500 error).  Clicking the Add to Cart button returns nothing at all (because it's using ajax obviously).  No javascript warnings/erros either.  Just wanted to note the similarities.

Later today I will have access to a different server to try and see if I can find anything else out.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 08, 2010, 20:47:59 pm
I tired with a fresh Joomla 1.5 and VM  1.1.3 using sample products and sample custom attributes and I'm still getting 500 errors on multiple add to carts with two or more custom attributes.
If this is the case, then 99% you have some server side problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 09, 2010, 01:35:19 am
Yep, Ajax with our current settings simply does nothing. I think your right, Webglobe. I think this could simply be an issue with our servers...

Tried it on another server and it's seemed to be running fine... (Even with Ajax running!! :D)

I did some snooping around in Joomla PHP configuration tab, and the line:

Quote
register_globals       On         On

should theoretically be turned Off at the server for Joomla/Virtuemart to run optimally?

On the server that had it all working, 'register_globals' was switched off..

Yay!

I've been trying to now switch this off via '.htaccess' or 'htaccess.txt', but I think it may come down to me asking my server people to set this for me.

I'll let you guys know how I go.

Also, Webgobe, thank you so much for the offer to have a look at this, please know I have not ruled that out just yet. Haha!

- McQ
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 09, 2010, 02:40:31 am
IT WORKS!  ;D ;D ;D ;D ;D ;D ;D

Hey guys, just to confirm, we had our server tech change the PHP Config to 'register_global' settings to "OFF" on our server.

We are not using Ajax to get this done, just to be safe. I hope this helps you Jasen!

Thanks again to Webgobe for your help. Very cool.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 09, 2010, 02:53:24 am
Hah! I just returned to say that I have it working flawlessly on another server both VM 1.1.3 and 1.1.4.

I'm going to make the suggested php change on my personal server to see if that resolves the issue and report back shortly.

Thanks for everyone's followup!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jasen on June 09, 2010, 03:11:17 am
Eureka! It's working.

I checked the phpinfo() on my server and noted that register_globals was indeed on.  So, I created a php.ini file in my public-html folder that had the following code:

Code: [Select]
[PHP]
register_globals = Off

I confirmed the phpinfo() that the register_globals had been switched off and all my attributes appear to be working as intended.

Therefore, if you're having issues with 500 errors when adding to cart I would check your register globals setting and turn it off, if necessary.

Thanks again webgobe and McQuade for posting your thoughts and findings.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: McQuade on June 09, 2010, 03:30:37 am
Awesome to hear!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 09, 2010, 08:14:11 am
OK...So I got the file upload situation fixed. You were right Gobe... I had my file structure wrong. Thanks for the advice. Now for the next problem. I am almost there on this project. My problem is this. I have multiple attributes set up in the syntax but it is only displaying a few of them. Here is the syntax.

Kennel Name(text)(|);
Web Address(text)(|);
Phone(text)(|);
Gender(select)(|)(Dog,Bitch);
Registered Name(text)(|);
Call Name(text)(|);
Desired Start Date(date)(|);
Photo 1(file)(upload picture, max size 5MB|title-hover)(
aduploads/|.jpg,.psd,.gif,.png,.pdf|0|50000000|50);
Photo 2(file)(upload picture, max size 5MB|title-hover)(
aduploads/|.jpg|500000|300);
Content(textarea)(|);
Special Instructions(textarea)(|)

If you look at the picture below you will see what is actually displaying. Any help you could offer would be appreciated as always. Thanks in advance.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 09, 2010, 09:02:55 am
Awesome to hear!
I like to see happy people ;) congrats, guys!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 09, 2010, 09:12:08 am

Kennel Name(text)(|);
Web Address(text)(|);
Phone(text)(|);
Gender(select)(|)(Dog,Bitch);
Registered Name(text)(|);
Call Name(text)(|);
Desired Start Date(date)(|);
Photo 1(file)(upload picture, max size 5MB|title-hover)(
aduploads/|.jpg,.psd,.gif,.png,.pdf|0|50000000|50);
Photo 2(file)(upload picture, max size 5MB|title-hover)(
aduploads/|.jpg|500000|300);
Content(textarea)(|);
Special Instructions(textarea)(|)
I just cut&pasted your code, and shows up, see the attached. And it's a product with some 20 attributes in total ;) - it's my testbed.
It's Joomla 1.5.15 with VM 1.1.4 and latest version of the hack.
So, I guess that once again is something wrong on your end... Maybe a damaged file... maybe the product itself...
It's known fact that sometimes the CAE hack used togheter with products having the basic VM attributes behaves weird.
But I suspect a minor stuff.
Try to add the attributes one-by-one, and see what's happening.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 09, 2010, 09:49:27 am
I already knew it was something on my end  ;D I am using flypage.tpl Is it possible that I need to make an adjustment to give it more room to display the attributes? I only have 4 products in the store and I do not have any other attributes assigned to them except for the CAE. I will try your suggestion of adding them one at a time. In the meantime if you come up with any other ideas let me know. Thanks for your help and I still love this hack. I can't even imagine using VM without it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jthrongard on June 10, 2010, 02:33:59 am
Great work on the hack!  I use J1.5.17 & VM 1.1.4.  I configured CAE with radio buttons to enable customers to select product color.  It works, except the [+10.00] price entered in the admin site displays on the website as $10.83, yet when I add the product into the shopping cart, the cart correctly displays the attribute as $10.00 and it correctly adds $10.00 to the total product price.  I did some testing by varying the [+10.00] price up and down and it consistently adds $0.825 for every $10 increase or decrease in the attribute price.   Any idea why this is happening?   

I know have the same problem.  However, I've deleted all tax records, virtual tax is disabled and my VAT is set to none.  Yet I am still seeing a 9.11% price increase in the flypage but not in the cart.  Anyone got a fix?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 10, 2010, 09:05:01 am
I know have the same problem.  However, I've deleted all tax records, virtual tax is disabled and my VAT is set to none.  Yet I am still seeing a 9.11% price increase in the flypage but not in the cart.  Anyone got a fix?
It is not the hack, it's a VM problem - an old one, I can say. Just open the product(s) with this problem for editing, and save them ;).
Title: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 10, 2010, 13:12:14 pm
Hello, I need to display products in the same as shown in the photo below, and that when Select a date to be introduced on all products.
Does this attribute can be done?


Does anyone know anything?
thanks

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jthrongard on June 10, 2010, 19:02:17 pm
I know have the same problem.  However, I've deleted all tax records, virtual tax is disabled and my VAT is set to none.  Yet I am still seeing a 9.11% price increase in the flypage but not in the cart.  Anyone got a fix?
It is not the hack, it's a VM problem - an old one, I can say. Just open the product(s) with this problem for editing, and save them ;).

That is so weird.  But you were absolutely right.  You sure know this hack...  Funny thing is that I never saved it.  Just applied it.  Apply apparently works differently than save.

This hack is seriously the best work around for MANY of VM's flaws.  I wish I was savvy enough to implement it into a new version of VM. 

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 10, 2010, 19:41:41 pm
Hello, I need to display products in the same as shown in the photo below, and that when Select a date to be introduced on all products.
Does this attribute can be done?


Does anyone know anything?
thanks
This alone can't do that, but there is another hack wich let you display the products in a row, as per your example. That may be combined with this hack... but anyway, I don't think that will work without some programming...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 11, 2010, 10:19:18 am
Hi and thanks for your answer, I need to know how to do this trick and know how the programming issue, you know Who can help me, and I Do What exsatamente Following the image attached.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: heybo? on June 11, 2010, 10:34:45 am
Hallo

Newbie to this forum and this topic.  This hack is what I looked for, but now there is funny things going on, which I don't understand.  It's the basics, but somehow I get it wrong.

The installation guide says to download the correct version of the hack.  Then overwrite the files.

Both on my computer (downloaded) and on my server (using control panel x) the "overwrite the files" give me problems.  Using FileZilla to upload the files to my server, the error message is  "a critical error has occurred". 

Extracting the zip file within my control panel file manager, the error is that I don't have the permission to copy the files.  I've changed all the files and folders' permission to 777, except for two folders - <webroot>/administrator/components/com_virtuemart and <webroot>/administrator/components/com_virtuemart/classes.

cPanel said "Operation not Permitted" when I tried to change these folder's permission to 777.

Please Help?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 11, 2010, 10:46:07 am
Hi try to change the permissions of files, a greeting
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: heybo? on June 11, 2010, 11:29:03 am
Thanks for the reply.  I tried to change the permissions of the files in the two folders, still without success.  "Operation not Permitted"

???

Why would something like that happen?  How could I correct it?  (I hope that this is the core of my problem)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 11, 2010, 11:54:40 am
can that these files are under permissions of apache. ask your host provider
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: heybo? on June 11, 2010, 12:09:46 pm
Thanks, I'll try.

Update:  It seems that it worked, thanks. 

Now to get the hack working and configured for my needs...  Please wish me luck.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 14, 2010, 10:56:03 am
Hi webgobe  and thanks for your answer, I need to know how to do this trick and know how the programming issue, you know Who can help me, and I Do What exsatamente Following the image attached. 

--------------------------------------------------------------------------------


 
 


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 11:09:44 am
Hello, i've got a bug when prices are >999, it displays only 1 number
example : if price is 1455,00 it displays 1,00
Do you know in which file i can modify this?
Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 12:27:26 pm
First part can be done via customizing the category browsepage. That's the simpler part, because can be done WITHIN VM's framework.
Adding the second part, with months of service available is trickier, if you want the above visual representation, IMHO you need a serious programming, but I guess also can be done. the exact amount of work largely depends on how much backend control you want to have on the calendars.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 12:28:51 pm
Hello, i've got a bug when prices are >999, it displays only 1 number
example : if price is 1455,00 it displays 1,00
Do you know in which file i can modify this?
Thanks!
What attribute, more specifically, please!
And an URL and the exact code you used may be a great help in identifying the problem and finding the solution.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 13:17:00 pm
What attribute, more specifically, please!
And an URL and the exact code you used may be a great help in identifying the problem and finding the solution.
It refers to the flypage.tpl or ps_product_attribute and for all the attributes when price is >1000
You can have a look
you have to click on "prenotare", you can see that after 6 people, price are >1000 and display 1
Thanks for your help!


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 13:43:14 pm
Aha, so you used the custom attribute type Checkbox - that was the exact question. Still don't see the code you used, but let me guess it and to try to reproduce the error. This is one of the attribute types someone else has done  - so I need to try to see what's up myself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 13:44:52 pm
that is the same with Radio, it seems all atrributes are bugging when prices > 1000

For the code :

Quantità di Persone (checkbox)(|field-above)(2 persone - 150€ per persone[+300.00],3 persone - 150€ per persone [+450.00],4 persone - 150€ per persone [+600.00],5 persone - 150€ per persone [+750.00],6 persone - 150€ per persone [+900.00],7 persone - 150€ per persone [+1050.00],8 persone - 150€ per persone [+1200.00]);
Data desiderata(date)(tip here|location)(|);
Informazione supplementari? (textarea)(|)(Allergie, bambini...||);
A notare(line)(Ti confermeremo la disponibilità secondo le tue scelte sotto le 72|field-below)()

Did you hear about this problem before?
Thanks for your help!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 13:58:31 pm
Aha, I can reproduce it. Ok, I need a little time to investigate and to fix, will announce here in the forum when the bugfix is available (hopefully later today, depends of fast I can make some room in my tight schedule between the commercial assignments I have).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 14:00:15 pm
Thanks! I can help you if you want (if i can), just tell me where to have a look!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 14:19:02 pm
LOL, the fix is probably a 2 character long string's replacement ;) the real problem is to find it. I will do it, np.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 14:47:27 pm
Here's the quick&dirty fix. Replace your version of file with the one in the attached.
I will test it deeper - a conceptual problem was discovered - and will post the entire, fixed package ASAP.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 15:23:49 pm
Many thanks! You're great! The only thing is that I need radio button (instead of checkbox -> which works fine with your hack), and now it's bugging.... :-\
(u can check the same example as before to have a look)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Di on June 14, 2010, 15:43:48 pm
Hi...

Looking at: http://www.wendoverflowers.co.uk/shop?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=1

There are a couple of things (ignoring VM and it's weird blue!)

I need to be able to...

1. make the text area boxes smaller (about half the size of those at the moment)
2.In the check boxes for size of bouquet i need to get rid of the (+20.00) have it as the attribute to add 20 to the base price but not show it... or is there another way to show the prices... maybe as three seperate commands...

tell me your PP address, happy to donate... HUGS XXXX
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 14, 2010, 15:50:07 pm
Here's the quick&dirty fix. Replace your version of file with the one in the attached.
I will test it deeper - a conceptual problem was discovered - and will post the entire, fixed package ASAP.

Ok, I found the solution, i replace the RADIO element class (line 147) by the original of the hack :
Code: [Select]
    /**
* Outputs HTML for Custom Attribute
*/
function customTypeHTML($field=array()) {
global $mosConfig_live_site;
    $html = "";
$titlevar = trim($field['attr_pagevar']);

$values=explode(",",$field['attr_value']);
foreach($values as $valueWhole) {
   
$valueArr = explode('|',$valueWhole);
$value = $valueArr[0];
$value_img = $valueArr[1];

        $checked = strstr($value, '*') ? ' checked="yes" ' : '';
$value = str_replace("*","",$value);

if(strrpos($value,'[')){
$base_var=substr($value,0,strrpos($value,'['));
} else {
$base_var = $value;
}
$base_var=trim($base_var);
$base_var=str_replace(" ","_",$base_var);

            if ( isset($_POST[$titlevar]) && in_array($base_var, $_POST) ){
                    $checked = ' CHECKED';
            } else if ( isset($_POST[$titlevar]) ){
    $checked = '';
        }

      //~ $show_value = str_replace("[+","+",$value);
//~ $show_value = str_replace("[-","-",$show_value);
//~ $show_value = str_replace("[=","+",$show_value);
      //~ $show_value = str_replace("]","",$show_value);
$show_value=$this->getPriceWithTax($value);
if($value_img){
$show_value .= "<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' />";
}
$html .= "<div class='radio_box' style='border: 1px dotted #CCC; margin: 2px; padding: 2px; float: left;'>"; // Style
$html .= "<input type=\"radio\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"$titlevar\" value=\"".$base_var."\" ". $checked ."/>".$show_value;
$html .= "</div>";
}

return $html;
}

/**
* Outputs Secure Value for Custom Attribute
*/
function customTypeSecureValue($field=array()) {

$filter_value = array();
$values=explode(",",$field['attr_value']);
foreach($values as $valueWhole) {
$valueArr = explode('|',$valueWhole);
$value = $valueArr[0];
$value = str_replace("*","",$value);
$value_img = $valueArr[1];
$filter_value[] = $value;
}
$filter_values = implode(',',$filter_value);

return trim($filter_values);
}

/**
* Outputs & Processes the submitted data for Custom Attribute to Cart
*/
function customTypeProcess($value, $field=array()) {

return $this->CustomTypeProcessSingleSelect($value,$field);
}

}
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 16:09:37 pm
Hi...

Looking at: http://www.wendoverflowers.co.uk/shop?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=1

There are a couple of things (ignoring VM and it's weird blue!)

I need to be able to...

1. make the text area boxes smaller (about half the size of those at the moment)
2.In the check boxes for size of bouquet i need to get rid of the (+20.00) have it as the attribute to add 20 to the base price but not show it... or is there another way to show the prices... maybe as three seperate commands...

tell me your PP address, happy to donate... HUGS XXXX
Hugs are welcome always! 
1. Formatting:
You can do pretty great deal of customization by making changes in theme.css in /components/com_vitruemart/themes/default directory. However some things are hardcoded in the hack - isn't my code, the previous contributors put these formatting things in the code, so you can't overwrite everything by CSS.
Search for the things you want to change in ps_custom_attribute.php - most of the hardcoded formatting are there - or in the added, new files in the default template.
2. Hiding the +20... things. Humm, that's toff ;) basically you can do 2 things:
a. hide them using CSS
b. rewrite the hack partially.
The problem is, that those values are used effectively for managing the prices. It's simple to get rid of them from the code (there are few characters only ) but once you delete them, the entire price calculation will be ruined.
Isn't the hack's fault, it's VM's basic handling.
I made the trick of hiding these in the "Pizza" custom attribute, you can eventually take a look to that code.
Last but no least:
For the PP address, see the link on my signature ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 14, 2010, 16:11:33 pm

Ok, I found the solution, i replace the RADIO element class (line 147) by the original of the hack :
Code: [Select]
    /**
* Outputs HTML for Custom Attribute
*/
...
:) Great solution!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jthrongard on June 15, 2010, 23:01:23 pm
Arg.  I am still having problems with uploading.  I have no idea what's going on.  I've got a product called "test" where my upload code works just fine.  But then when I copy it to other products my upload capability stops working.  It creates the directory that I want the files to go into if it doesn't exist, so I'm pretty sure that my directory structure is fine.  There's something going on with the other custom attributes that I have on there that is making the upload portions not work. 

Code: [Select]
Select Color(select)(One color - Chrome Accents|title-hover)(Red,Green,Blue,Yellow,Orange,Purple,Black,White,Silver, PMS Color);
PMS Color Code(text)(Optional|field-below)(color code here|0.00|char);
Select Density(select)(Chip Size|title-hover)(128MB[+3.11],256MB[+3.84],512MB[+4.67],1GB[+5.44],2GB[+5.88],4GB[+9.20],8GB[+17.65]);
Logo Upload(file)(upload file of type .jpg,.eps,.ai,.cdr,.gif,.bmp,.png,.tiff, $50.00 setup charge|title-hover)(images/|.jpg,.eps,.ai,.cdr,.gif,.bmp,.png,.tiff|50.00);
Back Side Text(text)(FREE! Usually include your website address or a slogan|title-hover)(text here|0.00|char);
Preload Content Upload(file)(100MB limit|title-hover)(preload/|0.00|100000000);
Custom Content(number)(enter # of pages, $200 per page|title-hover)(0|200.00);
Datalocking?(checkbox)(Yes|field-below)



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 16, 2010, 09:29:39 am

Code: [Select]
Preload Content Upload(file)(100MB limit|title-hover)(preload/|0.00|100000000);

The error is in the above line. The syntaxt for the attribute is this:
Code: [Select]
Name(file)(tip here|title-below)(directory|file types|charge|max file size|min file size);And general rule for the hack is applying here too: Even if some parameters are missing, the placeholders must be there.If on some atributes (like in this case) some of the parameters can be omitted, this can be done only AT THE END of parameter string.
So the correct code is:
Code: [Select]
Preload Content Upload(file)(100MB limit|title-hover)(preload/||0.00|100000000);So you missed a semicolon marking the place for the accepted file types.If you leave this blank, the default will be applied, will be accepted the extensions hardcoded in the hack. For the list of those read the code - or the previous forum posts. ;) The min filesize parameter - being at the very end of parameters list can be omitted, the default will be used.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 16, 2010, 10:36:38 am
First part can be done via customizing the category browsepage. That's the simpler part, because can be done WITHIN VM's framework.
Adding the second part, with months of service available is trickier, if you want the above visual representation, IMHO you need a serious programming, but I guess also can be done. the exact amount of work largely depends on how much backend control you want to have on the calendars.
hola, en principio me interesa que cuando el usuario selecciones una fecha esta fecha se incluya dentro de las trescasilla de los producos y que los productos se muestren en lista no en un desplegable.

que puedo hacer?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 16, 2010, 10:44:49 am
First part can be done via customizing the category browsepage. That's the simpler part, because can be done WITHIN VM's framework.
Adding the second part, with months of service available is trickier, if you want the above visual representation, IMHO you need a serious programming, but I guess also can be done. the exact amount of work largely depends on how much backend control you want to have on the calendars.
hola, en principio me interesa que cuando el usuario selecciones una fecha esta fecha se incluya dentro de las trescasilla de los producos y que los productos se muestren en lista no en un desplegable.

que puedo hacer?
LOL, I understand about 50% of the above - sorry, Spanish isn't among the languages I fluently speak ;) and that's not enough to answer your question!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 16, 2010, 11:08:33 am
First part can be done via customizing the category browsepage. That's the simpler part, because can be done WITHIN VM's framework.
Adding the second part, with months of service available is trickier, if you want the above visual representation, IMHO you need a serious programming, but I guess also can be done. the exact amount of work largely depends on how much backend control you want to have on the calendars.
hello, I'm interested in principle that when the user picks a date that date is included within the three box of produce and products are displayed in a drop-down list does not.

explain to me how I can do?

thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 16, 2010, 12:16:27 pm
Ahh, let me ask something, just to be sure:
From what I understudd, you want, that when a user picks up the dates from the 3 boxes in bottom, then only the available products for that date to be shown? I am right?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 16, 2010, 14:29:33 pm
It seems there is a problem when I put 2 date attributes,
the first calendar doesn't appear
the second calendar appear but when a date is selcted it cancelled the information of the first calendar attribute (written by hand)
(scuse me for my english  ::))
So is there a way to put 2 calendars/ date attributes ??  ???
Thanks.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 16, 2010, 14:51:00 pm
Ahh, let me ask something, just to be sure:
From what I understudd, you want, that when a user picks up the dates from the 3 boxes in bottom, then only the available products for that date to be shown? I am right?
that's not what I want, what I am trying to make is that when a user selects a date, the date displayed on all products. attached an image.
Look on the image to Select the date of the last product, the date is inserted in all fields of date on so that the user does not have to Select the date only once.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pepetool on June 16, 2010, 15:13:21 pm
It seems there is a problem when I put 2 date attributes,
the first calendar doesn't appear
the second calendar appear but when a date is selcted it cancelled the information of the first calendar attribute (written by hand)
(scuse me for my english  ::))
So is there a way to put 2 calendars/ date attributes ??  ???
Thanks.
Enter this in the box attributes

Date1(date-r)(|)(|) solicitada; Date2(date-r)(|)(|)solicitada
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: vincent79 on June 16, 2010, 15:55:12 pm
Thanks for the help! It works!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jthrongard on June 16, 2010, 16:31:27 pm

Code: [Select]
Preload Content Upload(file)(100MB limit|title-hover)(preload/|0.00|100000000);

The error is in the above line. The syntaxt for the attribute is this:
Code: [Select]
Name(file)(tip here|title-below)(directory|file types|charge|max file size|min file size);And general rule for the hack is applying here too: Even if some parameters are missing, the placeholders must be there.If on some atributes (like in this case) some of the parameters can be omitted, this can be done only AT THE END of parameter string.
So the correct code is:
Code: [Select]
Preload Content Upload(file)(100MB limit|title-hover)(preload/||0.00|100000000);So you missed a semicolon marking the place for the accepted file types.If you leave this blank, the default will be applied, will be accepted the extensions hardcoded in the hack. For the list of those read the code - or the previous forum posts. ;) The min filesize parameter - being at the very end of parameters list can be omitted, the default will be used.

I'm sure that this wasn't helping.  But it wasn't the solution.  I'm still getting the same error after adding the "|".  Any other advice?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 16, 2010, 18:06:48 pm
that's not what I want, what I am trying to make is that when a user selects a date, the date displayed on all products. attached an image.
Look on the image to Select the date of the last product, the date is inserted in all fields of date on so that the user does not have to Select the date only once.
You need to hack the hack for that ;) In current stage you can't do that. An ideea on how you can do:
1. modify the (date) attribute type - or create one based on that to create a global variable holding the selected date
2. create a new attribute wich will read this date and add to the individual products.
Not a 2 click hack, but can be done, using some php programming and Java Script. I used something similar for the (pizza) attribute, for ideeas you can take a look to that code. (ps_product_custom_type.php)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 17, 2010, 20:10:44 pm
Ok Webgobe... I fixed the last problem I had (had a file in the wrong location) and this site is almost done. Thankfully. I have yet another question however. I am not sure if this hack or something within Vm will allow me to accomplish this but here is what I have...

This site is for a restaurant with online ordering. They have different soups available daily so they need to change it every day. It is not a problem for them to go in and change what soups they have in the syntax for the soup item on a daily basis. Where the problem comes in is that they also have other items that use the soups of the day as well such as 1/2 sandwich and soup. I need for them to be able to change the soup and have it affect all of the items that are connected to it. The problem is the connecting. I initially thought of creating a child product of each soup and then assigning it to all of the products that include a soup choice  but the problem is that a child can only have one parent in VM. So i need to be able to change the soups once and have all of the products that have a soup choice update automatically. Let me know if you have any ideas.
Thanks
RubberSoul
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 17, 2010, 20:23:20 pm
Let me ask, you're talking about "packages" like "soup+sandwich" with a given package price, "soup + pizza" as another package, where when soup changes should these packages also to be changed, right?
Need to think... never had such a demand yet.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 17, 2010, 23:29:40 pm
Essentially yes. They have about 30 sandwiches and wraps available and each of these can be purchased as a half with a bowl of soup and the price is the same for all of them. But like I said the soup changes everyday.

My preference would be to add an option for a half with soup to each sandwich item but as it stands they would have to change the available soup syntax for every sandwich. So that won't work. The next option would be to create an item for half sandwich and soup and add all of the sandwiches as an option. Which is also less than ideal because different sandwiches have different options so it is just not feasible. Even doing it that way there are still several soup items that the syntax would have to be changed on daily.

I am wondering if we can make each kind of soup an item in a set category that they can publish or unpublish with availability, and then perhaps have an attribute field that calls on the items in a specified category to populate it. I am no programmer so my ideas may not be even remotely feasible. Let me know what you think.
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 18, 2010, 09:06:40 am
Here it is another hack wich may be the way to go:
http://forum.virtuemart.net/index.php?topic=27517.0 (http://forum.virtuemart.net/index.php?topic=27517.0)
Or, something can be coded...
Let's say you have 10 soups and 30 sandwiches. They are in their separate categories (1 for soups, 2 for sandwiches), and only one soup per day is published. A solution might be than to do a hack similar to the one there http://forum.virtuemart.net/index.php?topic=27123.msg75454#msg75454 (http://forum.virtuemart.net/index.php?topic=27123.msg75454#msg75454) wich essentially should do the following: when a product from category[2] is added to cart to check if in the cart is allready a product from category[1] and if exist, and no more products from category[2] are in the cart allready, to apply half of the initial price for the product.
Can be done, I think it's feasible.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 18, 2010, 10:11:07 am
That it is a good thought but the problem I would see is this... the majority of their customer orders are for offices where there are multiple people all on the same order. So if one person wants soup, and two others want half a sandwich the pricing would be innacurate. Or am I wrong?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 18, 2010, 10:31:05 am
yes, we need a clear scenario here to handle the situation...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: RubberSoul on June 22, 2010, 20:20:41 pm
Webgobe...
    Sorry about the delay in getting back on this. I was out of town this weekend. The price for a half sandwich and soup is a fixed price. It never changes regardless of what soup or sandwich is chosen. The sandwiches individually have different prices and the soups individually are all the same price. I am not quite sure how your module idea would work but I am interested in finding out. I am setting up a test item on the site to show how I would like for it to function. I will send you an email a little later with a link and some details.
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 22, 2010, 20:43:46 pm
OK, looking forward to see it. Having the soups at same price makes it far easier!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Misty-t on June 23, 2010, 11:47:18 am
Good morning all,

I've been using the custom attributes extended hack on 2 sites for a while now.  All working great but 1 problem and for the life of me I can't fix it. 

In Google Chrome on any pages the extended hack appears that flypage / table extends the width of the right menu & margin.  The flypage appears fine in all other browsers, just Chrome has the problem. 

I attach 2 images
1. layout is fine in Google Chrome when NO attributes applied
2. layout extends right menu & margin when attributes applied


Words of Wisdom are much appreciated. 

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 23, 2010, 17:34:18 pm
Humm, probably the problem isn't related directly with the hack, but only via the CSS hooks uses. Google Chrome is the best CSS debugging tool "per se", so try to rightclick on the page, and use the Examine this menu item to see what is happening. Or give me the full URL to try to do that myself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Misty-t on June 23, 2010, 17:40:20 pm
Webglobe,

Thank you for responding.  I'll give it a shot first, I do like to figure things out - makes it stick.

I'll come back and let you know. Again thanks

T
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on June 26, 2010, 07:32:34 am
Hi Webgobe,

How can I stop the word "false" from showing up in the tool tip in IE?  All the other browsers do not have this issue.

Thanks,
Chuck 

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 16:25:30 pm
Hello All,

I am having a strange issue with this hack... I installed the files on the first page of this forum and am running VM version 1.1.4

Here is the URL in question (temp for now):

http://spitfire.websitewelcome.com/~scottsin/index.php?option=com_virtuemart&Itemid=26

I am attempting to use the "Donations Hack" and it seems to be working. However as you proceed through the checkout process... The price suddenly reverts to the default product price. I have attached two images showing where this occurs.

Any help would be greatly appreciated :)


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 28, 2010, 17:58:04 pm
Hi Webgobe,

How can I stop the word "false" from showing up in the tool tip in IE?  All the other browsers do not have this issue.

Thanks,
Chuck 
Humm, wasn't aware of, let me see from where is coming!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 28, 2010, 18:00:13 pm
I installed the files on the first page of this forum and am running VM version 1.1.4

Humm, try to download the latest one from my site and use that, and let me know if still happening.
The donation part isn't my contribution, but will attempt to fix it - if it's still here.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 18:07:32 pm
Great! I'll give that a go and let you know how I make out.

I REALLY appreciate the swift response. I know that you don't have to support this at all so I am very grateful.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 18:42:28 pm

Humm, try to download the latest one from my site and use that, and let me know if still happening.
The donation part isn't my contribution, but will attempt to fix it - if it's still here.

Well I gave that a shot and... no luck... It seems like the price gets over ridden as you proceed through the process... I have tested seeing if I could add it to the session and it is not working the way it needs to...

Any thoughts?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 28, 2010, 18:58:38 pm

Humm, try to download the latest one from my site and use that, and let me know if still happening.
The donation part isn't my contribution, but will attempt to fix it - if it's still here.
Give me the attribute code for start to play with locally first, to see if I can replicate the error.

Well I gave that a shot and... no luck... It seems like the price gets over ridden as you proceed through the process... I have tested seeing if I could add it to the session and it is not working the way it needs to...

Any thoughts?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 19:16:02 pm
Here you go:

Payment Amount(price)(|)(0.00|+)

Again, I appreciate any and all help :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 28, 2010, 19:40:00 pm
Here you go:

Payment Amount(price)(|)(0.00|+)

Again, I appreciate any and all help :)
Try to use the real bare-bones version:
Payment Amount(price)(|)(|+);
For me works. One common cause is the use of the non-default VirtueMart template, the second is the only partially hacked/replaced files. On rare cases we found some improperly set up servers too, but that's accounts for <2% of failures. Eventually I can check your install, but need full (superadmin+FTP) assets for that
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 21:31:23 pm

Try to use the real bare-bones version:
Payment Amount(price)(|)(|+);
For me works. One common cause is the use of the non-default VirtueMart template, the second is the only partially hacked/replaced files.

No Luck :( To Be Safe here is what I tried:

1 - Uninstalled Virtuemart and Reinstalled a "FRESH" copy.
2 - Re-uploaded ALL your latest code/hacks
3 - Tested again... Same result

http://spitfire.websitewelcome.com/~scottsin/index.php?option=com_virtuemart&Itemid=26

Any thoughts as to where we should go next? I can get you FTP access if you require. Can provide me with a Private Message please :) or email me (I sent you a message on twitter as well)

Again, I cannot thank you enough for your help... this one has me a little baffled.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bultrug on June 28, 2010, 21:33:06 pm
Hello,

I tried this hack before without any luck. Back then I just gave up. For some odd reasons I'm picking this hack up again and come across the folowing.
When I use the date attribute, everything is fine. When I use the text or textfield attribute I can type text in it, but when I click the 'add to cart' button, nothing happens. Turning off Ajax doesn't work for me either.
Any help is truely appreciated.

If there is a hack to use shipping rates per item (depending on postalcode) it would make my site perfect.

Thanx in advance,

Ivo M.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 28, 2010, 21:35:21 pm
@webgobe

Also, any chance you can send me a link to where you have it working? I believe you.. just like to know I am not crazy... or possibly that I am LOL!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 29, 2010, 10:55:31 am
Hello,
I tried this hack before without any luck. Back then I just gave up. For some odd reasons I'm picking this hack up again and come across the folowing.
When I use the date attribute, everything is fine. When I use the text or textfield attribute I can type text in it, but when I click the 'add to cart' button, nothing happens. Turning off Ajax doesn't work for me either.
Any help is truely appreciated.

If there is a hack to use shipping rates per item (depending on postalcode) it would make my site perfect.

Thanx in advance,

Ivo M.
Ivo, hack for shipping per item or per Zipcode exist (depending on what you exactly want), search for it here in the forum, I used it in couple of installs.
As for hack: if some of attributes are working, then for the rest of them in 99% of the time the problems are created by incorrect syntax used. Thumb of rule is to try to use first the provided examples, and if those are working, you can proceed to tweak them. Typical errors are: not providing ALL parameters. Generally these must be there - even if empty. To be clear, if one attribute has 4 parameters, you must provide them all, for example at at least (|||)!!!  (depending on exact syntax), so (1|2|3|) is correct, (1|2|3) is incorrect. Also the semicolon at the end may be crucial. The hack is A HACK!!! provided as is, generally without too much protection against typos, syntax errors etc. So, you must be very careful in the use.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 29, 2010, 10:59:12 am
@webgobe

Also, any chance you can send me a link to where you have it working? I believe you.. just like to know I am not crazy... or possibly that I am LOL!
OK, if you want some... how many would be enough ;)
http://www.mamaandteddy.com/ (http://www.mamaandteddy.com/)
http://www.spandoeksite.nl/ (http://www.spandoeksite.nl/)
http://portefenetrepvc.be/pvc/ (http://portefenetrepvc.be/pvc/)
...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 29, 2010, 15:25:00 pm

OK, if you want some... how many would be enough ;)


Haha! Sorry, I guess I wasn't clear.. I meant an example  where you had the "donations hack" running.

Great sites BTW!

Did you have any further thoughts on this? I am at a loss. Clean VM install, clean, latest hack install, default templates and no success. Thoughts?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 29, 2010, 16:04:34 pm
Lol... humm, I have it somewhere...
Not remember in what (still running) site I have it, but I can showcase for you on one of my sites in development. But you can be sure, the hack itself works correctly, I tested it through fully yesterdays on my testbed site.
So, the problem might be on some server side setting you have, which is not correct, especially the register globals setting can be one of culprits. Another possible "candidate" is your PHP version/settings.
In couple of cases I succeeded to fix it by comparing the troublesome site's settings (...administrator/index.php?option=com_admin&task=sysinfo) to a correctly working one.
The commercial hosting companies generally have the correct settings in place, and on Joomla forums you can find the list/requirements. The VM - and the hack itself - does not need anything special, if the hack does not work, then the site will have problems with other components too. The problem is caused mainly by the fact that the parameters are passed by URL and stored as session variables. Hence the Ajax related problems too. Those are ALL just signals that something is wrong server side. With a correctly set servers the hack never produces problems with or without Ajax enabled. In the above examples you can find both cases, and where the Ajax functions in VM are disabled are done so not because of problems, but because the siteowner's options.
I know, can be very frustrating to debug the problematic setups. But isn't an impossible task.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Nick on June 29, 2010, 17:00:19 pm
So, the problem might be on some server side setting you have, which is not correct, especially the register globals setting

Eureka!!! That was it... somehow the hosting setting regarding register globals had gotten turned ON. They are supposed to be OFF on my server by default.. so a flip of the switch and that fixed it.

Thanks a bunch!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 29, 2010, 18:26:14 pm
Congrats!
You owe me a beer ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bultrug on June 29, 2010, 22:54:59 pm

Ivo, hack for shipping per item or per Zipcode exist (depending on what you exactly want), search for it here in the forum, I used it in couple of installs.
As for hack: if some of attributes are working, then for the rest of them in 99% of the time the problems are created by incorrect syntax used. Thumb of rule is to try to use first the provided examples, and if those are working, you can proceed to tweak them. Typical errors are: not providing ALL parameters. Generally these must be there - even if empty. To be clear, if one attribute has 4 parameters, you must provide them all, for example at at least (|||)!!!  (depending on exact syntax), so (1|2|3|) is correct, (1|2|3) is incorrect. Also the semicolon at the end may be crucial. The hack is A HACK!!! provided as is, generally without too much protection against typos, syntax errors etc. So, you must be very careful in the use.
Webgobe,

Thanx for the tip, but I tried several different syntaxes. I even copied the original attributes from the original post. Just today I used the textarea attribute without any other attributes and it works. But as soon as I add a semicolon and another attribute it stops adding the item to the cart. The code:
message(textarea)(|)(||);
message2(textarea)(|)(||)
gives me both boxes and when I click add to cart I only get a popup with the message to shop further or go to the basket.This without the message that the item has been placed in the cart.
The most anoying thing is that others have this hack working and somehow I can't get it to work at all.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on June 30, 2010, 07:22:22 am
Hi Webgobe,

How can I stop the word "false" from showing up in the tool tip in IE?  All the other browsers do not have this issue.

Thanks,
Chuck 
Humm, wasn't aware of, let me see from where is coming!

Hi Webgobe,

Any luck finding where the false is coming from in IE?

Regards,
Chuck
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 30, 2010, 10:37:17 am

Webgobe,

Thanx for the tip, but I tried several different syntaxes. I even copied the original attributes from the original post. Just today I used the textarea attribute without any other attributes and it works. But as soon as I add a semicolon and another attribute it stops adding the item to the cart. The code:
message(textarea)(|)(||);
message2(textarea)(|)(||)
gives me both boxes and when I click add to cart I only get a popup with the message to shop further or go to the basket.This without the message that the item has been placed in the cart.
The most anoying thing is that others have this hack working and somehow I can't get it to work at all.
Then must be something on your server... Try to see if in System Info everything is as should be.
Having Magic Quotes:      On and Register Globals:    Off is crucial.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 30, 2010, 10:44:56 am

Any luck finding where the false is coming from in IE?


I can't reproduce it. I need an URL and your version of IE. I tested couple of my sites with IE7 and IE8, none of them produces the "false" thing. Try to see for example if on http://www.mamaandteddy.com/ (http://www.mamaandteddy.com/) you see the same thing.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on June 30, 2010, 18:33:27 pm

Any luck finding where the false is coming from in IE?


I can't reproduce it. I need an URL and your version of IE. I tested couple of my sites with IE7 and IE8, none of them produces the "false" thing. Try to see for example if on http://www.mamaandteddy.com/ (http://www.mamaandteddy.com/) you see the same thing.

I cannot see it in your example.  You can see it here in IE when you mouse over Configuration: http://www.renaissancemediasolutions.com/NationalOmniaLeather/site/index.php?page=shop.product_details&flypage=flypage.pbv.v6.tpl&product_id=18&category_id=16&option=com_virtuemart&Itemid=57
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on June 30, 2010, 19:00:16 pm
I use the exactly same attribute here:
http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&Itemid=2&category_id=6&product_id=56 (http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&Itemid=2&category_id=6&product_id=56) and don't see that "false" in IE. Must be something wrong in your use of the attribute or - most likely - your template/site settings. A core Joomla function is called and the variables are passed to it, I don't see any reason from hack side to happen.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cas on June 30, 2010, 21:21:26 pm
I use the exactly same attribute here:
http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&Itemid=2&category_id=6&product_id=56 (http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&Itemid=2&category_id=6&product_id=56) and don't see that "false" in IE. Must be something wrong in your use of the attribute or - most likely - your template/site settings. A core Joomla function is called and the variables are passed to it, I don't see any reason from hack side to happen.

Thanks Webgobe for looking into it.  I'll let you know if I ever find out what it is.  I saw there were a couple of other posts in the past about this same "false" issue.  Unfortunately, I could not find any answers to their posts.  Do you see those posts and can you see any answer to their issue?  I was hoping I could save time and try the same fix.  

By the way, when clicking on the Color attribute title in your site or the Configuration title in my site, why does it set the radio button to the last item in the list in IE and go to the home page in Firefox?  How can I stop this from happening?  I was also wondering why is the attribute title a link at all?  What is it suppose to do?

By the way, for attribute properties that don't have any price change (+ or -), what is the syntax?  Can I just remove the [ ] ?  I tried a few different things with no luck. 

Thanks for all your help,
Chuck
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 01, 2010, 07:49:30 am
I was hoping I could save time and try the same fix. 
I personally never had or could replicate on my installs (both local or live server installs) the problem. To fix it, first I need to have it, then to spend some time to debug it. At this moment I have no ideea what can be the cause. I just guessing, that may be a JavaScript conflict (most likely) or some server side minor setting issue (less likely, but not impossible). As I wrote with few posts above the entire tooltip mechanism is not hack-specific, the hack uses the existing, core mechanisms, present and used everywhere in a virtuemart shop (both frontend and backend). It's simply a function call with parameters passed in normal way.
By the way, when clicking on the Color attribute title in your site or the Configuration title in my site, why does it set the radio button to the last item in the list in IE and go to the home page in Firefox?  How can I stop this from happening?  I was also wondering why is the attribute title a link at all?  What is it suppose to do?
The link is there only when you set the tooltip part of the attribute, the very first () from the syntax. If you don't want to have any tooltip, then just leave it empty, more precisely use it as (|), then no link - and no tooltip - will be shown. The link is there to trigger the Java Script for the tooltip, and is a dummy link (more precisely the target URL is #, wich is interpreted differently by browsers, needless to say, that FF is behaving according to standard). It's not something hack-specific, uses core Joomla mechanisms.

By the way, for attribute properties that don't have any price change (+ or -), what is the syntax?  Can I just remove the [ ] ? 
Yes, you just remove the square bracket part where you don't need it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: arjelou06 on July 01, 2010, 08:32:02 am
Hello everyone, I am glad that I found you here. I've been reading your post here a while ago, and I really enjoyed it. I got an additional knowledge from this forum.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: piperpilot on July 05, 2010, 06:18:04 am
I'm not sure if I am confused or not.

I downloaded the latest version from webgobe's site.  I opened it up and looked at the code and it is pretty different than VM 1.1.4.  For example, the class name in ps_cart.php is ps_cart instead of vm_ps_cart.  Now if you are saying that I should just drop all of the files in and it will work...cool, but just wanted to make sure I'm not missing something.

Next step is to actually go through and look for the code changes and do a merge but before I go through all of that effort I wanted to understand the current state.

Thanks,
PiperPilot
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 05, 2010, 09:30:33 am
I'm not sure if I am confused or not.

I downloaded the latest version from webgobe's site.  I opened it up and looked at the code and it is pretty different than VM 1.1.4.  For example, the class name in ps_cart.php is ps_cart instead of vm_ps_cart. 
If you would read the entire thread - no, I know that I cant be that demanding ;) - you would know, that the hack is BASED ON 1.1.3 Virtuemart, and was not updated to 1.1.4, but works on 1.1.4 too, withouth problems. Only a few issues are known, but those are mainly conflicts with other hacks, and not the VM version itself.
So, you're not confused. You have a sharp eye. Congrats!
Use it confidently on latest VM.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 05, 2010, 15:44:55 pm
Hi everyone.

I downloaded the vm112_custom_attribute_extended_2.15.zip but in the product page, I have some mistakes :

Quote
Notice: Undefined offset: 0 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 56

Notice: Undefined offset: 1 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 64

Notice: Undefined offset: 1 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 66

Notice: Undefined offset: 2 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 67

Notice: Undefined offset: 3 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 69

Fatal error: Class 'ps_product_custom_type_' not found in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 91

How can I resolve this problem without disable the notice error ?

And where can I insert a upload field for a product in the virtuemart admin area ?

Thank you.

Joomla : 1.5.15
Virtuemart : 1.1.4
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 05, 2010, 16:00:36 pm

Quote
Fatal error: Class 'ps_product_custom_type_' not found in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 91

How can I resolve this problem without disable the notice error ?

And where can I insert a upload field for a product in the virtuemart admin area ?

Thank you.

Joomla : 1.5.15
Virtuemart : 1.1.4
The error tells you that you did not hacked the files correctly, the referenced class file isn't found. Anyway, the version you downloaded is obsolete, go to http://www.webgobe.ro/en (http://www.webgobe.ro/en) and download the latest one, and follow the install procedure - practically you need to overwrite your files with the ones found in package.
As for the upload file in admin.... don't sure I got your question... you want to have an upload file box in the admin interface for the product? Or you want to know what and where you should add in the admin to have an upload file box for theproduct???
Let me know.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 05, 2010, 16:31:59 pm
Thank you for your answer Webgobe ! You're nice !

I will download the lastest version and try a correct installation on my shop. As for the upload file in admin, I think if I install the lastest version I will find the upload field (for customer in the product details)...

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 05, 2010, 16:59:05 pm
The lastest version runs better ! But I always have some notices. I try the example :
Quote
Number of chocolates(number)(enter # of chocolates|title-hover)(10|0.25)

Quote
Notice: Undefined offset: 3 in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 69

Notice: Undefined index: attr_post_value in C:\wamp\www\petest\administrator\components\com_virtuemart\classes\ps_product_custom_type.php on line 1033

What am I doing wrong ?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 05, 2010, 18:11:42 pm
My best bet is that you or use the non-default VM template - or did not overwritten those files in the /components/com_virtuemart folder(not the administrator/... folder).
On my testbed the code works as expected.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 06, 2010, 08:31:15 am
Thank you webgobe for your answer. I find the problem ! I use PHP Version 5.2.9 and it's make notices. For example, with PHP 5.0.4, there aren't any mistakes.

Thank you for your help !
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 07, 2010, 11:12:51 am
Hi everyone, the hack is MARVELOUS (Thank for this good hack!). But I have a upload error (look at the picture below).

I don't know the reason because all files are chomed with 777, the right path in the config file... I use this code below :

Quote
Art Work(file)(upload artwork, $20.00 charge|title-below)(images/|.jpg,.doc|20.00)

Who have the same problem ?

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: cybmar on July 07, 2010, 11:42:27 am
For the upload problem, I find a way to resolve the problem. Just turn off AJAX in your theme configuration. Is there another solution ?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 09:15:16 am
Hello

Fantastick hack, many thanks to all who made it.

I have a following question:
i have this hack installed. In admin panel i put prices in euro. On site they are shown in russian rubles. Convertation for prices of main goods and in case i put as standard attributes goes ok, but there are prolems with showing prices correctly for custom attributes.
Example:
i put price for custom attributes in admin +5 euro and it shows on site +5 rubles instead +200 rubles
the same for cart. But finally price in cart calculates correctly.

Here is part of code on ps_product_custom_type
Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($GLOBALS['CURRENCY']->convert($price),2, '.', ''),'$');
$value .=  ' ('.$operand.$price_with_tax.')';
}
and picture (http://s42.radikal.ru/i097/1007/a2/f6f37c5c67b5.jpg)

hope on your help - i read all the topic but did not found a solution.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 09:32:24 am
I'm afraid that currently is no solution exist for this. I build multi-currency shops myself, and I'm aware of the problem. The hack manipulates directly the price by using the data entered in product specifications - so if you entered [+20] in the custom attribute, that will be displayed as is, there the integration with the currency converter isn't implemented. This kicks in in the later stage, that why you can see the end result as is.
Maybe in future... but sincerely, you can see that even the port to the latest release of VM wasn't done yet. If someone have the time and skills to do it, or someone will have the money to fund the modifications then we will see it happen.
We have this hack in this stage because people where in need to solve things, and released their contributions to other people, and some other people hired some programmers to do the same and agreed that the resulted code to be released.
You can say that we have the result of a chaotic, Brownian movement here ;) and not a result of a planned teamwork, with clear development goals, timeline, etc.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 10:27:35 am
I changed the line to

Code: [Select]
$price_with_tax=$GLOBALS['CURRENCY']->convert( $price["product_price"], $price["product_currency"] ) ;and than it showed the currency rate

So i just need to muliply the value from previous example to this value and there it is. But how to put it in code coorectly? Any idea?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 10:36:47 am
Humm, you need to integrate the currency converter in a much earlier stage. Part of calculations-initial display of price modifier happens much earlier, in each custom attribute's own class. You need to modify things here, you need to look into each class for the calculation of
Code: [Select]
$show_value (unfortunately even that isn't quite uniformly applied) and hack the hack there ;), do the conversion from the base currency to the used one in this point.
The values displayed in this instance using that variable are passed through the process and finally used for the calculation of the resulted price. IMHO this is the point in the coe where you need to do the currency conversion.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 10:51:35 am
You mean i need to add $show_value function somewhere? :)
actually i am really nub  and learn php on the fly making my store so its a really new experience for me )

Oh the thing is despite it shows incorrectly - the final price is calculated correctly as it should be.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 11:30:57 am
No, if you want to have the prices everywhere shown correctly, you need to see where the $show_value is calculated, and modify the code there.
Yep, the final price is okay, because the currency converter kicks in, just too late to have the correct value shown in early screens.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 12:27:16 pm
found already :)

$show_value calculated from getPriceWithTax function

see e.g. line 191 (the same line for each option class)in ps_product_custom_type
Code: [Select]
show_value=$this->getPriceWithTax($value);$value comes from line 56 in the same file
Code: [Select]
$value .=  ' ('.$operand.$price_with_tax.')'and again we come to line 55
Code: [Select]
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($GLOBALS['CURRENCY']->convert($price)* (1 + $tax_rate),2, '.', ''),'$');so we need to multiply on the currency rate exactly here :)

but when i do like this
Code: [Select]
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($GLOBALS['CURRENCY']->convert($price["product_price"])* (1 + $tax_rate)* ($price["product_currency"]),2, '.', ''),'$')
it starts o show on the site +1 ruble...


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 13:06:34 pm
then i tried to do like this

Code: [Select]
f( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price["product_price"] = $GLOBALS['CURRENCY']->convert( $price["product_price"], $price["product_currency"] );
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format(($price)* (1 + $tax_rate),2, '.', ''));
$value .=  ' ('.$operand.$price_with_tax.')';
}
return $value;
and it still calculates correctly in cart but now it shows +3530 rubles :)
so "the truth is out there"... where?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 13:34:44 pm
LOL, yea, it's around ;) I guess with a little experimenting you will found the correct code, you're pretty close.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 13:38:51 pm
You will laugh twice more when you know i am a woman  who had never seen php up till couple of weeks ago and never searched code untill yesterday evening when forced the problem shown.  :)

So trully if you know how to do that and help me, than.. there will be one more happy woman in the world thanks to U ))
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 13:45:38 pm
OMG I DID IT!!!!

So the answer to a question of showing currencies properly is

Code: [Select]
if( $price > 0 ) {
$value = substr( $value, 0, $start ) ;
$price1=$GLOBALS['CURRENCY']->convert( $price["product_price"], $price["product_currency"] ) ;
$price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price1*$price,2, '.', ''),'$');
$value .=  ' ('.$operand.$price_with_tax.')';
}
return $value;

now one more change needed - besides it calculates correctly in cart, it shows the sum there incorrectly

here is the pic
(http://s43.radikal.ru/i102/1007/b4/545cb2a615ef.jpg)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 15:08:59 pm
Great! Congrats!
I'm effectively overwhelmed right now and had/have no time to look into the problem. If isn't that big emergency, I can look into the issue sometimes in the weekend, right now I have only the theoretical solution (the above one), the effective coding means work, testing and time.
So if that's okay, just send me your code, will try to fix it.
I like to have happy womens around me ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 18:32:04 pm
I fixed already problem with attribute price show on the flypage.
There is still problem with option price show on the cart page. I could send you my code but do not know yet which file is responsible for that.

Actually for me it would be enogh if it will not show the price for custom attribute at all. Can you help me to exclude that?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 14, 2010, 19:15:30 pm
The file itself is ps_product_custom_type.php.
Each custom attribute has it's own procedure to do it, the algorythm is located on function customTypeHTML for that given attribute.
The $show_value variable I keep talking you about is holding the values, and are displayed in the flypafes using something like:
Code: [Select]
$html .= "<input type=\"radio\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"$titlevar\" value=\"".$base_var."\" ". $checked ."/><br />".$show_value;
The above is for a radio button type of attribute, but is similar for others (not identical, tough)
So you need to play with this.
But I see some traps here, the displayed value is passed around to the ack and finally used in the cart to calculate the corrwct price... so be aware, this can be a bit tricky - but can be solved.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 14, 2010, 21:31:18 pm
I found another bug

when put goods into cart it recalculates price only for custom attributes but not for attributes added as in basic option (from dropdawn menu)
and does not show cost for a basic atttribute
On the image
1. attributes for this good added in standart mode. as result cost for good with attr is not recalculated and no attr cost shown
2. custom attr used - cost for attr shows incorrectly but total good cost is ok
(http://s46.radikal.ru/i113/1007/23/962c49c906f6.jpg)

what could it be?
i attach all my classes files..

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 15, 2010, 10:26:35 am
I am stuck ((

The price for attribute in cart as i see comes from ps_product - get_ajusted_price function? Or should i dig ps_product_attribute somewhere?

For some reason after implementing custom attr hack vm stops calculating price in cart for advanced attributes... Just a tip where to look around could help me much.

Upd. Problem comes from ps_product_attribute file.
Hope soon i will find the solutoin...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 15, 2010, 14:03:17 pm
I found another bug

Somewhere in previous 47 pages of this thread is stated that you shouldn't use together the VM's custom attributes together with CAE hack. One or another... you can use them on separate products - but never in the same product.
But not using the basic one at all if you use the hack it's the best you can do!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 15, 2010, 14:49:58 pm
Yep, i ve read that. And for me it does not work even if i use it separate for different products. But i have lots of products now already filled with advanced attributes - and i now have two options
1) change the cod ( plus for me if i do)
2) retype attributes (easiest way but too much time)

I now choose the first one way - if won't succed - than will retype data and if will.. than it will be a good option not only for me.

My idea is to add one more function and separate advanced from custom extended attributes than merge final arrays and apply calculations towards them

That is what i already did (files attached - my changes specified as modified by arina)

i think there will be some changes to ps_product too after i finish with this file

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 15, 2010, 14:57:38 pm
Good ideea. If you suceed I'll be glad to include it in the hack. Hopefully this weekend will have some time to check your mods!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 15, 2010, 15:09:46 pm
with your help i could succed twice faster &))

actually i see now that here are some good logic needed
1) we need to calculate all attr (adv and cust ext) correctly - attr with their prices come to cart in ps_cart from cartGetAttributes (calculated in ps_product_attributes) function.
2) we need to show 'em correctly in the cart - this is from ps_product

So we can
1) make all changes in ps_product_attributes only and then call form other files to work well
2) put extra changes/calculateions to ps_cart and ps_product_attributes

I think first way is better..

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: novice binder on July 16, 2010, 11:34:32 am
I am stuck with the code and can not find the proper solution but i found out what the script does

so
1) when you add a product into cart with only advanced attributes - it does not summarize cost for the attribute and cost of product
2) when you add a product into cart with only custom attributes - it does summarizes cost for the attribute and cost of product
3) when you add a product into cart with advanced and custom attributes and advanced attributes have no price - it does summarizes cost for the custom attribute and cost of product
4) when you add a product into cart with advanced and custom attributes and advanced attributes have a price - it does not summarizes cost for the custom attribute and cost of product but summarizes cost for advanced attribute
5)

if i comment lines 194- 202 in ps_cart - it stops calculating price for custom attributes if advance have no price
on line 194 there is a call to ps_product_attribute -
Code: [Select]
$result = ps_product_attribute::cartGetAttributes( $e);So i guess that exactly this function is responsible for calculating price in cart properly for attributes...
but i really do not understand how i should change it
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jakethesnake2x on July 18, 2010, 19:29:57 pm
I have a problem or more preciously a question to the hack. I want to be able to change the distance between the different elements in a radio and checkbox attribute. Also I want be able to change the distance between the two lines of attribute elements.  I'm using newest joomla and virtuemaqrt 1.1.4.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: machpablo on July 30, 2010, 23:30:17 pm
I really need help, i want to insert a 2 calendars, where you can put initial date and end date, so you can get the price only get multiply with the numbers of days.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 31, 2010, 13:55:43 pm
I really need help, i want to insert a 2 calendars, where you can put initial date and end date, so you can get the price only get multiply with the numbers of days.
You need a new custom attribute developed for that, you can't do it with the current ones available.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 08, 2010, 20:55:15 pm
Custom Attributes Extended Hack for VirtueMart 1.1.5?

What are the files to be replaced?

How should I proceed?

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: TimU on August 09, 2010, 07:05:50 am
From what I can tell, the most recent version is the file "customattributesextendedwindow.zip" from http://www.webgobe.ro/en/downloads/component-hacks.html
According to the page, this file was last updated 23/4/2010.

Perhaps Denes (webgobe) can confirm if this is the latest compilation?


You'll need to register to download the file, but the registration link on that page doesn't work. It works fine if you register via the Forums link (http://www.webgobe.ro/en/other/forum.html)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 09, 2010, 12:29:12 pm
Thank you, Phrak, to backing me ;) yes, that's correct. In fact there are 2 versions of the hack, customattributesextendedsurface.zip is the "slim" one, the other have couple of extra attributes you may dont' need (windows, windowsills etc.)
Facebook and Twitter integration is also works, and yet to be found why in the heck sometimes registration from that page fails (it is a Community Builder registration, behaving unpredictably), but the registration via Kunena forum also works.
The hack isn't tested yet on 1.1.5, but should work, the upgrade from 1.1.4 does not affected files used in this hack. Someday towards the end of the month I will check how works under 1.1.5 and if needed will upgrade, but I'm right now busy with family duties (my daughter's wedding, to be precise).
After that I will fix that registration thing too... it's embarrassing. But in past 4 months over 900 people succeeded to register, so it's enigmatic...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on August 09, 2010, 23:03:55 pm
Thanks, I updated Virtuemart 1.1.3 to 1.1.5 and then I also updated the hack using the files customattributesextendedwindow.zip

Everything OK :-)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: macsnjets on August 12, 2010, 17:51:11 pm
Noob needs help here. Please.

I just got the CAE Hack working with VM 1.1.5 and Joomla 1.5. I set up the radio checkbox line with the following:

Airplane Options(radio)(Select Airplane|title-hover)(737NG *|images/737ng.jpg,737 Blue Skyway|images/737bs.jpg,757|images/757.jpg,777|images/777.jpg,787|images/787.jpg);

The problem is my images are 200px but they need to be that large to show the detail and they are getting displayed three across the top and two on the bottom thus making the entire surrounding box way too wide for the joomla template and browser window. Also the custom attributes are displaying towards the center rather than left justified along with the normal VM attributes. How can I get everything back to the left and have the radio button images displayed vertically rather than horizontally ?

My guess is to change something in the RADIO Element Class in the ps_product_custom_type.php file but I don't know enough php to get it going.

Thanks in advance.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 12, 2010, 18:04:08 pm
Hum, indeed, you need to edit things in ps_product_custom_type.php, but you need CSS & PHP knowledge. And everything need to be co-ordinated with what you have in your site's template, etc.
Unless you show the site I can't help much. It's a bit more that a two click wizardry ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: macsnjets on August 12, 2010, 18:11:00 pm
Hmmm, I'm ok with css and pretty bad with php but here's my link to the page in question:

http://ajpdesign.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=17&category_id=8&vmcchk=1&option=com_virtuemart&Itemid=10
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 12, 2010, 18:23:53 pm
The code you need to play with is here:
Line 192:
Code: [Select]
if($value_img){
$show_value = "<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='center' /><br />".$show_value;
}
$html .= "<div class='radio_box' style='margin: 1px; padding: 1px; float: left; height:170px; width:140px; overflow:hidden' align='center'>"; // Style
$html .= "<input type=\"radio\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"$titlevar\" value=\"".$base_var."\" ". $checked ."/><br />".$show_value;
$html .= "</div>";
The sensitive code is this line (line 195), as you can see it's HTML outputted via PHP, so you shouldn't be having problems with:
Code: [Select]
$html .= "<div class='radio_box' style='margin: 1px; padding: 1px; float: left; height:170px; width:140px; overflow:hidden' align='center'>"; // Stylebut you may need to tweak this file too:
/components/com_virtuemart/themes/default/templates/product_details/includes/custom_attribute/ps_product_custom_type_radiobutton_selector.tpl.php
In this the interesting part (from your point of view) is this (lines 77-82):
Code: [Select]
<div style="width:30%;float:left;text-align:right;margin:3px;">
<input type="radio" id="custom_attr_checkbox_' . $custom_type_checkbox_group . '" name="custom_attr_checkbox" onclick="toggleCustomType' . $custom_type_checkbox_group . '(this)" />
</div>
<div style="width:60%;float:left;margin:3px;">
' . $custom_type_checkbox_label . '
</div>
Once again in fact you need to deal with HTML/CSS in fact.
Good luck!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tschroederomega on August 17, 2010, 09:35:07 am
Have it installed on virtuemart 1.1.5 and joomla 1.5.  Works fine in FF, almost fine in explore but Safari it pushes everything out on 1 line!?!?!?!?
http://www.thefauxphoto.com/index.php/virtuemart?page=shop.product_details&flypage=flypage.tpl&product_id=12&category_id=3&vmcchk=1

help?

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: sescha on August 30, 2010, 17:36:49 pm
Hi!
I have installed CCAE on Joomla 1.5.20 and VirtueMart 1.1.5 -- Admin panel is working, but when opening a product with extended attributes in the Shop Frontend, I get:

Code: [Select]
Fatal error: Class 'ps_product_custom_type_' not found in /(path-to-joomla)/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 91
Do you have an idea why I get this error message?

Thanks,
Sebastian, from Germany
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 30, 2010, 18:40:30 pm
Yes, 99% you are missed to upload a file needed.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: clang on September 03, 2010, 01:00:47 am
Hi.  I have just finished reading all 49 pages of this post and I did not see anything related to the issue I'm having.  I'm using Joomla 1.5 + VM 1.1.5 and have installed the CAE hack from webgobe's website.  It seems to be working, and I really love it.  The problem I'm having is related to using '-r' to require attributes.  I'm attaching a picture of my product page that has one required custom attribute, 'Title'.  When I leave the Title empty, the product still gets added to the cart, but the cart does not show the attributes listed below the 'Title' field.  When I enter text in the 'Title' field, it adds to the cart like it is supposed to look. The second image shows the two items I added to the cart.  The top item is correct, the second item should not be there and doesn't show all the attributes.

Shouldn't I be getting some kind of error message if I leave a required field empty?  If so, what file contains the code that is supposed to do it?  I'm wondering if I dont have the right file or if this is something I can edit myself.  I know just enough php to be dangerous :) I'm also using the VirtueUpload Pro module for file uploads.  This doesn't seem to be related to this issue, since it works fine when the required field is not empty.

Here is the text from the Custom Attribute List on the product status page:
Purpose(textarea)( Describe the purpose of show, mood/feelings to convey,etc.|field-below)(||);
Title(text-r)( This appears on cover, label, and at beginning of show.|field-below)(||);
Subtitle(text)( This will appear below the title.|field-below)(||);
Starring(textarea)( Enter up to 8 names to appear on front cover.|field-below)(||);
Show Description(textarea)( This text will appear on the back cover.|field-below)(||);
Upload(text)(|)(||)

Thanks in advance for any help you can give me.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 03, 2010, 12:55:18 pm
Sincerely, I never used the -r attribute modifier... but will take a look to the code and made some tests to see what's the problem with. It's not my contribution, so as I write this I have no ideea on how should work and how is implemented. Maybe someone else can give you a hint in mean time.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: littlemissvixen on September 03, 2010, 16:27:22 pm
First off, I have to say, this hack is wonderful. 

However, I seem to be having what likely seems a silly problem, but it is frustrating me to no end - the date option only half works! If I manually type in a date it works perfectly, but I can't get the pop-up calendar to work - the button for it is there, but when you click on it nothing happens.  The syntax I am using is Delivery Date(date)(|)(|); and I am using J1.5 and VM1.1.4.

After reading through over fifty pages in two different forum threads, and attempting to dig through the actual code myself, I am half blind, fully cranky, probably missing something super simple, and would really appreciate any help anyone could offer.

Thanks much.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 03, 2010, 17:00:37 pm
The date button in the hack (once again, not my contribution) is a know problem, a "collateral damage" of code not being ported/upgraded to latest versions of the base VirtueMart. It's on my list of things to fix. Hopefully sometime this fall will have some spare time to fix it. I'm full time freelancer, fully booked, so those "just for fun" coding sessions are rare in my life :(
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: clang on September 03, 2010, 18:37:51 pm
Webgobe - thanks for your reply.  Maybe you can point me in the right direction.  Can you tell me what bit of code is executed when the 'Add to Cart' button is clicked?  I'm assuming that is where the validation should be happenning.  I may be able to figure it out myself, if I knew which file to look in. 

Thanks again for any help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: littlemissvixen on September 04, 2010, 15:16:38 pm
Thanks for the quick reply Webgobe.  I understand both the totally booked freelancer thing and the trying to fix something that is someone else's contribution thing. If you do manage to find some time this fall please let me know and I would be glad to pay you for your time.  Until then, manual date entry it is! :)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: clang on September 04, 2010, 18:03:31 pm
I knew if I poked around long enough I could figure it out.  I was able to resolve the problem I was having of not getting an error message when leaving a required attribute('-r') empty.  One small change in the ps_cart.php file fixed it. Aroung line 207, I removed the '$multiple_products != 1' condition from the if statement and changed 'continue;' to 'return true;'.  After that I started getting the error message I was looking for.
Code: [Select]
//Check for empty custom field and quantity>0 for multiple addto
//Normally means no info added to a custom field, but once added to a cart the quantity is automatically placed
//If another item is added and the custom field is left blank for another product already added this will just ignore that item
if ($quantity != 0 && ($result["custom_attribute_given"] == false && !empty( $result["custom_attribute_list"] )))  { //$multiple_products != 1 &&
   $vmLogger->warning( $VM_LANG->_('PHPSHOP_CART_SELECT_ITEM',false) );
   return true;
}
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 05, 2010, 10:20:32 am
Thanks, good tip, let's see what we can change in the hack itself to not need to hack other files too ;)
Thank you in the name of the community using the hack!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: force93 on September 10, 2010, 12:08:48 pm
Which version I have to download for VM 1.1.4 and Joomla 1.5. I tried the 4 version's from the first page...but it doesn't work exactly..

I got this error, if i upload everything from the zip.

Fatal error: Class 'ps_product_custom_type_' not found in /var/customers/webs/bellavie/www1/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 91
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: force93 on September 10, 2010, 12:56:35 pm
Okey, it works now but I have a new problem.  The Add to card button by the product page is outside from the website...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 10, 2010, 12:58:24 pm
Hi everyone, I need to link my attribute images(thumbs) to a larger image so I made the following changes to ps_product_custom_type.php. However I need the images to pop up in a lightbox, any ideas?

From
         $show_value .= "<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' />

To

         $show_value .= "<a href=".$mosConfig_live_site."/fullimages/".$value_img.">"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>";
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 10, 2010, 13:02:35 pm
Looks like a typo in the code somewhere after latest update. Not very likely, because since the last update the package was downloaded 150+ times and nobody reported this problem.
So let me ask you:
If you answer YES for both questions, then indeed may be something wrong. Anyway, I will test and will get back to you. BTW ANY version up there should work. They are different by the sets of available extra attributes only.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 10, 2010, 13:11:09 pm
Hi everyone, I need to link my attribute images(thumbs) to a larger image so I made the following changes to ps_product_custom_type.php. However I need the images to pop up in a lightbox, any ideas?
Replace
Code: [Select]
$show_value .= "<a href=".$mosConfig_live_site."/fullimages/".$value_img.">"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>"; with
Code: [Select]
$show_value .= "<a href=".$mosConfig_live_site."/fullimages/".$value_img." rel="lightbox">"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>";
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 10, 2010, 13:17:38 pm
Hi webgobe thanks for your super super quick reply,

I made those changes however my page now doesn't load and if i use \ before " page loads but lightbox still doesn't work. Any ideas?


   $show_value .= "<a href=".$mosConfig_live_site."/fullimages/".$value_img." rel=\"lightbox\">"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>";
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: force93 on September 10, 2010, 14:52:12 pm
What i have to do, if i want that the checkboxes not one below the other but are next to each other.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 10, 2010, 15:30:39 pm
Hi webgobe thanks for your super super quick reply,

I made those changes however my page now doesn't load and if i use \ before " page loads but lightbox still doesn't work. Any ideas?


   $show_value .= "<a href=".$mosConfig_live_site."/fullimages/".$value_img." rel=\"lightbox\">"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>";

Yes, you needed those backslashes, indeed.
A question: in other parts of your shop the lightbox works? Cehck in VM control panel, at template settings idf lightbox is enabled!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 10, 2010, 15:32:00 pm
What i have to do, if i want that the checkboxes not one below the other but are next to each other.
It's a matter of CSS styling. You don't need to edit the code, you need only some CSS skills and to modify your virtuemart template's theme.css accordingly.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 10, 2010, 16:06:20 pm
Hi again, just checked yes my other products definitely show up in a light box.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 12, 2010, 16:17:02 pm
Hi guys, So far i found this module to be the only solution in creating image based attributes. I am using this for a color chart where customers can have their product painted in different colors. However I need some help taking this hack to the next level.

1. I want to be able to link attribute images to a lightbox. So far have the following code but it doesn't work. any ideas?

   $show_value .= "<a title=\"blabla\" rel=\"lightbox\" href=".$mosConfig_live_site."/fullimages/".$value_img."  >"."<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' /> </a>";

2. I have over 300 different colors (attributes) so don't want to load all of them at the same time. Would like to only display 10-20 at a time and than have the customer scroll through next set. Any ideas?

3. Rather than displaying the +30 next to the attribute, I want to be able to display the final price based upon product price (unpainted price) + attribute price (to have product painted). I am wondering can this be done purely in javascript?


 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 13, 2010, 09:07:59 am
3. Rather than displaying the +30 next to the attribute, I want to be able to display the final price based upon product price (unpainted price) + attribute price (to have product painted). I am wondering can this be done purely in javascript?
A quick reflexion: that +30 MUST be there. This way the price modification is passed to the cart, where the final calculations are occuring. The entire hack uses that to calculate the resulting price.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 14, 2010, 12:21:25 pm
Hi Webgobe, would i be able to pay you make the modifications i need for this hack?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 14, 2010, 13:28:38 pm
1 and 2 yes., 3 isn't possible,as I told you
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Vye on September 14, 2010, 22:31:28 pm
Greetings,

I'm having an issue with when a user adds a product to their cart, the custom attributes they input show up in the Shopping Cart for ~10-15 minutes, then they disappear, leaving just a plain item without the extra attributes.

I checked the VM Cart table in the database, and the custom attributes are not getting saved in there at all (the default VM ones are, but not the ones from the hack).

Joomla Version: 1.5.20
VM Version: 1.1.5

Any help or a point in the right direction is greatly appreciated!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 15, 2010, 12:16:54 pm
Hi webgobe,

ok that is alright i can work around it, how are you looking at for one and two.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 15, 2010, 12:19:26 pm
sorry i meant, how much would you be looking at ?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 15, 2010, 15:52:38 pm
Greetings,

I'm having an issue with when a user adds a product to their cart, the custom attributes they input show up in the Shopping Cart for ~10-15 minutes, then they disappear, leaving just a plain item without the extra attributes.

I checked the VM Cart table in the database, and the custom attributes are not getting saved in there at all (the default VM ones are, but not the ones from the hack).

Joomla Version: 1.5.20
VM Version: 1.1.5

Any help or a point in the right direction is greatly appreciated!
Can I take a look?
The cart items are staying in the database until they are removed in one of legal ways: cart emptied, checkout, etc.
I never experienced anything similar, and have no ideea why this happens. One thing is sure: is not the normal-planned behaviour.
I just made an experiment with one of my testbeds, I have there products in cart with custom attributes for couple of days. And they are stay there as should.
And it's a clean VM1.1.4 with only CAE added.
Do you have any other VM modification on the site?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Vye on September 16, 2010, 08:53:58 am
Hey Webgobe,

I reinstalled the component and CAE and it began working right away. It even immediately showed the items I tried to add last night in the cart, so they were in the database for sure.

I have no idea what I messed up some where, but I definitely changed a lot of stuff in a lot of files, (first time user ;), gimme a break!) so I likely just changed something I should've have.

Thanks for your time, if I find out what I changed to cause that I'll be sure to post it here in case someone ever ends up with the same issue.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 16, 2010, 09:20:54 am
Thank you, Vye, any contribution to VM is very valuable, even sharing your own failures can teach others what to avoid!
Playing with such a complex code isn't a child's play. That's why we are playing with ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Vye on September 19, 2010, 18:22:49 pm
So, when I woke up the next morning it was doing the same thing. I'm beginning to think I'm doing the install incorrectly.

I completely uninstalled VirtueMart, removed the databases and everything. Downloaded a fresh copy of VirteMart 1.1.5

Downloaded "customattributesextendedwindow.zip" updated on April 23, 2010

Then uploaded the contents of that .zip file and overwrote the previous ones. Is there another step I'm perhaps missing?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 20, 2010, 09:25:21 am
try to download CustomAttributesExtendedSurface.zip.
Both should wotk, th differences are in the available custom attributes.
Did you overwrote the files from /components/ directory too? Do you use the default VM template? These are the most common errors.
Eventually if you grant me FTP access I acen doublecheck if you did everything right!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Vye on September 20, 2010, 10:08:40 am
Hey Webgobe,

I really appreciate you trying to help, I actually just figured it out is causing the problem! I'm not sure if it's supposed to be working this way by...

If you go to:

Admin -> Configuration -> Custom Attribute Extended

There is a checkbox labeled:

Disable save cart

By default, this was checked for me. When I uncheck it, everything seems to work, which seems reversed to me, but it seems to have fixed the problem.


Note: This may be incorrect, no one do anything I say after this please

So I started to dig deeper to find out why, and in the file:

/administrator/components/com_virtuemart/classes/ps_cart.php

On or around line 599:

if (!defined('VM_SAVECART_DISABLE') || VM_SAVECART_DISABLE==1) { return; }

That line prevents the products from being added to the database whenever that "Disable cart save" checkbox is checked.

So, I'm not sure if it's a bug or working as intended, but it seems like either the logic or the label on that checkbox are backwards to me.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 20, 2010, 10:18:56 am
Interesting... Let me dig on this...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jhdesign on September 21, 2010, 19:42:11 pm
Is a working version for VM 1.1.5 posted somewhere?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 22, 2010, 10:51:56 am
The version for 1.1.3 is works under 1.1.5 too. The code isn't fully updated yet to be 100% based on the 1.1.5, but reportedly works with this version too.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: peter678 on September 24, 2010, 16:26:28 pm
having an issue with CAE and Extra IDs
I've setup my shop with child (sister) products as the same addons are availble to a lot of products and need to be able to update / amend the addons in 1 place. To do this I've added Extra IDs to products to list the addons.

Problem is as soon as I install CAE it stops the extra IDs appearing. Have tried on clean install & used customattributesextendedwindow & customattributesextendedsurface downloaded from webgobe (cheers) but every time the extra ids vanish. Have established that as soon as I overwrite ps_product_attribute.php it stops working & have spent a bit of time trying to work out what is going on in here to cause this without success.
Anyone had similar problem?
Any help / pointers greatly appreciated
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 24, 2010, 16:59:02 pm
Sincerely I never tried the Extra ID's, so I don't know if work or not together with CAE. So, I'm interested too!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: pgad003 on September 26, 2010, 16:08:13 pm
Hey guys,

I have the following:
A parent
many Children with custom attributes that use this module

I was wondering How to not display the dropdown menu (of children) when a child product is selected.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 27, 2010, 18:27:30 pm
I don't really see the reason for that ;) but you can do it with some template trickery.
First, you need to detect if you are on the main product or child product's page.
You have all ingredients ready: a variable called $product_parent_id is passed to your flypage template.
If the value of this variable is ==0, you are on main product page, if is different from zero, you're on a child product's page.
From here is simple, seek for "addtocart_form.tpl.php" file in your VM template directory, and use your PHP to place an if to hide or shown the select of childs in the page shown.
There is in fact only one line to hide:
Code: [Select]
// This function lists all product children ( = Items)
// or, when not children are defined, the product_id
// SO LEAVE THIS IN HERE!
list($html,$children) = $ps_product_attribute->list_attribute( ( $product_parent_id > 0 )  ? $product_parent_id : $product_id );

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: sengwai on September 28, 2010, 15:27:04 pm
Hi everyone,

i have been reading this long thread, its interesting to learn how the attribute list being extended and hacked here, im looking for a solution to extend my attribute list to something like the site here
http://www.mimeo.com/products/spiral-binding.php
take a look at the left panel, titled" Instant Price Estimator"

anyone here know if i could get a hack to achieve something like this? or if there some extension that you do that, Im willing to pay some fee for the hack to be done like the site above, where the product detail page can be like a price estimator before buyer decide to proceed to adding product to cart.

any help would be appreciate!

thanks in advance!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 28, 2010, 19:12:34 pm
The hack can't do that, it's relying on the VM's cart mechanisms. But I saw something like that elsewhere in this forum. Don't ask me where ;) can't remember.
But if I would be at charge building the site I would use probably Chrono-forms. I did something very similar with that component there:
http://ontslagspemildt.nl/component/option,com_chronocontact/Itemid,17/ (http://ontslagspemildt.nl/component/option,com_chronocontact/Itemid,17/)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on September 29, 2010, 08:33:53 am
Hi, webgobe! Thanks for the very useful hack (surface)!
I'm using it to count prices for banner fabric. But if I set up a price for a product, it adds the price based on the given dimensions to this product price. Is it possible that the price may be counted only based on dimensions? By now I set all the prices to 0.00. But it shows zeroes on the browse page, but I want it to show prices for 1 sq.meter.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 29, 2010, 09:33:50 am
Add the price of 1 sqm to the product, and play with the attribute settings. If you read carefully the included explanations, you will see that the hack is prepared to do that.
If it's configured correctly, adds only the price of extra surface ABOVE the default dimensions.
So, if you set up the product price for 1SQM, and in attribute settings you set the default dimensions to be 100cm*100cm, then if users are entering say 150*100 in the size, the extra price added will be the price of the .5sqm above the initial price of the product.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bramming on September 29, 2010, 16:35:58 pm
Hi :)

im currently building a website for a traveling agency. I have a problem though, thats been bugging me for quite some time.

I use the extended surface hack to add a date picker on every product page. I need to able to allow only specific days to be chosen (the days of the tours). A look inside /includes/js/calendar/calendar.js shows me, that i can disable specific days by using an unary function:
Code: [Select]
/**
 *  Allows customization of what dates are enabled.  The "unaryFunction"
 *  parameter must be a function object that receives the date (as a JS Date
 *  object) and returns a boolean value.  If the returned value is true then
 *  the passed date will be marked as disabled.
 */
Calendar.prototype.setDisabledHandler = function (unaryFunction) {
    this.checkDisabled = unaryFunction;

I would like to specify the dates of the tours in the product attributes list, and then have them passed over to calendar.js when the calendar is called, so those days can be allowed and the rest disabled.

The big problem is: How can i pass on dates to the calendar from the attribute list?

I have thought about adding en extra parameter to the calendar constructor, however in ps_product_custom_type.php line 545 i see this:
Code: [Select]
return showCalendar('".$titlevar."', '%Y-%m-%d');Where does that "showCalendar" go? as far as i can see, those parameters dont match the constructors in calendar.js.

I hope what i wrote makes sense ;)
And help would be much appreciated!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 29, 2010, 17:13:30 pm
Hmm, never tried to do that... Let me think about.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: peter678 on September 30, 2010, 11:13:39 am
want to do something pretty basic but cant work it out...
want to add some html onto the page using CAE i.e. have a checkbox & then below add a link.
This possible?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 30, 2010, 12:49:12 pm
Not at this moment, but hacking the hack a little, yes. See the inserted titles between the attributes in this page http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage_carcass.tpl&Itemid=53&category_id=98&product_id=1510 (http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage_carcass.tpl&Itemid=53&category_id=98&product_id=1510)
It's in work, not released yet the new version - not really ready.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on September 30, 2010, 19:04:15 pm
Add the price of 1 sqm to the product, and play with the attribute settings. If you read carefully the included explanations, you will see that the hack is prepared to do that.
If it's configured correctly, adds only the price of extra surface ABOVE the default dimensions.
So, if you set up the product price for 1SQM, and in attribute settings you set the default dimensions to be 100cm*100cm, then if users are entering say 150*100 in the size, the extra price added will be the price of the .5sqm above the initial price of the product.

That's ideed so! I've got that working!

One more question. If I want to add to a product an attribute which will only affect the final price not depending on quantity of that product. I've got a banner-producing site and if a customer wants our design on his banners and all the banners are of one type, he ticks "Make design for me" and choses quantity (let's say 10) and the total price for that products should be increased by the designer's work price only once - not 10 times (for each of the ten banners)

Is it possible to do that?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 30, 2010, 19:11:22 pm
Short answer: no
A bit longer one: all wizardry happens in the cart. From the attributes an adjusted price of given product is calculated, and that's multiplied with the number of items.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on September 30, 2010, 21:57:57 pm
It seems that the hack affected the Display Options of products. They don't work for me... I've read it on the forum that it's so. Isn't it?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: sengwai on October 02, 2010, 19:11:01 pm
The hack can't do that, it's relying on the VM's cart mechanisms. But I saw something like that elsewhere in this forum. Don't ask me where ;) can't remember.
But if I would be at charge building the site I would use probably Chrono-forms. I did something very similar with that component there:
http://ontslagspemildt.nl/component/option,com_chronocontact/Itemid,17/ (http://ontslagspemildt.nl/component/option,com_chronocontact/Itemid,17/)

webgobe,
thanks for the lead ..i will keep looking, im willing to pay a fee for the hack or extension, anyone following this and is interested pls contact me

thanks again!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: JonathanLans on October 05, 2010, 18:16:06 pm
Hello,
Is there any solution for problem with "cut price" in flypage.
When I add price e.g. "+100" it's okej, but when it's "1000" is cut one "0". Problem is when price has more than 3 number's.



[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 05, 2010, 18:40:35 pm
What version you're using? At least as far as I know in the version available on my page the problem is fixed. If not, then let me know to fix it ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: JonathanLans on October 05, 2010, 19:23:05 pm
I was try every version from your site.
It's something with thousand seperator (after that hack cut numbers,) but I can't fix it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 06, 2010, 09:34:56 am
OK. I'm' overloaded now, but I'll check later and will add the fix to these too.  Let me know if you fail to handle it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Misty-t on October 08, 2010, 18:24:43 pm
Hey all,

Just a quick. I've used this hack before and its great. I've installed and plan to use on another site BUT I had a .pdf document before with samples of the syntax to use. Anyone got a copy of this or point me in the right direction, I recall I found it pretty useful.

Thank you
Taryn.

Well I found it, silly me for not looking harder through my files. I attach to share with the community

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gtibbetts on October 08, 2010, 20:10:03 pm
When will the new hack be done?  I need to hack the current hack so I can get a price based on several attributes.  Lets say the user selects a color, a size and a pre-defined quantity which gives a set price.  I can also do the color as a child product.

Will your hack do this?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 09, 2010, 08:03:43 am
BUT I had a .pdf document before with samples of the syntax to use.

Misty, the document is in the package you can download from my site ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 09, 2010, 08:05:18 am
I need to hack the current hack so I can get a price based on several attributes. 

Will your hack do this?
http://www.kadkitchenandbedroom.co.uk/ (http://www.kadkitchenandbedroom.co.uk/) - its a site near to the end of the development, take a look.
As you can see, the hack can do that, and much more!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on October 09, 2010, 21:48:28 pm
when I set the default dimensions 100 x 100 and client didn't choose different dimenstions, that's what he has at checkout:
 dimensions:
and nothing follows.
Can I fix it so that it would be:
 dimensions: 100x100?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gtibbetts on October 10, 2010, 23:32:09 pm
Will the hack work with Joomla 1.5 and Virtue Mart 1.1.5.

Where can I download the hack where I can set a price based on a user selecting size, predefined quantity, color and paper type for a predefined price
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 11, 2010, 08:39:44 am

Can I fix it so that it would be:
 dimensions: 100x100?
Hmm... yea, you probably can. See in ps_product_custom_type.php the class ps_product_custom_type_surface, function customTypeProcess.
I never tried to obtain this output, but must be easy.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 11, 2010, 08:45:56 am
Will the hack work with Joomla 1.5 and Virtue Mart 1.1.5.
[/quote]Yes, in the site above works on Joomla 1.5.20 and VM 1.1.5


Where can I download the hack where I can set a price based on a user selecting size, predefined quantity, color and paper type for a predefined price
http://www.webgobe.ro/en/downloads/component-hacks.html (http://www.webgobe.ro/en/downloads/component-hacks.html)
You will need to be a bit creative, and you can obtain something like http://druckstadt.de/ (http://druckstadt.de/), I guess that's pretty close to what you want - see especially products in the Konfigurator category. http://druckstadt.de/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage-ask.tpl&Itemid=53&category_id=13&product_id=3&vmcchk=1&Itemid=53 (http://druckstadt.de/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage-ask.tpl&Itemid=53&category_id=13&product_id=3&vmcchk=1&Itemid=53).
The site's owner used this hack to build the print shop with similar functionality.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gnagnaman on October 12, 2010, 18:30:44 pm
hi to everybody,

i followed the "VirtueMart - Custom Attributes Extended - Documentation v1" manual, but it's not so intelligible.
for example: in chapter 6 is told to :


"Overview

Name(attribute type)(tip text|tip location)(attribute data);

add "-r" to attribute type to make it required.
if no tip needed you must still add: Name(text)(|)(data);"



but i don't know in wich file i have to do this
someone knows a better manual or can explain me how to convert custom attributes???

thank's for help.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 12, 2010, 18:55:41 pm
Yep, the manual can be better... but that's what we have.
Some basics:
a. Once you installed the hack - aka uploaded the files in their correct place - you don't need to deal with ANY files - if you don't want to hack the hack again ;)
b. All further actions are resuming to place codes in the product settings, namely when you edit your products, to add/remove/tweak your custom attributes, you need to go to the Product Status tab and to add/edit things in the "Custom Attribute List" textarea.
c. Let's "translate" the part of the manual you're referring to:
-all attributes are entered in the above textarea using the general syntax:
Code: [Select]
Name(attribute type)(tip text|tip location)(attribute data);If you want to make your attribute mandatory/required then you should use this syntax:
Code: [Select]
Name(attribute type-r)(tip text|tip location)(attribute data);And if you are lazy or don't want to use certain parts of the attribute  - some of them let you do this - then you can drop the unneeded parts, but YOU MUST KEEP THE SPECIAL DELIMITERS! Sometimes you can left some of them out, but is better to keep them.
So, if you don't want to use the tool-tips, then you can use the attributes like
Code: [Select]
Name(attribute type)(|)(attribute data);But you need to study each attribute you want to use to see what is the exact syntax you can use and what attribute does what.
It is a hack, is coming with ABSOLUTELY NO GUARANTEE, and is not intended to be used by people not aware of what they are doing. You can render your site unusable with a single misplaced/missing/extra comma, pipe or semicolon - to name just the most common errors. But if you learn to master it - you will got an extraordinary amount of extra power.
PS. Remaking the manual is on my shortlist. But momentarily I don't have time for it - unless someone hire me to do it... or won a beauty contest, find a golden nugget or something like, to let me do things I planned for the hack instead of struggling to make the needed income. Don't know how's the life in your end, but there in my end at the grocery store I need to pay for the bread and the milk, each morning...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gnagnaman on October 14, 2010, 10:39:58 am
Hi Webgobe,
thank you. Now I try with your instructions.
bye
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 18, 2010, 08:44:18 am
Guys, a problem discovered in the CAE, see this post:
http://forum.virtuemart.net/index.php?topic=77119.msg256770#msg256770 (http://forum.virtuemart.net/index.php?topic=77119.msg256770#msg256770)
The problem is fixed in the version available on my site, if you think your site may be affected, then re-download it, and upgrade your ps_product.php.
The bug affects only sites which are using child products and shopper group discounts - so may be only a few sites having this problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on October 25, 2010, 22:10:11 pm

Can I fix it so that it would be:
 dimensions: 100x100?
Hmm... yea, you probably can. See in ps_product_custom_type.php the class ps_product_custom_type_surface, function customTypeProcess.
I never tried to obtain this output, but must be easy.
Sorry, I've viewed this file to and from, with no success, I'm not so advanced in php. I just got to know that this function calculates the data given in the $value variable and no clue where it goes next. Can you help me solve this, please?

And one more thing. I made a text field for comments for several products on my site, and it's ok when client writes in English, but if non-English letters are entered, it shows question marks after submitting instead. And  when Checkout is clicked the cart is just emptied.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 26, 2010, 11:15:29 am
a. dimensions 100*100 problem:
The output is passed to the cart, the real price trickery happens there. So you must tweak the output of the function (currently passes an empty string when you are at defaults) to pass something you want to see, but to not trigger the VM's core engine for dealing with attributes - AKA to not try to interpret it. If I will have some time (currently I'm swamped, owerbooked, say it as you want) will look into the issue. I'm freelancer, clinets are at top priority.
b. comments field:
Did you added the comments as a CAE attribute? What code you used? The problem may be what I described above - the cart tries to "interpret" the comment.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on October 26, 2010, 14:20:15 pm

b. comments field:
Did you added the comments as a CAE attribute? What code you used? The problem may be what I described above - the cart tries to "interpret" the comment.
Yes, I added it as a CAE attribute. The code is:
Kommentarer (textarea)(Texten som du vill ska vara på banderollen|field-above)(Lämna dina kommentarer|0|);
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 26, 2010, 14:32:41 pm
Aha. Hmm, let me test it, will get back to you!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on October 26, 2010, 22:05:08 pm
the problem comes only with one Swedish small letter å ( & # 2 2 9 ; ) as far as I see.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on October 27, 2010, 22:58:42 pm
One more problem is when somebody enters non-numeric symbols together with digits in the dimensions fields (something like "w 320"), the price is calculated wrongly and so the client goes to checkout. Is it very hard to make a simple check if only digits were entered, and if no then it won't go further?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on October 28, 2010, 08:25:36 am
Adding a bare-bones validation is relatively simple, just some Java Scripts skills are needed. I will add it to the next release, but if you're in hurry, contact me directly.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: patchkabel on November 01, 2010, 10:27:40 am
Hi i'm new here and have a very big problem. i use joomla 1.5 und virtuemart 1.15 since 3 months and everything worked fine in my shop till now. i use the custom attritubes hack 2.15 und i use the number function. the problem is that the price isn't set right in the basket if you type a number in the field for the number function. you can watch this problem on

http://test.patchkabel.de/index.php?option=com_virtuemart&Itemid=191

if you type a number for the lenght of the cable and put it in your basket, the price is the same. the funny thing is, that on my local computer where i first built the shop it works fine. the attribute i set in the product is

Meter(number)(#)(1|1.20)

and like i said before, it absolutely works fine on my local cmputer.

has anybody a solution for this. joomla und virtuemart versions are the same on my local machine as on the server.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: dsrpmedia on November 07, 2010, 04:24:12 am
hi

I love this hack, thank you very much!

I am having one issue - the calander (only custom attribute I am using) is showing up on the flypage 'add to cart', but not the browse page 'add to cart'.

I have regular attributes which are showing up ok on the browse page - just not the custom attribute.

(I got commented out the
Code: [Select]
//&& !ps_product::product_has_attributes( $db_browse->f('product_id'), false) in shop.browse so that the cart would come up on all items whether they have attributes or not on the browse page)

any suggestions on how I could get the custom attributes to load on the browse page would be greatly appreciated.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: wookie18 on November 07, 2010, 17:12:08 pm
Hi Man, thanks for this hack !! It's wonderfull !
I try many times but i cant make what i want... (sorry for my poor english,i'm italian)
I want make a menu (only one choice maybe radio?) :
URL
CONTACT INFORMATION
SOCIAL NETWORK

If choose URL---> it's open a textarea
If choose Information----> it's open a 3 textare(name,surname,phone)
if choose Social Network--> it's open a menu with 5 social network(facebook,digg,twitter ecc) after you can choose one of them and open a textarea where you can put the url.

The people can choose "Only One" of this option(url,information,social network) not both.

Someone can help me?!?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: whatamiat on November 07, 2010, 18:59:34 pm
Ive just come across this hack;
Could it be used to create something like this?

(http://img819.imageshack.us/img819/8329/tableh.jpg)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 09, 2010, 09:25:31 am
i use the custom attritubes hack 2.15
Try to redownload the hack from my site - you will find the link somewhere above - and let me know if you still have the problem.
The version you use is an ancient one.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 09, 2010, 09:27:52 am

I am having one issue - the calander (only custom attribute I am using) is showing up on the flypage 'add to cart', but not the browse page 'add to cart'.

The hack wasn't build to work on browsepage. But you may be lucki - seemingly I got a job wich involves extending it to work on browsepage too. The result will be shared with the community. So, stay tuned.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 09, 2010, 09:30:31 am
Hi Man, thanks for this hack !! It's wonderfull !
I try many times but i cant make what i want... (sorry for my poor english,i'm italian)
I want make a menu (only one choice maybe radio?) :
URL
CONTACT INFORMATION
SOCIAL NETWORK

If choose URL---> it's open a textarea
If choose Information----> it's open a 3 textare(name,surname,phone)
if choose Social Network--> it's open a menu with 5 social network(facebook,digg,twitter ecc) after you can choose one of them and open a textarea where you can put the url.

The people can choose "Only One" of this option(url,information,social network) not both.

Someone can help me?!?
Try to make it with use of child products. Create a parent product wich will have 3 child products. And add to the childs the corresponding CAE attributes.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 09, 2010, 09:33:19 am
Ive just come across this hack;
Could it be used to create something like this?
Not right out of the box, but can be hacked to do it. It's a relatively easy one, but I estimate it to be a 3-4 hrs of work. Maybe later I will take a look into the issue, I'm currently overbooked in serious manner. And commercial jobs have priority - after all I'm a freelancer, living from my work.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bleacherbum17 on November 17, 2010, 16:42:54 pm
Hi all,
First off, I wanted to say thank you for the creator of the hack because without it, I wouldn't have been able to get to the point that I am currently at.  That being said, I will explain where I am at and the problem I am having.

I work for a promotional products company and we are using the VM cart as a "Quote Calculator" instead of an actual online-ordering system.  In doing so, we have the need to add all sorts of one-time-only fees (ie. Additional Ink Color Setup Fee - $40) that are merely added to the item price, and not multiplied by the quantity.  I had searched and searched for modules, components, or anything that could add fees, but I could find nothing even close except for this hack.  So, after installing the hack, I had to modify things a bit, and actually got things working for what I need....until the account.order_details page at the end.

In all of the stages of the checkout process, all of my custom fees and everything are added to the proper location and calculated with no problems.  However, after submitting the quote (to one of our CSR's who actually enters the order into Dynamics GP) and clicking "view order details" on either the thank you page or the account details page, the account.order_details page is called and displays the totals without the one-time fees added from the Custom Attributes hack.  All of the other variables I have set throughout the checkout process are still recognized upon reaching this page, with the exception of the "$feeAdjust" variable I set to handle the adjustment (and even made a global variable).  I have tried everything I can imagine to get it to be recognized, including adding the "get_adjusted_attribute_price" function, where I made the change to set "$feeAdjust", to the account.order_details.php page itself in the hopes that it would call it directly from there.

I must admit that this is my first attempt to WRITE any custom PHP code, though I have experience in "bending/tweaking" the PHP code to accomplish what is needed in joomla, VM, WordPress, etc., so I am not sure if I have just made some dumb noob mistake that is not allowing me to use this variable there, or if I am just flat out not seeing something.

My changes to the hack have been mostly in just one spot, though I had to add the '$feeAdjust' variable and other fees to the item subtotal after it was multiplied by quantity in ps_checkout.  As I said before, the variable $feeAdjust is the variable name I am using to call up the fees.

Code: [Select]
// if we have a number, allow the adjustment
if (true == is_numeric($modifier) ) {
                   
// Now add or sub the modifier on
if ($operand=="+") {
$adjustment += $modifier;
$GLOBALS['feeAdjust'] = $adjustment;
}
else if ($operand=="-") {
$adjustment -= $modifier;
$GLOBALS['feeAdjust'] = $adjustment;
}
else if ($operand=='=') {
// NOTE: the +=, so if we have 2 sets they get added
// this could be moded to say, if we have a set_price, then
// calc the diff from the base price and start from there if we encounter
// another set price... just a thought.

$adjustment += $modifier;
$GLOBALS['feeAdjust'] = $adjustment;
$set_price = true;

}
}
} else {
continue;
}
}
}
}


// no set price was set from the attribs
if ($set_price == false) {
$price["product_price"] = $base_price + $GLOBALS['feeAdjust'] *(1 - ($auth["shopper_group_discount"]/100));
$setprice = $price["product_price"] ;
}
else {
// otherwise, set the price
// add the base price to the price set in the attributes
// then subtract the adjustment amount
// we could also just add the set_price to the adjustment... not sure on that one.

if (!empty($adjustment)) {
$GLOBALS['feeAdjust'] += $setprice;
// }
$GLOBALS['feeAdjust'] *= 1 - ($auth["shopper_group_discount"]/100);
// $setprice = $price["product_price"];
$price["product_price"] = $base_price;
// $feeAdjust_display = $GLOBALS['CURRENCY_DISPLAY']->getFullValue($GLOBALS['feeAdjust']);
}}

I also added
Code: [Select]
return $feeAdjust;to the end of the function so that it would return the variable's value.

I really need some assistance in figuring out why it won't recognize the variable on the account.order_details page, or at the very least what I need to do in order to make it call up the same subtotal, total, etc. on the order_details page that it calls up throughout the checkout process.  Any help is GREATLY appreciated!


***UPDATE***
I have continued working on this, and have figured out that it seems to be calling the subtotal for the account.order_details $sub_total directly from the cart.  When the cart is empty (as is expected after you just checked out), the page doesn't recognize the $feeAdjust variable, and the subtotal is displayed without the $feeAdjust added.  When there are items in the cart, the $feeAdjust variable IS recognized, and the subtotal is calculated as needed.

The code in the account.order_details page that calls the subtotal is as follows:
Code: [Select]
<td><?php /*
$price = $ps_product->get_price($dbcart->f("product_id"));
$item_price = $price["product_price"]; */
if( $auth["show_price_including_tax"] ){
$item_price $dbcart->f("product_final_price");
}
else {
$item_price $dbcart->f("product_item_price");
}
echo $CURRENCY_DISPLAY->getFullValue($item_price''$db->f('order_currency'));

           ?>
</td>
          <td align="right"><?php
  $total $dbcart->f("product_quantity") * $item_price
          $subtotal += $total;
  $subtotal += $feeAdjust;
          echo $CURRENCY_DISPLAY->getFullValue($subtotal''$db->f('order_currency'));
           ?>
&nbsp;&nbsp;&nbsp;</td>
        </tr><?php
        }
?>
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bleacherbum17 on November 18, 2010, 14:40:40 pm
Actually...I figured it out!  I ended up changing a decent amount of what I had done after I realized that function get_adjusted_attribute_price was returning an entire array for price, I just added the "feeAdjust" variable to the array so that it would be returned as well.  Then I went back through and removed all references to $feeAdjust being global and then made $feeAdjust = price["feeAdjust"] after the script called on $price from the get_adjusted_attribute_price function.

Lastly, I added $feeAdjust to the fields that were posted to jos_vm_order_item in the DB in ps_checkout under function add.

Thanks anyway, but it figures that as soon as I posted for help, it all clicked for me...good luck to everyone else with whatever problems they may be having.

PS.
If anyone stumbles across this post and needs something similar to what I have done, let me know and I will post the changes I made in order to add one-time-per-product fees.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ardanaru on November 27, 2010, 00:39:34 am
Hello!

I have a big question: where can I actually download the most recent version of the patch?
And, where can I find a manual?
All the related threads are soooo long, and it's so time consuming to find :(
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: ardanaru on November 27, 2010, 13:54:51 pm
okay, I found it.
I have a question tho:

I am using products with childproduct.. and I used to show a "add to cart" button for each child..
So it looked like this:

PARENT PRODUCT TITLE
 child title 1 [add to cart]
 child title 2 [add to cart]


That doesnt work anymore... What do I have to change?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 29, 2010, 09:13:51 am
Hello!

I have a big question: where can I actually download the most recent version of the patch?
And, where can I find a manual?
All the related threads are soooo long, and it's so time consuming to find :(
The link is posted in couple of places, but here is once again: go to http://www.webgobe.ro/en/downloads/component-hacks.html (http://www.webgobe.ro/en/downloads/component-hacks.html), and download any of versions up there. CustomAttributesExtendedSurface.zip  is the basic hack, customattributesextendedwindow.zip  is the extended version, you probably don't need it. User manual (sort of) is in package. You need to register. and you bookmart this tread: this is a hack, ment to be used on your own risk. No guarantees of any kind!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 29, 2010, 09:17:41 am
Not all files are hacked to be used with all checkout scenarios... share with us an URL, if you want to get an advice.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mikeyt on November 29, 2010, 11:59:17 am
Hi,

First of all this is a great hack - thanks for the work done on it.

I'm going to use it for a number of my clients' virtuemart stores but the people who add / update products will not be able to easily work out the code needed for the attributes they require as they are office staff and not coders.

I'm in the middle of coding a user interface for the virtuemart admin panel so that a user can just select the correct type of attribute from within a form drop down box and the fields dynamically change depending on what attribute type they've selected. I'm fairly close to finishing but can't find any detailed documentation on the possible options available for the checkbox, radio, select, multiple types especially when hiding and unhiding groups. The documentation provided gives a few examples but doesn't really explain it fully. Can anyone provide with the complete syntax for these options?

I'm happy to share it with everyone once I've finished but don't want to post something that is incomplete.

Thanks,

Mike
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 29, 2010, 12:28:55 pm
I hear you, Mike. I'm swamped, right now, maybe somebody can give a helping hand in mean time, if not, in couple of days I will (hopefully) have some spare time and anyway I planned to redo the documentation, which has lots of (other) things missing, and then will make this a priority to let you go. But guys, anyone having a time - and the necessary knowledge - is invited!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nappysparks on November 29, 2010, 23:03:23 pm
Hello,
I'm new to virtuemart. I'm trying to build a shop to sell t-shirts/garments wholesale (for screen printing). I'll leave a link to an example of what I'm attepmting to build. I've been reading up on virtuemart and this hack, but haven't seen results to anything close. I'd like to know if this is a possibility with this hack, and if I could be pointed in the right direction? Working on this has been a nightmare so far.

Thanks in advance.

http://www.visionembroidery.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=419&category_id=42&option=com_virtuemart&Itemid=1 (http://www.visionembroidery.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=419&category_id=42&option=com_virtuemart&Itemid=1)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on November 30, 2010, 09:07:36 am
Yes, this is something what can be done. Not necessarly with this hack, but can be adapted too to have the same effect. But as I can see, there the main trickery is something else: it's used the parent/child products capability of VirtueMart, combined with some settings on product display tab of VM's product editing interface. I'm about to release something very close to what you need, developed for a fellow forum member. Basically you need to perform some extra hacks and settings trickery. Not quite a job for a VM rookie.
In nutshell the recipe is as follows:
a. you create a child product for each row of the table, you set up the custom attributres as numbers for example.
b. you do the display settings for the parent product in display Options tab, probably closest result to what you see is by setting Use List box for child products to ON, Display Child Description to OFF, One Add to Cart Button to ON, Display Table Header to ON, Link to child product from list to OFF - you must play with settings a bit.
c. grab your preferred editor and tweak some files from your active VM theme and ps_product_type.php (probably)
This is the simplest scenario. You may need more... but the above will let you start in the right direction.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mikeyt on December 02, 2010, 10:30:56 am
Hi webgobe,

Thanks for the quick reply - I'd like to get it completed at some point next week so no immediate hurry.

If you don't have time I'll try to wade through the PHP to work out what all the options are!

Mike
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Ed Kiefer on December 09, 2010, 23:31:31 pm
Will this work with the latest version of virtuemart?
Thanks

Hi

Update juli 2009:
For some time now I'm not using this hack myself anymore.
So please don't PM me with questions.
I did not develope the hack I only paid for the conversion from the old hack.
Thanks  :)

I received the package of the converted custom attributes extended hack 2.1 for VM 1.1 and joomla 1.5.
You can download it here.

This package is still a beta version of the conversion.
So don't use it for a production site.
Be sure to backup before you upload this hack!

You install it just by overwriting the existing files.

It is a conversion of the Custom Attributes Extended 2.1 [Hack] made by Barnett.(http://forum.virtuemart.net/index.php?topic=28192.0)
The syntax used to built custom attributes is the same as the old hack.
The 2.1 version seemed to have a file upload problem and a cart update problem.
Those are gone in this VM 1.1 joomla 1.5 version.

The conversion is done by Joseph Kwan(JK), who is also active on the VM forum.
He did a great job, but the hack needs more testing to get the bugs out, as much as possible.
Although I paid JK to do the conversion, he put in some time of his own because of the problems that were in the original hack.
So when you like the hack and going to use it when it is stable, consider to make a small donation to JK.
In his forum signature you will find a donate link.

Things that are added to this hack:
1. Date Prefix is added to the uploaded filename. The name shown in the cart is the original filename.
2. You are able to set an upload directory outside your webroot
3. File Upload defaults (/path/to/rootdirectory|filetypes|max file size|min file size) can be set in VM config. Extra tab is added.

Problems allready known:

1. When add to cart is in ajax mode the file attribute gives errors and does not upload the file. (you should turn off add to cart ajax)
2. Savecart does not work

To see any error message you better turn off add to cart ajax.
To turn off add to cart ajax mode, there is a file in the package called addtocart_form_no_ajax.tpl.php rename it to addtocart_form.tpl.php and replace it.
Or go to VM configuration->Site-> Layout -> (theme)configuration -> use ajax... no.

Update: 2008-08-04
Thanks to Nemesis02 version .13 and .15 is ready to use for VM 1.1.2, you can download them here or read his post (http://forum.virtuemart.net/index.php?topic=39666.msg140066#msg140066)and here (http://forum.virtuemart.net/index.php?topic=39666.msg140385#msg140385).

Update: 2008-08-01
ver.15 (for VM 1.1.0)
- should fix the price attribute problem, reported in this topic.
- does not have a fix for the "," problem reported in this topic, because to fix this would need a major change of the code and JK is still looking at this.
- has 2 new features sponsored by Ben Stovall, I have not tested it yet but will try to explain it in new reply(here (http://forum.virtuemart.net/index.php?topic=39666.msg139765#msg139765))

Update: 2008-06-12
- Should fix tax problem. When using tax, attribute price is shown incl. tax now.
In the syntax you still should use prices excl. tax.
- Should fix 'JHTMLBehavior' error

Update: 2008-05-16
Should fix child products problem.
Known issues:
1. File attribute type cannot be used together with ajax because ajax do not upload file.
2. Multiple attribute types cannot be used together with childlist display option : there will be conflict in field names between different children
3. Savecart cannot be used with attributes that need price calculations by given formula (such as cost/char etc.).

Update: 2008-05-12
ps_product_attribute.zip added, should fix the mandatory attribute problem.
Just overwrite the ps_product_attribute.php.
Bug reported by cer.

Update: 2008-05-10
Quantity add to cart fixed.
Bug reported by cer

Update: 2008-05-09
You can download version 2.11 now.
It has some small bugfixes and an option to enable/disable savecart in VM config.

Please report your problems/bugs as clear as possible.
And don't forget to donate (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=joseph%40expertcms%2enet&no_shipping=2) to JK!

Have fun!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mikeyt on December 11, 2010, 17:43:36 pm
I've updated the documentation for the cae hack as I found the orginal documentation quite difficult to follow and some parts were incomplete. Updates include:


At the moment it doesn't include the extra attributes found in the modified 'customattributesextendedwindow' and 'customattributesextendedsurface' packages but when I get a spare couple of hours I'll include them as well.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 11, 2010, 19:26:36 pm
Will this work with the latest version of virtuemart?
Thanks

Download the latest one from my site, that works.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 15, 2010, 20:01:07 pm
I've updated the documentation for the cae hack as I found the orginal documentation quite difficult to follow and some parts were incomplete. Updates include:

  • Attributes which were included in the original documentation but aren't now supported have been removed
  • Lots more examples (with pictures)
  • More detailed section on how attributes can be grouped.

At the moment it doesn't include the extra attributes found in the modified 'customattributesextendedwindow' and 'customattributesextendedsurface' packages but when I get a spare couple of hours I'll include them as well.
Thank you, I definitively will include it on the package.
Let's talk about later, I'm currently swamped, barely having time to breathe once in a while...
PS. would be nice if you could do a small thing for me - put me on the very end of contributor's list ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 15, 2010, 21:32:11 pm
Hi, I've installed the window-version of the hack and it looks great. But, when I add the code that let me add the measerument of windows (glass), I can't get it into my cart. Normal products with a price I can add. When I give the speial product a price, I can add it to, but it generates a price which would make me very happy. At least as a customer would like to pay the amount of $1,012,404.62 for a window 200 x 100cm.

What am I doing wrong? Is there anybody that can give me a hint with this information, or ask for information and I will try to get it.

Erwin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 16, 2010, 09:30:06 am
Did you set the multiplier part of parameters correctly? I suppose that you have the price per squaremeters, and dimensions in millimeters. See the txt file you got with the hack how to proceed in this case, it's solved, you just need to set it up correctly. I copy there the relevant part of the TXT:
Code: [Select]
the third part break downs as follows:
(100|100|1|18|10|16|25|14|100)
(default width|default lenght|limit1|price1|limit2|price2|limit3|price3|multiplier)
and works as follows:
[...]
multiplier is the range difference between used units. For example if for width and lenght you use centimeters and the surface limits are given in square meters the multiplier is 100.
If you use cm's for width/heighth and square centimeters for limits/surface units then obviously the value must be set to 1.
If isn't completed or by mistake is set to zero, then defaults to 1.
So, if you have the window sizes in MM's, then multiplier has to be set to 1000, and you will got real, good results.
Or leave it as is, and let's share the extra profit.I can use the extra amount  :P. And will put you on the contributor's list. ;)
Just kidding, of course.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 16, 2010, 10:15:38 am
I didn't put in the multipier, so I did right now. Unfortunally it didn't change a thing. I'm still getting the message "call for pricing". Another product I can add to the cart.
My code at this moment is:

Code: [Select]
Afmetingen (surface)(Hebt u onze inmeettips gelezen?|title-hover)(100|100|1|35|10|35|25|35|1000)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 16, 2010, 10:50:02 am
If you get Call for Pricing that means you have the product price set to zero. You need to set the product price in VM equal with the price for the base options - in your case the price of a 100mm*100mm windows.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 16, 2010, 11:25:21 am
So I enetered a zero as price and then I can add it to the cart, but the price is then zero.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 16, 2010, 11:37:50 am
Ok, when I alter the dimensions it generates a price. The price isn't correct, it's to much.
Suggestions?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: eleonoraz on December 16, 2010, 17:18:57 pm
Hi webgobe,
first of all thanks for your support.  :)

I'm asking your help because I'm having the same problem as patchkabel user.
Last year I realized a website using Joomla 1.5.9 and Virtuemart 1.1.3.
Everything worked fine with the Custom Attributes hack.

But...a couple of weeks ago my customer called me saying that the price calculation (controlled by the "Custon Attributes" hack) didn't work anymore.

It did really not work anymore, so as you suggested to patchkabel I downloaded from your website the latest version of the hack and replaced it on the server.

Yesterday I cancelled the previously set custom attributes and added new ones.
Everything worked fine but today...it isn't working anymore.
How is it possible?

You can check what I'm saying here: http://is.gd/iQPjP (http://is.gd/iQPjP)

The first selection ("Tipo di taglio") isn't working (but months ago the worked fine!).
I can select any option but it doesn't get calculated in the total.
The other options "Taglio di cm 200x:" and "Taglio di cm 400x:" are working fine, the get calculated in the total.

Have you got any idea? Please help me...I don't know how to solve it :(
E.

ps: I haven't changed or updated anything on the website since last year.
It was just like closed in a box until the customer called me...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 16, 2010, 20:41:12 pm
Ok, when I alter the dimensions it generates a price. The price isn't correct, it's to much.
Suggestions?
Send me an URL. Must see the admin backend later, probably, but for now I need to see the frontend, at least.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 16, 2010, 20:44:19 pm
Hi webgobe,
first of all thanks for your support.  :)
Since last year the hack has evolved a lot. Can you send me the custom attribute for the failing product?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 16, 2010, 21:02:37 pm
Quote
Send me an URL. Must see the admin backend later, probably, but for now I need to see the frontend, at least.

Ok, he url is www.helder -als- glas.nl   please remove the space in between, I've had the experience that in a website search a forum topic a higher ranking had than the actual site.
When you want password, I'll pm you. Just say it. I'm already very glad with your help, so thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: eleonoraz on December 17, 2010, 02:36:07 am
Hi webgobe,
really thanks for you prompt reply.

I'm attaching the screenshot for one sample product.
These are the same settings that worked fine until a few weeks ago.
In case you need further information please let me know.
Really thanks.
E.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 17, 2010, 08:33:14 am
Hi webgobe,
really thanks for you prompt reply.

I'm attaching the screenshot for one sample product.
These are the same settings that worked fine until a few weeks ago.
In case you need further information please let me know.
Really thanks.
E.
Eleonora, your case is simpler. I'm wondering why the product even worked before ;) because is a known conflict using the VM's own custom attributes and CAE attributes for the same product. You need to use one or another. The cause of the conflict is yet to be discovered, but is known allmost from the first days of the hack (you can search the forums and will find lots of messages about the issue).
To fix your problem, I recommend you to move all your existing attributes (Lista Attributi) to CAE attributes - it's simple. This should fix your problem.
Keep us updated!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 17, 2010, 08:44:04 am
Quote
Send me an URL. Must see the admin backend later, probably, but for now I need to see the frontend, at least.

Ok, he url is www.helder -als- glas.nl   
Ohhh, Mynxx hit again... I'm a big RocketTheme fan - I have developer account with them - but this is their worst ever product... The web is full with (especially) VirtueMart related problems.
OK, I suspect one more thing, you're absolutely sure, that you have overwritten everything?
And if you don't use the default VM template - and this is your case - you need to apply the hack to specific template files too.
In the pack, in Components directory you will find the files for the  "default" template.
Compare what you have in the components/com_virtuemart/themes/vm_mynxx directory with  the contents of components/com_virtuemart/themes/default directory of the downloaded package, add the missing files to components/com_virtuemart/themes/vm_mynxx , (this is the easy part) then check the existing files (wich are present in both folders) and apply the changes needed. Can be tricky, if you don't have previous experience with VM template files.
If you allready did that (and you're sure, that you did it correctly ;) ) send me the password!

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nht48823 on December 18, 2010, 18:44:17 pm
I'm new here, came across this thread while I was doing some research for rental component. Can this hack work for rental products, av equipment...??
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 18, 2010, 18:48:58 pm
Why not? It's all about your imagination and ingenuousity.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 19, 2010, 19:54:07 pm

Quote
then check the existing files (wich are present in both folders) and apply the changes needed
Do I also need to compare all the files in the subfolders? Or are there a view which I have to look at?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 19, 2010, 21:59:03 pm
When I switch to the default theme, it still doesn't work. Is that also caused by other files which have be adjused for mynxx? I'm already getting crazy from comparing files. I've bin wrestling before with fly- and browsepages, but in this case I don't know which changes are made by the hack and which by layout. So I find it hard to change the files. Perhaps Webgobe, you can give me some tips?

Thanks again!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 20, 2010, 08:45:15 am
If you just overwrite the files you have  with the files you find within the downloaded package - and you MUST to overwrite ALL - then should work. In most cases the problems are caused by incomplete overwriting of the files.
As for mynxx VM template: You probably need to hack 2 key template files, just compare these files with the ones from vm_mynxx directory, and made the required changes:
 components\com_virtuemart\themes\default\templates\product_details\includes\addtocart_form.tpl.php
\components\com_virtuemart\themes\default\templates\product_details\includes\addtocart_form_no_ajax.tpl.php
And copy the  content of components\com_virtuemart\themes\default\templates\product_details\includes\custom_attribute directory to the similar place. Should work.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: eleonoraz on December 20, 2010, 14:28:55 pm
Eleonora, your case is simpler. I'm wondering why the product even worked before ;) because is a known conflict using the VM's own custom attributes and CAE attributes for the same product. You need to use one or another. The cause of the conflict is yet to be discovered, but is known allmost from the first days of the hack (you can search the forums and will find lots of messages about the issue).
To fix your problem, I recommend you to move all your existing attributes (Lista Attributi) to CAE attributes - it's simple. This should fix your problem.
Keep us updated!

Hi webgobe,
really thanks.
I managed to solve the problem following your instructions.
I don't know how it could work before, anyway everything is working perfectly now!
Have a nice day,
E.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 22, 2010, 01:26:53 am
Quote
If you just overwrite the files you have  with the files you find within the downloaded package - and you MUST to overwrite ALL - then should work. In most cases the problems are caused by incomplete overwriting of the files.
Hi Webgobe, I've tried to get the hack running in default, before I'm getting into the files.It seems like that the customer have to pay 10 times so much. I've bin trying with the multiplyer, but that doesn't seem to work.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: motofzr1000 on December 26, 2010, 16:00:07 pm
Hi,

On the first page of this topic, in the changelog, there's mentionened:

Quote
•2008-06-12:
- Should fix tax problem. When using tax, attribute price is shown incl. tax now.
In the syntax you still should use prices excl. tax.

I enter my prices excl. tax, and when products are added to the cart, the prices show correctly (incl. tax). But on my product flypage, prices of custom attributes are shown excl. tax. So how do I get to show the attribute price incl. taxes?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on December 26, 2010, 16:33:02 pm
Hi Jurgen,

Do you have the taxes configured right in virtuemart-configuration? At the global-page?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: motofzr1000 on December 26, 2010, 16:57:25 pm
I suppose they're configured correctly.
Current settings are :


I've tried with different settings also, but I can't get the prices to show correctly on the flypage.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on December 27, 2010, 14:17:13 pm
A little xMas present for the community:
I added a new custom attribute to the pack, for room reservations in hotels, and upgraded two of existing ones, by popular demand ;) adding a bare-bones validation for the surface hack to allow only numeric values to be entered, and one fix for text and textarea type of attributes to filter out some exotic characters which where rendered unusable the hack if where entered in above fields. also thanks for contribution!!! the documentation in the pack is much improved!
Have fun!
Denes
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on January 08, 2011, 20:01:44 pm
Here's my code:

Printing Method(select)(Select a printing method|title-hover)(Solvent 360dpi
[+99.00]*,Eco-Solvent 720dpi [+129.00],Eco-Solvent 1440dpi [+149.00],Eco-Solvent 2440dpi [+199.00])(radiobutton:group1,Banner 440 gr/kvm);
Printing Method(select)(Select a printing method|title-hover)(Solvent 360dpi
[+119.00]*, Eco-Solvent 720dpi [+139.00], Eco-Solvent 1440dpi [+179.00])(radiobutton:group2,Banner 510 gr/kvm)

But when I choose an option, I get two lines with the same content in the cart:

Printing Method: Solvent 360dpi (+ £119.00) (+ £119.00)
Printing Method: Solvent 360dpi (+ £119.00) (+ £119.00)

And the price is £238.00

The more options I make - the more lines show up in the cart and the more prices in brackets are added to each line.

Can anyone help me with this?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 09, 2011, 18:41:25 pm
upload files is. but how to make a list of attributes for radiobox
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 10, 2011, 09:35:17 am
Hello everyone. Recently I was accused, that I'm trying to take credits for works done by others, and to hijack traffic to my site, by posting the hacks files on my site.
So, I decided to put the latest version there, and to remove it from my site. Also I'm considering stopping free support for the hack, hopefully someone else will pick up and continue. I'm supporting it practically alone for a year or so, and I invested lot of work in improving, extending and supporting it for free - just because I believe in the basic idea of Open Source movement to give back to the community, not just to benefit from it.
My job is done. Let's hope, others will invest at least that amount of time and effort in it, and the community will continue to use it undisturbed.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kasssim on January 10, 2011, 13:54:55 pm
thanks alot WEBGOBE!

works as stated!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tabbu on January 10, 2011, 14:15:16 pm
Weboge, should you be interested.

I would be willing to pay for the latest development for a donations blacnk entry feature that works alongside product listings.

And instructions on how to implement it.
Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 10, 2011, 17:36:28 pm
how to make a checkbox list attributes?
as the image

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 10, 2011, 18:32:17 pm
Short version: RTBM
Longer version: in the manual in the package you will find, in the page 10 the fully explaind syntax of creating a checkbox type attribute.
If you want more - as inversing the order of checkbox and the attribute name (Not sure, but I guess looking to the image you posted that you want to do that too), then you must manually tweak the "ps_product_custom_type_checkbox_selector.tpl.php" file, found in the components/com_virtuemart...../product_details/includes/custom_attributes/ folder.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 10, 2011, 18:58:30 pm
I hurried to the question. Later I found in pdf. But thanks.
 But how to disable the addition of vat?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 10, 2011, 19:04:23 pm
2 simple steps:
Enable in VM config the option to have multiple VAT's.
Set the product with VAT=0.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 10, 2011, 21:57:20 pm
where to change setting  the save uploaded files?
is now like this: YYYY-MM-DD- file name
I want to do: YYYY-MM-DD-time- file name

because the files uploaded on the same day with the same name replace old
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 10, 2011, 22:53:34 pm
topic is already well developed.
develops it further.
how to add to cart parent product
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 11, 2011, 08:40:25 am
1. Line 733 from ps_product_custom_type.php:
Code: [Select]
$save_file_name=date('Y-m-d').'.'.strtolower($file_name);2. You can't add parent products in the cart. Is VM limitation. (A logical one, if you ask me.)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 11, 2011, 17:20:13 pm
1. thanks
2. this is not possible to convert? I think that it's not only my problem
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 11, 2011, 21:34:27 pm
if you can make price-list in the attributes?
Example:
1-10pcs = 2$
11-20pcs = 1$
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 12, 2011, 08:47:59 am
The CAE can't do that - but this is a VirtueMart core capability ;)
Take a look there:
http://virtuemart.net/documentation/User_Manual/Product_Price_Management.html (http://virtuemart.net/documentation/User_Manual/Product_Price_Management.html)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 12, 2011, 18:48:15 pm
I know this function.
but: each product has different sizes at different prices. depend on the amount.
I do not want to make the products because you can not add the parent product
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 12, 2011, 20:18:16 pm
OK, then you need to think about some other solution, because the hack can't do this kind of arrangements. All price-related wizardry related to this account takes place in fact in the cart, and you can practically only add or substract amounts to the product's basic price. The only solution I see regarding your problem is to  build a new custom attribute to know the amount-related pricing trick, and to combine that with the VM's core pricing trickery.
Anyway, I don't see a simple solution here.
But it's something can be solved - with additional coding and some inventivity/creativity in use of the existing possibilities/features.
Would need much more concrete details on what you want to do, and what are your limitations - meaning what you can set up on other way you tried to do it until now.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on January 12, 2011, 20:29:58 pm
I can only add and subtract totals. the problem is that these sums are different for different quantities. How would equally increased or decreased with the amount that would not be a problem. but the but the increase or decrease for different amounts.

sory for english.


I'll show an example

http://www.superprzypinki.pl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=4&category_id=7&option=com_virtuemart&Itemid=1

see price table
Ø shows to choose from and the price is dependent upon the number of pieces. Price increases or decreases disproportionately to the price of home (ø55)

Title: Great Hack Webgobe!
Post by: p7edn1 on January 12, 2011, 22:20:56 pm
Hi Webgobe,

Hats off to you for creating such a great hack. I just wanted some information if this hack could create something like: https://www.yourimage2canvas.co.uk/secure/photos-to-canvas.php

Basically i wanted to allow customers to build their own product and choose images as attributes.

If so can you please email me as i'd like a quote thanks. In regards to the upload i wanted to use bixie upload and would it be possible to display attributes in tabs such as: http://www.vm-expert.com/virtuemart-expert-blog/86-showcase-product-attributes

Thanks in advance

Tariq

PS. open to any offers for help and obviously will pay thanks  :P
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 13, 2011, 10:04:36 am
I can only add and subtract totals. the problem is that these sums are different for different quantities. How would equally increased or decreased with the amount that would not be a problem. but the but the increase or decrease for different amounts.

sory for english.


I'll show an example

http://www.superprzypinki.pl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=4&category_id=7&option=com_virtuemart&Itemid=1

see price table
Ø shows to choose from and the price is dependent upon the number of pieces. Price increases or decreases disproportionately to the price of home (ø55)
I would do the following (and may work, I'm positive):
I would set up child products using the diameter as attribute, and use the progressive pricing capability for these childs, to set them prices according to the ranges you have in the table: a price for 1-49 pieces, another for 50-99 and so on.
And I would add SKU-s accordingly, for example if the parent product has SKU 3002, then the Ø25 child would be  3002-25 or something like that. I did something similar there:
http://www.kadkitchenandbedroom.co.uk/ (http://www.kadkitchenandbedroom.co.uk/)
There are lots of tricky products, worth surfing around a while.
This will solve your problem, I'm sure.
It's more work, than set up a product - 5 products instead one, and 6*4=24 prices, but does the job.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 13, 2011, 10:14:17 am
I just wanted some information if this hack could create something like: https://www.yourimage2canvas.co.uk/secure/photos-to-canvas.php

Basically i wanted to allow customers to build their own product and choose images as attributes.

If so can you please email me as i'd like a quote thanks. In regards to the upload i wanted to use bixie upload and would it be possible to display attributes in tabs such as: http://www.vm-expert.com/virtuemart-expert-blog/86-showcase-product-attributes

Yes, can be done. You need in fact customization of the flypage, wich can be done.
As for upload: why you want to use bixie's upload? I have nothing against, but there is incorporated a pretty good upload capability.
IM message will be sent for the private part!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: luckysoft on January 13, 2011, 13:32:22 pm
Hello all,
I have read all posts about this hack but can't find a solution to my problem :(

The problem starts when a product has two or more attributes, when i select one attribute and than hit the "add to cart" button it works well, but when I select two different attributes (not within the same attribute) i'm not able to add the product to the cart.

The stranged part is that it works the first time i visit the site, but after that no more :(

This is what i have done:

attribute 1(checkbox)(tip here|title-hover)(option 1 [+5.00],option 2 [+10.00]);
attribute 2(checkbox)(tip here|title-hover)(option 3 [+5.00],option 4 [+10.00])

When i remove the cookie from my browser i can select all the options/attributes and add the product to my cart once, after that i'm not able to, only if i select one or two options within the same attribute.

(http://www.mook-dekker.nl/afbeelding-web/Image4.png)

(http://www.mook-dekker.nl/afbeelding-web/Image2.png)

(http://www.mook-dekker.nl/afbeelding-web/Image3.png)

(http://www.mook-dekker.nl/afbeelding-web/Image1.png)

I'm really hoping someone here has a solution for me !
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 13, 2011, 14:34:10 pm
It's really weird.... I didn't meet this problem up to date... can you provide more details? Joomla/VM version, details about the hack - where you downloaded it from, and when? If you use the VM's default attributes, do you experiencing the same problem? or just with the attributes created via the hack?
And an URL, to test it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: luckysoft on January 13, 2011, 19:09:55 pm
Hello Webgobe, thanks for answering, there are more people with the same problem :( I've read several here.

My joomla version is 1.5.11 and VM is version 1.1.3 stable, I've downloaded the file customattributesextendedwindow.zip from http://www.webgobe.ro the day before yersterday.

The problem is only in the 'hack' attributes, if I combine several default attributes with one hackattribute it works fine, but one I add a second hackattribute it stops working :(

I'll PM you the URL because its not public yet.

Thank you so far


 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 13, 2011, 19:27:01 pm
OK, I'm curious.
One thing is sure: it's a known problem with mixing up VM's own attributes with hack's attributes, that's highly recommended, to avoid.
Second thing - the last version of the hack is attached there, try to use this. I was asked by one of forum's moderators to remove it from my site, and to post it there. Try to use this one.
I use the hack in many sites, sometimes with a very complicated combinations of attributes (you can find one example with couple of posts above), but I never experienced your problem, so, again, I'm really curious.


[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: luckysoft on January 13, 2011, 20:02:23 pm
 Too bad, i've installed the version you send me over the old one but still the same problem.

I also created a new product after installing the new hack (called new hack product) with this attributes:

Donate(checkbox)(Who do you want to donate to?|title-hover)(Widows[+5.00]*,Orphans [+10.00]);
Donate2(checkbox)(Who do you want to donate to?|title-hover)(nothing[+5.00]*,something [+10.00])
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 13, 2011, 20:14:24 pm
Did you overwrite EVERY SINGLE FILE?
Did you use the default template?
These are the most common mistakes...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: treki6 on January 14, 2011, 16:42:08 pm
Hey webgobe,

thanks for this hack update!

I have a question ...
 
I've already modifired a lot of my Virtuemart files to get it the right look and also to modificate some of the functions... The custom Attributes Hack is the last one I need...

Because of the recent modifications I don't want to simply overwrite the files with yours...

Is there any "HOW TO" about which lines I have to add to my existing files to get this hack worked?

All the best from germany
Mike
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 14, 2011, 17:23:41 pm
Hello, Mike!
At the very beginning of the original thread http://forum.virtuemart.net/index.php?topic=28192.0 (http://forum.virtuemart.net/index.php?topic=28192.0) is a post explaining the manual application - is more or less accurate still. You can use it as guideline. No better recipe is available.
Check the files from the package, upload the ones which aren't exist already on your site, and for the ones which exist try to follow the explanations there.
The code is slightly modified since, but the general guidelines are still usable.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: luckysoft on January 14, 2011, 20:53:38 pm
Did you overwrite EVERY SINGLE FILE?
Did you use the default template?
These are the most common mistakes...

Yes i did overwrite every single file, as you can see i'm not using the default joomla/VM template but thats no mistake.....
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 15, 2011, 13:58:05 pm
OK, then you need to hack the template you use too. See the files in the packages for the default template. There are the 2 add-to-cart template files you must hack manually using the ones for the "default", and you need to upload the rest of files in the corresponding directories of your template.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: p7edn1 on January 16, 2011, 01:30:29 am
Hi Denes,

Any joy on that price?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: luckysoft on January 17, 2011, 16:53:31 pm
OK, then you need to hack the template you use too. See the files in the packages for the default template. There are the 2 add-to-cart template files you must hack manually using the ones for the "default", and you need to upload the rest of files in the corresponding directories of your template.

Yes offcourse thats the first thing I have done, but it just doesn't work :(
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 17, 2011, 21:07:57 pm
Hmm, you - or your hoster - are definitively doing something wrong.
I double-checked the last 7 sites I worked on which are using the hack - and could not reproduce the error you have. To be able to help I need to see you site - inside out.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: taddy on January 19, 2011, 08:21:10 am
hi there guys i really need your help..

i cant make this work.

Name(number)(tip here|location)(default number|price);  <-- is this working?

because i added it but its not showing in the cart details. then its suppose to compute the price per qty right? but its not computing.. what have i done wrong? the other attributes are just working fine tho.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 19, 2011, 09:10:21 am
hi there guys i really need your help..

i cant make this work.

Name(number)(tip here|location)(default number|price);  <-- is this working?

because i added it but its not showing in the cart details. then its suppose to compute the price per qty right? but its not computing.. what have i done wrong? the other attributes are just working fine tho.
Humm, you should replace things there with real word variables, like
Code: [Select]
Number of things(number)(This is number of things you add to the product, priced 10 bucks apiece|title-below)(1|10);and you will got an attribute label saying "Number of things" with the tooltip below "This is number of things you add to the product, priced 10 bucks apiece" and a textbox with an 1 in it, behaving by adding to the base price of your product the price for an item (10 coins+your taxrate) multiplied with the number of items the users enters in the box. In the cart, if, let's say user entered "2", you will see something like:
Quote
Smaller Shovel
Size: big (+ $3.28)
Color: red (+ $1.09)
Upload 1: No File Uploaded
Number of things: 2 (+ $21.95)
and the price for the product at the end will be $48.26, resulted from adding to the basic price of the product ($21.94) the price of the other attributes: + $3.28+ $1.09+ $21.95.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: taddy on January 20, 2011, 12:28:23 pm
thank you very much for your reply sir. i kinda figure out the problem..

for example.. if i use 0 as the default value for the number it will not appear :-(

ex. Small Qty(number)(Please specify the qty for small shirts|field-below)(0|9.95);

if i use that syntax it will not compute and doesnt show in the cart details even if i specify a quantity during checkout :-( but if i use 1 as default it computes... can you tell me what is wrong with it? i really appreciate your help..

note: the site is for shirts and it will let customers specify the qty per size then virtuemart will compute how much it cost. qty x cost. please help..
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: chrissou17 on January 20, 2011, 12:41:13 pm
thanks for this hack update!
First sorry for my english i'm french

I have a question ...

The custom attributes are enregistered in the data base in vm_order_item.product_attribute  like a list but I want to add  one of custom attributes (is a  Date) in a specific way.i can i do this or can you explain me how can i recover the attribute ....
Not very clear.
Perhaps more simple .
I have 3 attributes
Jour(variable)(tool tip|tip location)(Jour|request||Pas de jour sélectionné!|readonly|text);
Date(date)(tip here|location);
Heure(variable)(tool tip|tip location)(Heure|request||Pas d'heure sélectionnée!|readonly|text)
When i click to change the date i want the date Post in an other textbox and so how can i have the name of the attribute.
Thanks a lot if some one understand what i want.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 20, 2011, 12:55:54 pm
thank you very much for your reply sir. i kinda figure out the problem..
for example.. if i use 0 as the default value for the number it will not appear :-(

note: the site is for shirts and it will let customers specify the qty per size then virtuemart will compute how much it cost. qty x cost. please help..
If you want the default value to not be set, you can use simply
Code: [Select]
Small Qty(number)(Please specify the qty for small shirts|field-below)(|9.95);
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 20, 2011, 13:03:14 pm
The custom attributes are enregistered in the data base in vm_order_item.product_attribute  like a list but I want to add  one of custom attributes (is a  Date) in a specific way.i can i do this or can you explain me how can i recover the attribute ....
Not very clear.
Perhaps more simple .
I have 3 attributes
Jour(variable)(tool tip|tip location)(Jour|request||Pas de jour sélectionné!|readonly|text);
Date(date)(tip here|location);
Heure(variable)(tool tip|tip location)(Heure|request||Pas d'heure sélectionnée!|readonly|text)
When i click to change the date i want the date Post in an other textbox and so how can i have the name of the attribute.
Thanks a lot if some one understand what i want.
Humm, I guess I know what you want...
I see two interpretations of your problem:
A. You want to use the collected attribute's value in the same form. This is the simpler case ;)
The problem is that there are created dynamically form elements, and you need to recover and reuse one of them to calculate another form element's value - I guess that's what you have.
I guess you need to use JavaScript to do that. You can find a lot of examples in the hack's files!
B. You want to use the collected value later, on another page, and you need to retrieve it from the database... Humm, is trickier, but still can be done.
The value you collect aren't stored in the product's table!!! There is stored only the logic needed to build the form. You need to search for the values collected on the Orders table - if the order is submitted - or in the cart variable, if the product is just placed in the cart.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: taddy on January 20, 2011, 13:03:57 pm
@webgobe - sir you are an angel! thank you very much! it finally works!!!! :D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: chrissou17 on January 20, 2011, 14:16:55 pm
I thank you for the rapidity .
Ithink that the first solution can help me
A. You want to use the collected attribute's value in the same form. This is the simpler case
The problem is that there are created dynamically form elements, and you need to recover and reuse one of them to calculate another form element's value - I guess that's what you have.
I guess you need to use JavaScript to do that. You can find a lot of examples in the hack's files!

Last question do you know where i have to look (for the hack's files)
Thank's a lot
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 20, 2011, 14:30:51 pm
/administrator/components/com_virtuemart/classes/ps_product_custom_type.php
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bl1m on January 24, 2011, 01:25:22 am
Hello!

At first i have to say this hack is a great work!
I've just a small problem to put the configurated article into the basket.
If i use one attribute, for example "delivery date(date)(|)" it works perfect. But if i use two attributes i cant put the article into the basket. In firefox i get asked to download the index.php file. In IE i got a timeout. im hopeless helping myself :/.
Hope you can help me!
My installation: Joomla 1.5.22 and Virtuemart 1.1.5 (also tried 1.1.6)
My Custom Attributes:

Gewünschter Liefertermin(date)(|); Auflage(select)(|)(1000, 2500[+5],5000[+7],10000,15000,20000,25000,30000,35000,40000,45000); Format(select)(|)(DIN A6 - 105x148mm);Papier(select)(|)(170g/m2 Bilderdruck,170g/m2 Bilderdruck,250g/m2 Bilderdruck,300g/m2 Bilderdruck,400g/m2 Bilderdruck, 260g/m2 Kunststoff-Folie, 250/m2 Offsetpapier,300/m2 Recyclingkarton); Farben(select)(|)(4/4 färbig Euroskala,4/0 färbig Euroskala); Proof(radio)(|)(Ja, Nein); Datencheck(radio)(|)(Ja, Nein)

thanks in advance
best regards, erwin

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tomasz_pol on January 24, 2011, 22:36:18 pm
Hello!

At first i have to say this hack is a great work!
I've just a small problem to put the configurated article into the basket.
If i use one attribute, for example "delivery date(date)(|)" it works perfect. But if i use two attributes i cant put the article into the basket. In firefox i get asked to download the index.php file. In IE i got a timeout. im hopeless helping myself :/.
Hope you can help me!
My installation: Joomla 1.5.22 and Virtuemart 1.1.5 (also tried 1.1.6)
My Custom Attributes:

Gewünschter Liefertermin(date)(|); Auflage(select)(|)(1000, 2500[+5],5000[+7],10000,15000,20000,25000,30000,35000,40000,45000); Format(select)(|)(DIN A6 - 105x148mm);Papier(select)(|)(170g/m2 Bilderdruck,170g/m2 Bilderdruck,250g/m2 Bilderdruck,300g/m2 Bilderdruck,400g/m2 Bilderdruck, 260g/m2 Kunststoff-Folie, 250/m2 Offsetpapier,300/m2 Recyclingkarton); Farben(select)(|)(4/4 färbig Euroskala,4/0 färbig Euroskala); Proof(radio)(|)(Ja, Nein); Datencheck(radio)(|)(Ja, Nein)

thanks in advance
best regards, erwin

Hi bl1m. Have you found a solution? I've got the same problem. When I have one custom attribute in product I can add it to cart but when I have a product with at least two custom attributes, there is an "Unable to connect to database" error or prompt to download index.php file.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 25, 2011, 09:08:14 am
Humm, you guys are doing something wrong. To find what is the problem, I should have a chance to examine both your settings and your install. The hack, correctly installed and configured works well in the conditions you described, here's the proof of concept: http://www.kadkitchenandbedroom.co.uk/ (http://www.kadkitchenandbedroom.co.uk/), here are products with 10+ custom attributes too - and are working smooth.
On my testbed site (Joomla 1.5.22, VM 1.1.6) the code posted above by bl1m works without any problems, so the cause of your problems is not the hack itself, but something you are doing - or aren't doing...
Just a short recap:
1. You need to OVERWRITE each and every file already found  on your server with the files found in the package
2. You need to use the "default" template - or to replicate the hacks on your VM template's corresponding files.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tomasz_pol on January 25, 2011, 10:08:35 am
I found a solution.

in file administrator/components/com_virtuemart/classes/ps_product_attribute.php

around line 1096

comment this:
Code: [Select]
$_SESSION['charge'][$d['prod_id']]=$charge;to
Code: [Select]
//$_SESSION['charge'][$d['prod_id']]=$charge;
Don't ask me why, but it worked for me.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 25, 2011, 10:27:27 am
And the cart works as expected? Correct amounts are added?
That line isn't introduced by the hack.... it's part of core VM syntax...
May work, I din't had the time to test your solution throughly yet, but that line was there with purpose.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: tomasz_pol on January 25, 2011, 10:41:55 am
For now it works. Values are correct even when i change quantity. If I observe some errors I let you know.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bl1m on January 25, 2011, 11:08:27 am
Hello Tomasz!

it works for me 2! thank you.
The correct amount is added in the basket and if i change one attribute it makes a new position in the basket.

i have the installation in a subfolder on the webserver, not in the root folder. could it be, putting the web into a sub folder, makes the main problem i had?

best regards, Erwin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: garwoodengear on January 27, 2011, 02:18:09 am
Hi webgobe, I have downloaded your hack in FTP to the corresponding files and I have produced a new product in VM admin. As I was setting it up I didn't see anything different in regards to this hack (custom attributes).

When I clicked on save, I get this error message, I have had a look at the file, but not knowing what it should be I can't tell if it's not right.

Warning: Invalid argument supplied for foreach() in /home/heart/public_html/testsite/administrator/components/com_virtuemart/html/product.product_form.php on line 894


Also from the front end I got this message when I clicked on a product in the 'Timber Sign Shop':


Fatal error: Class 'ps_product_custom_type_' not found in /home/heart/public_html/testsite/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 91


Links to sites
We have a working live site at
www.engravedtimbersigns.com.au,
where everything is working,  and we have a test site where we are testing this hack first, at
www.engravedtimbersigns.com.au/testsite.
Just putting in the hack you can see the difference it has made in the shop - house - rectangular house signs, and when you click on a product.

Any help would be greatly appreciated, as this hack looks great when working on other sites shown through the thread and it seems exactly what we are looking for. Thanks

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 27, 2011, 10:07:24 am
OK, will check it, must be a minor issue!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on January 27, 2011, 10:25:07 am
http://www.engravedtimbersigns.com.au/testsite/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=45&category_id=16&option=com_virtuemart&Itemid=116 (http://www.engravedtimbersigns.com.au/testsite/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=45&category_id=16&option=com_virtuemart&Itemid=116)
So, the hack is basically working (there is a minor problem with some attributes, but with FTP access I will find and fix them).
The problem is, that the attributes are mandatory, even if they are empty.
You used
Code: [Select]
Font;
Motif One Number;
Motif One Description;
Motif Two Number;
Motif Two Description;
Wording;
The correct syntax is
Code: [Select]
Font(select)(|)(Arial,Times,Verdana);
Motif One Number(number)(|)(|);
Motif One Description(textarea)(|)(||);
Motif Two Number (number)(|)(|);
Motif Two Description(textarea)(|)(||);
Wording (text)(|)(||)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bl1m on January 27, 2011, 23:19:42 pm
Dear Webgobe,

I know I am very annoying. But I need ya help one more time.
Im usin your version Custom Attributes Extended Window. I need this cause i wanna configurate a banner with width and height. If i put the configurated product into basket it shows the correct price/amount. but if i refresh the basket, the configurated price/amount is gone and was replaced by the standard price/amount.

Would be very nice if u could take a look on my site (will send you the URL via pm)

Best regards Erwin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: rustyboy on February 06, 2011, 15:02:42 pm
I overwrote all files with latest CAE, but don't see what to do next. Do I have to edit any files? All I want at the moment is the donation field so customer can enter custom price. Is my virtuecart installion too new (1.1.6)?

Sorry if this is a simple question, I read through many pages of this thread but too many of them.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 07, 2011, 08:09:03 am
No, you don't need anything else, just to insert the right custom attribute code into your product.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: rustyboy on February 08, 2011, 04:02:21 am
Thank you. I'm making progress. I found the section "Product Status" under the product I am editing. At the bottom is the "Custom Attribute List" and "Examples for the Custom attribute List Format:Name;Extras;...".

I've searched based on these words and it sounds like there is a manual with examples. Where would I find that? As I said I just want a donation field where the customer can enter in an amount.

I read how you have worked for free. I made a donation to say thank you. I can't give back to the community the way you have so a donation to you and others in open-source land is the least I can do.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 08, 2011, 08:34:27 am
Thank you!
Download the hack from this post:
http://forum.virtuemart.net/index.php?topic=39666.msg265696#msg265696 (http://forum.virtuemart.net/index.php?topic=39666.msg265696#msg265696)
You will find the documentation inside, with examples.
What you need is something like:
Donation(price)(please enter donation|title-below)(10.00|+);
To be entered in the Custom Attributes box.
Let me know, if you have any problems!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: rustyboy on February 08, 2011, 18:36:30 pm
It's working. Thank you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on February 15, 2011, 23:34:09 pm
Can I somehow set a minimum starting price for surface attributes? So that if a customer orders less than one sq.meter it may set the price for one sq.m???
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 16, 2011, 06:57:04 am
Read the Readme in package ;) The attribute was built with this in mind. The default values are acting as the minimum charged. If user asks for less, will be charged with the price of the default surface, regardless to the exact dimensions ordered.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: kotekmk on February 24, 2011, 10:13:24 am
if you can read from a file to the list of attributes?
I need to change the price and improve in all products.
loaded from a file I just changed the file
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on February 24, 2011, 10:26:15 am
You try to do a mass update? CSV import?
Igf you want that, the answer is yes, it is stored in the VM database as any other product element.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on March 07, 2011, 22:17:34 pm
Hi Webgobe,

I thought everythmng was working correctly, but.... when I add a item to the cart the taxes are not correct, the amount is to low.

I tried to add a extra product for testing without the hack, as far as I know the tax config is correct. But there's no tax at all added.

Suggestions?

Greetz Erwin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 08, 2011, 08:39:17 am
You're the first reporting something like this ;) The hack does not interfere in ANY way with the tax calculation, so it's an unlikely cause of your problems, but, of course, we can`t exclude from the list of possible causes ANYTHING "ab ovo"/
So, without seeing the site  my only suggestion is: show it to me! (including the backend).
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: sliver on March 08, 2011, 17:54:19 pm
Hi,

I'm new at this forum, started in VM a few weeks ago.
I'm have two questions/problems.

I'm working in a project called Portugal4fun that is a online ticket store for activities like boat trips, horse rides, and so on...

So the first problem I'm having using this hack for VM is that I can't get the Date picker correctly. I've uploaded all the files in the RAR file to the correct directories and I have VM 1.1.5 and Joomla 1.5.20

I put this code "Date Modified(date)(Enter when the file was last modified|titlehover)( 2010-08-22|) " in the Custom Personalized List at bottom of the status tab of each product and all I get is this as you can see in this nest link as an example.

http://www.portugal4fun.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=18&category_id=1&option=com_virtuemart&Itemid=60&lang=enhttp://www.portugal4fun.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=18&category_id=1&option=com_virtuemart&Itemid=60&lang=en (http://www.portugal4fun.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=18&category_id=1&option=com_virtuemart&Itemid=60&lang=enhttp://www.portugal4fun.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=18&category_id=1&option=com_virtuemart&Itemid=60&lang=en)

The second problem is about if is possible to disable some specific days in the calendar. For example for a boat trip they only make their trips at mondays and thurdays and I need to garantee that the web site's client doesn't pick a boat trip in a wednesday for example.
Is it possible to do this?

Regards.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: krofeta on March 10, 2011, 22:52:43 pm
Is there a version for Virtuemart 1.1.7 ?
I am willing to pay someone to upgrade.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 11, 2011, 08:51:41 am
You can use it with 1.1.7, there are more sites using it with 1.1.7 without reported problems. I don't have currently the time to do the upgrade. But It's planned, along with upgrading the documentation, adding to the "official" release the latest developments, etc.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: p7edn1 on March 12, 2011, 14:15:28 pm
Hi there

I'm trying to use the surface hack however I'm encountering a problem. Whenever I enter 100cm 100cm it doesnt display a price and just adds the item to cart.

The code i'm using is: Banner (surface)(Some nice tip to be shown|title-hover)(10|10|1|35|100|35|250|35|100)

I just want to charge a default £35 per 100 square cm's.

My link is: http://bespokewalls.com/Beach-Scapes/1844056W.html

for anything over 100cm x 100cm the price is right.

Any help would be appreciated.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 14, 2011, 08:30:37 am
Humm, let me repeat the part of the instructions you may missed:
"The price of the product needs to be set to be equal with the price for minimal surface"
I know it's redundant - because you need to set this price in the attribute's parameters too, but it works this way.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on March 14, 2011, 09:43:14 am
Hi,

How can I do to have a data sheet for ordering:

Variable 1: bitrade
Variable 2: slot
Variable 3. month

(see attached picture)

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 14, 2011, 09:57:29 am
Closest to what you need done with this hack is there:
http://www.druckstadt.de/produkte/bannerdruck/planenbanner/200-x-80cm
Check with site-owner, was a common effort done with him, he did most of the tabular output.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on March 14, 2011, 10:06:24 am
wonderful!!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Marco on March 14, 2011, 11:33:47 am
You can have this:

URL: index.php?prezzo=9.99

in

Prezzo(price-r)(|)(x.xx|+)

(x.xx = variable ?prezzo=9.99)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 14, 2011, 11:48:56 am
You mean passing variables to VM via URL? No, I don't think so, the hack isn't prepared to take variables from URL and to process them.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gegemon on March 18, 2011, 11:05:50 am
Help please.
After applying this hack box for entering additional properties expands beyond the screen.
how to fix this problem?
_http: / / www.tehland.ru/136-profi/1434-brifing-pristavka-s-oporoie-art.463.html
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 18, 2011, 11:24:52 am
There are some hardcoded CSS styles in the Select attribute. Try to track down wich one is conflicting, and feel free to hack the hack - these codes are still here due historical reasons, I plan to drop them on the next major release, wich is planned, but delayed because lac of time.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 21, 2011, 12:08:23 pm
Hi, thanks webglobe for maintaining this great hack!

I have a problem when using the -r option.  When using -r, an error message is displayed when the field is left blank - so far so good. 

However, if I then enter something in the field and add to cart, nothing is added to the cart.

An example of this happening can be seen here:

http://www.freshpage.co.uk/martindare.co.uk/products.html?page=shop.product_details&flypage=flypage.tpl&product_id=52&category_id=40

I've noticed that after the initial validation failure the URL is changed to /index.php which may be causing the problem.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 21, 2011, 13:56:20 pm
Can't access the page... but the -r should work.
Anyway, that's one of the oldest parts of the hack, done much before I arrived to the project. If I can examine tour site probably will be able to provide you a way to fix it.
PS. - the "index.php" is a core VM "feature", shouldn't influence things here.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 21, 2011, 16:09:06 pm
Sorry about that!  Site is online now.

A bit more info: the key to the problem is that after the validation failure, the number of items in the "quantity" field is set to zero.  Not sure what's causing that though.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 21, 2011, 17:50:03 pm
Still asking a password ;)
Aha, good clue! What exact attribute you are using? there aren't 2 attributes coded similarly LOL
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 21, 2011, 18:37:31 pm
Definitely login free now!

I've tested with text and textarea attributes

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 21, 2011, 19:32:49 pm
I have a question for anyone who can help pleeeease.  I have been using this hack on a few sites and it works great but I have run into something I don't know how to fix.

If I try to give a price of (+1000.00) it turns into $1.00.  It also turns into $1.00 if I use (+1000).  (+999.00) works just fine but this fundraiser is all set up with promotional goods printed, etc. I can't do $999 and this item needs to go live this week.

Any ideas?  Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 21, 2011, 19:48:11 pm
You're using the latest version? The problem has been fixed at least 6 months ago.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 21, 2011, 20:02:11 pm
I am using vm112_custom_attribute_extended_2.15.zip.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 21, 2011, 20:17:01 pm
That's older than the Road66 ;) search for a recent link - I guess a page or two above.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 21, 2011, 20:58:20 pm
This download link is from Jan 13th which I think is the latest:

http://forum.virtuemart.net/index.php?topic=39666.msg265696#msg265696
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 21, 2011, 21:56:50 pm
Thank You! ;D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 22, 2011, 13:19:53 pm
There is a bug in ps_product_custom_type_header.tpl.php

$custom_attr .= "<br /><span class=\"tip\">". $custom_attr['attr_tip'] ."</span>";

should be

echo "<br /><span class=\"tip\">". $custom_attr['attr_tip'] ."</span>";


Code: [Select]
// Show Tip Below Title
//if( ($custom_attr['attr_tip_position'] == 'title-below') && ($custom_attr['attr_tip']) ){
    $custom_attr .= "<br /><span class=\"tip\">". $custom_attr['attr_tip'] ."</span>";
//}
echo "</
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 22, 2011, 13:42:09 pm
Thank you! Will include in the next release. (hopefully in a couple of days)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Phenotype on March 22, 2011, 17:54:42 pm
Sorry to be a pain but did you get a chance to look at the problem of validation failure causing zero quantity to be displayed?  You might be able to spot the problem in 20 seconds before I spend hours looking into it!

Here's the URL again:

http://www.freshpage.co.uk/martindare.co.uk/products.html?page=shop.product_details&flypage=flypage.tpl&product_id=52&category_id=40
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 22, 2011, 19:01:41 pm
Weird... I can't reproduce the problem on my testbed...
Maybe a peek into the backend may clarify what you're doing wrong...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: gglm on March 22, 2011, 23:50:58 pm
Hi webgobe. Thank you very much for this great hack. It saved me a great deal of time and works beautifully.

I have one small question, maybe you can help me with some advice. I have a site that sells ads in newspappers (i have a lot of fields (atributes) on the product page ) so I need a bit of complex computing to do to obtain the final product price. I have no problem writing a custom php function for that, but i just don't know where to put it.

So my question would be where exactly (in what php file) could i insert a call to my custom function that outputs a total based on the custom atributes, and that total overwrites the product price. I tried ps_product.php, function get_adjusted_attribute_price, but it always writes 0 in the cart, even though i told it to "return $myvalue" :(. I basicaly want to replace that part of the code that gets the price based on atributes and input my own total.

Again thank you so much for your time and this hack!


Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 23, 2011, 08:48:27 am
Hmm, the problem I see there is that CAE hack does not doing final price calculations by itself, "just" piggybacks on the VM's own attribute system and passes attributes to the cart. In fact all the price calculation wizardry takes place there, in the cart.
So, that's not the way to go.
But you can try another approach. If you download the latest version, you can see that there are couple of new attributes added, like the Pizza or the Reservation which have the germs of the solution you may try to implement.
The ideea basically is, that there are couple of attributes "chained", the value of one attribute is depending on user's previous choices, and only one, combined attribute is passed to the cart.
The trick relies on using hidden inputs, populated by JavaScript code to set and read them. The entire wizardry is coded into the ps_product_custom_type.php file.
Hope, this helps!
If you got any results, I would be happy to include it into the hack. Unfortunately I'm overbooked, so momentarly I cant offer myself to volunteer here - even if I'd like too. Sounds like an interesting challenge ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on March 23, 2011, 22:52:56 pm
Hi,

I'm still having a tax-problem. When I enter a price (excl. tax) in vm and in the hack there's:

Afmetingen (surface)(Hebt u onze inmeettips gelezen?|title-hover)(100|100|0.01|35.00|10|35.00|25|35.00|100000)

The result isn't right, it will add the calculated price to the initial price. When I set the initial price to zero, then the tax isn't calculated correctly. Products without using the hack will calculate the tax correct.

Suggestions are more then welcome.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 24, 2011, 04:49:00 am
It is no longer older than Road66... thanks, the 4 digit numbers are working now!

But, I have another annoying question. This is not working for me in vm 1.1.7 :(

 Donation(price)(|)(100.00|+);

I did a quick scan of 63 pages and did not find an answer. Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 24, 2011, 06:32:15 am
Rolled back to vm1.1.5 since it works in another site that is 1.1.5 and I don't think that was the issue. Set Use Ajax to add, update or delete products from the cart to NO and the donation field amount entered finally shows in the minicart but not the cart. Additionally, when you add to cart without the ajax I get a blank content area. I can only get to the cart page by clicking the mini cart.

I took this site over from another designer. I am at my wits end.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 24, 2011, 09:42:20 am
Rolled back to vm1.1.5 since it works in another site that is 1.1.5 and I don't think that was the issue. Set Use Ajax to add, update or delete products from the cart to NO and the donation field amount entered finally shows in the minicart but not the cart. Additionally, when you add to cart without the Ajax I get a blank content area. I can only get to the cart page by clicking the mini cart.
I took this site over from another designer. I am at my wits end.
Hmm, must be something very weird with that site. On my testbed with VM 1.1.7 and Joomla 1.5.22 your code works fine with or without Ajax, shows up correctly everywhere. May be other hacks already applied??
The fact that the Ajax-less cart  option leads you to an empty page pushes me to ask you:  do you use some other template for VM, not the default one, and the template files aren't hacked correctly? Smells like something is fishy there.

PS. We all know that one of shittiest jobs out there is to pick up and continue work began by someone else. Condoleances...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 24, 2011, 10:05:34 am
Hi,

I'm still having a tax-problem. When I enter a price (excl. tax) in vm and in the hack there's:
Apologies for being redundant, here's what you can find in Readme:
Code: [Select]
The extra attribute's syntax for surface calculation is simple:
Banner (surface)(Some nice tip to be shown|title-hover)(100|100|1|18|10|16|25|14|100)
Where: Banner is the freely replaceable name of the attribute - you need to have something there ;)
(surface) is the type of the attribute, this must remain as is
 (Some nice tip to be shown|title-hover) is the tooltip text as per original syntax, first part is the tool-tip, second id the placement (where will be shown).
the third part break downs as follows:
(100|100|1|18|10|16|25|14|100)
(default width|default length|limit1|price1|limit2|price2|limit3|price3|multiplier)
and works as follows:
You need to set the product price to be equal with the price of minimal surface - 18 monetary units for example (for example euros - the base currency for the product) , not necessary 18 to match the price1 in the example above.
Default width and length are used to pre-fill the boxes. For normal operation of the hack the values should not be zero these are in centimeters, so it's recommended to pre-fill them with some minimal sizes
limit1 is the first step, in meters. All sizes below that are charged with the original price - this case 18 euro. Price1 is the price to use for sizes between limit1 and limit2 - this time the same 18 euro - can be different for default.
limit2 is the second step, price2 is applied for sizes between limit2 and limit3.
limit3 is the last limit, price3 is applied for all sizes above limit3.
multiplier is the range difference between used units. For example if for width and length you use centimeters and the surface limits are given in square meters the multiplier is 100.
If you use cm's for width/height and square centimeters for limits/surface units then obviously the value must be set to 1.
If isn't completed or by mistake is set to zero, then defaults to 1.
I can add to the above, that the final price is calculated this way:
The original price + the price for the surface above the minimum dimensions
So, if you have set as per above the minimum sizes as 100/100, and user enters 100/101, then the price is caculated as:
18 euro for the minimal/default size + the price for the exceeding 100 square centimeters calculated using the price1 - the same 18 euros in the above example, but that should not mislead you. The price for exceeding surface can have any value (the minimal surface is 100*100 = 10.000, the actual surface is 100*101=10.100, the exceeding surface is the difference between).
I must emphasize, seemingly, on the fact that the original price of the product IS THE PRICE OF THE MINIMAL SURFACE!
Users will be charged with this value, even if they order smaller items.
The taxes are applied IN THE CART, to the total amount resulted - and tax calculation has nothing to do with the hack.
You may expect something else, but, as one of my first bosses used to say, computer programs tend to work as they where coded, and not as you may expect them to work. And THIS hack works THIS way. And works well in couple of really big sites (the shop for which was written sells over 1000 different items), and nobody has complaining about loosing business or money because the hack does not do the job was written to. But nothing is perfect, not even me.
Everyone is invited to write a better version... I have nothing against. 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 24, 2011, 16:59:12 pm
Thanks for the reply webgobe,I am using the default vm template and I have wiped out vm and reinstalled it fresh including plugins and modules. I reinstalled the hack and still the same thing so it is somewhere else, I am stumped.  This site has been one can of worms, every simple task has turned into the unveiling of chaos.  I have quite a few Joomla sites and I have never seen the likes of this.

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 24, 2011, 18:07:21 pm
Yes, then you have some stupid conflict with something else on the site... because I'm absolutely sure than the trick works withouth issues on a plain Joomla+VM site. In past 6 months more, than 800 downloads for the hack where recorded, and nobody reported similar issues... Oh, my gosh... may be as simple as some wrongly set up access rights ending with script conflicts. Check if you have the mootools upgrade plugin enabled or not. if it's enabled, try to see what's happening if you disable it. Recently I had a weird (similar) issue with that plugin and VM. But may be something else, another things on the site may conflict with various VM parts...
This attribute does not uses any special trickery, so if you have problems with this in the above circumstances, you surely have problems with adding classic VM attributes to a product too.
 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: StrakOntwerp on March 25, 2011, 01:53:01 am
Hi all,
I have a question for a clothing webshop I'm working on. The attributes I have are product (mens shirts or woman shirts), size and color.
I'm trying to get the image to change when I change the color or the product.
Is this possible with Custom Attributes Extended and if yes, how?
Thanks alot!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 25, 2011, 04:39:07 am
Oh I have no doubt the hack works I use it on my own commerce site. In fact I tested the syntax for the non working site on my working site and it works like a charm there. If I enable mootools upgrade i get an internal server error when adding to cart. If I use one attribute at a time it works, two or more and I get a dead add to cart button. donate function turns into zero at the cart but not the mini cart module. non custom attribute items are fine. All items added to cart must be done with ajax on or i get to a blank screen. I have disabled everything unnecessary but jm rockettheme html calls some stuff and has some js stuff commented out (As I recall, I think). My head is spinning. I will try permissions but after that I think I am out of my scope of understanding. I have no clue what the heck. This site is like a teenagers room. There is form and function in there somewhere but there is so much stuff piled on top.  Thanks for all your help and direction.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2011, 09:29:11 am
Is this possible with Custom Attributes Extended and if yes, how?
Not "per se", you need to hack the hack to do it. It is possible, but you need to make your hands dirty with some JavaScript.
But if you ask me, for this kind of setup I would go another route, or using parent-child products like there:
http://www.topratediamonds.com/new/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=122&category_id=7&option=com_virtuemart&Itemid=53 (http://www.topratediamonds.com/new/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=122&category_id=7&option=com_virtuemart&Itemid=53)
or using product types, like here:
http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.browse&category_id=4&Itemid=53&vmcchk=1&Itemid=53 (http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.browse&category_id=4&Itemid=53&vmcchk=1&Itemid=53)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 25, 2011, 09:30:44 am
but jm rockettheme html calls some stuff and has some js stuff commented out (As I recall, I think).
Don't tell me, that is RT Mynxx... I love RT!!! but I HATE Mynxx...
Let me know if I can help in any way, would be happy to do it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on March 26, 2011, 12:27:30 pm
Hi Webgobe,

I've bin trying for a couple of evenings, but I'm still doing something wrong. I just can't get it right.
At this moment I've entert the following code:

Afmetingen (surface)(Hebt u onze inmeettips gelezen?|title-hover)(500|1000|1|18.75|10|18.75|25|18.75|1000000)

500|1000 for minimum 1/2 square meter
18.75 price per 1/2 square meter
1000000 multiplier from mm to m

Initial price is also set as 18.75

When I order a window 2000x1000mm, so 2 square meter, I will be billed for 21,31 including tax. This must be 75 excl. 19% tax.

Can you tell me what I'm doing wrong?

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 26, 2011, 19:26:33 pm
OK, I see where I was wrong - and where You where wrong here ;)
First of all, my fault. I was not very clear on, that the prices in the attribute's argument list MUST BE the prices for the surface units - so for example square meters if you use metrical system in your shop. Not for the minimal surface, as you did. Here's my biggest error, one of my messages potentially misleaded you - and others alike. My apologies.
Also I may not was clear enough on the fact, that EVERYWHERE in the CAE extended hack argument list you must set NET prices (prices withouth tax.)
Third mistake I may be made guilty of is that there are couple of variants of the hack, on the older variants indeed you should add for the multiplier 1000000 if you want to use millimeters, but sometimes in late september I corrected this, and now the much more natural figure of 1000 should be used. This is in the readme attached to the hack, and soon will be included in the upgraded documentation to.
So, having the above in mind, and presuming that the 18.75 was the price WITHOUTH tax for the 0.5 square meter - the initial price of the product, your code should look like:
Code: [Select]
Afmetingen (surface)(Hebt u onze inmeettips gelezen?|title-hover)(500|1000|0.5|37,50|10|37.50|25|37.50|1000)And this code will give you the right price. (note, that the first surface step's value isn't 1 square meter - but the surface of the minimal size, 0.5.)
If the 18.75 was the price including tax, then you need to update the prices above accordingly.
Title: Converted Custom Attributes Extended Hack 2.1 - where is the most recent version
Post by: webgobe on March 26, 2011, 19:28:28 pm
Some of the confusion regarding this hack is created due the fact, that nobody really knows, which is the last version of the hack, since I unpublished it from my homepage, and posted it here as an attachment following the dispute I had with one of global moderators.
To eliminate this, I will republish the hack on my homepage, and will add a link to it in my signature. Hopefully this won't start again a dispute, because I never claimed, that I'm the sole author of the hack, and I have giving full credit to ALL contributors now and everytime.
But since I'm the sole person still supporting the hack, and from the more, than a half of existing attributes are the result of my work, I think I can't be accused of hijacking other's work by posting it on a single, easy to access and to locate site, reducing the confusion and made it easier to support in the future.
So, here's the list of contributors once again:
• Barnett - original J1.x version
• Joseph Kwan (JK) – port to J1.5
• Nemesis02 – port to VM 1.1.2
• Cer – error reporting
• Ben Stovall – groups
• Ruppert – Documentation
• Mike Taylor – Documentation
So, fellow contributors, if any of you have anything to say related to the above, let me know, I will try to find a solution to make happy everyone. But the current situation is leading to a chaotic "ecosystem", and ever with my determination to keep supporting this hack FREE OF CHARGE, and to made public ANY new developments slowly made it a chore to do it. If none of you contacts me with their observations/ideas I consider, that you agree with the solution chosen by me.

 
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on March 26, 2011, 23:09:23 pm
Ok, I've tried the previous. I do not find it interesting who's fault something is. I'm already glad when its working and somebody is willing to help me ;).
With the previous code set, I set a initial price 37,50 and to 18,75 and to zero (indeed wihout tax). Then the calculated price isn't right in all cases.
I'm using mynx, I know, I know, but i have manually overwrite each file. In he backend you've checked it, previous. I don't know which hackversion I'm using at the moment. I was starting with it in december and have used the newest file from your website.

Do you have more suggestions?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueargylemedia on March 27, 2011, 19:58:14 pm
but jm rockettheme html calls some stuff and has some js stuff commented out (As I recall, I think).
Don't tell me, that is RT Mynxx... I love RT!!! but I HATE Mynxx...
Let me know if I can help in any way, would be happy to do it.


Mynxx does not seem to be a super favorite.  No, it is Versatility II which looks to be old??? I did a fresh install of vm and jm and added the hack in a directory on the same server. It too had internal server errors and all the wonky results I mentioned above. So for now I have it installed my godaddy shared hosting servers where it works fine and I have it in wrappers so at least they have a work around that looks to be part of their site until I figure it out. Its hard to go wild on a production site so this way I can play in the sandbox while they are still able to function.

You have been awesome, so thank you.  I will post when I figure it out so if anyone has these issues won't have to go through this out... or if need to beg for more help :) Thank your for your offer to help!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on March 27, 2011, 22:59:13 pm
What if i want to use the entered surface data in other attribute items? I sell banners and if a customer enters width and height and wants the banner to be sewn all around is there any possibility to automatically calculate the perimeter and multiply it by one meter price, then add this price to the total?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 28, 2011, 12:42:17 pm
Do you have more suggestions?
Will re-check the site, and get back to you!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 28, 2011, 12:47:21 pm
What if i want to use the entered surface data in other attribute items? I sell banners and if a customer enters width and height and wants the banner to be sewn all around is there any possibility to automatically calculate the perimeter and multiply it by one meter price, then add this price to the total?
In the hack you will find allteady the "windows" attribute- wich is an evolved version of the "surface" wich is doing exacly that, from the entered width/height attributes is calculating the size (and the price of) a windows blinds and couple of other,  similar things.
You can take that code and to adapt it for your needs.
And the druckstadt.de site I mentioned in one of above posts is selling banners and flags too - and he had similar needs, and solved them based on this hack.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on March 28, 2011, 21:54:19 pm
are the "windows" attributes included in the latest surface hack?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: peter678 on March 28, 2011, 22:07:13 pm
Hi I've been using this hack on several sites since the first 1.0x Joomla versions and I love it.  I have a very specific problem with a new site i just deployed Joomla 1.5.9 VM Version 1.1.3. and i have contributed a couple of items to the hack (formatting fixes.)

Everything with this current site works as expected except for photo uploads *DISCLAMER IVE DONE EXTENSIVE SEARCHING IN THE FORUMS* Ajax is turned off but i dont even think thats the problem. The permissions and ownership of the directories and paths in VM are correct.  This is confirmed by deleting the directory and allowing the function to create the non existant directory and write the .html file that prevents direct access. The product gets added to the cart with all other custom attributes, but I get a vm logger msg ERROR: <blank> (The blank msg is a lack of the $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE not being in the language file but it would read "File/Image Upload Failed" if it where there but i digress...)

I tracked down where the error is thrown in this file:
/var/www/virtual/usankf.org/htdocs/administrator/components/com_virtuemart/classes/ps_product_custom_type.php


On or about Line 650 there is the function that handels uploads 'function customTypeProcess($value, $field=array())' I have traced the error to a simple boolean expression on or about line 710 of this function

Code: [Select]
if (isset($_FILES[$titlevar]) && is_array($_FILES[$titlevar])){
  
    ... Does a bunch of validation and uploads the file and logs problems...

}

Well the simple problem is that $_FILES is indeed an array but it is empty.  So with an empty array there is no filename passed into the function to init the upload.  With that said when I debug VM and look at the global $vars the filename of the upload IS contained in that array.

Code: [Select]
product_id => 18
Last_Name => David
First_Name => Richmond
Middle_Initial => P
Address_Line_1 => 110 anywhere st
Address_Line_2 => Suite A
City => Tomons
State => Hidalgo
Zipcode => AB4k33
Phone_Number => 44343250003
Email => nospam@thanks.com
Date_of_Birth => 5/15/89
Upload_Photo => IMG_0317.JPG
minimum_quantity => 0
flypage => shop.flypage.tpl
page => shop.cart
manufacturer_id => 1
category_id => 6
func => cartAdd
option => com_virtuemart
Itemid => 6
RokMicroNews => {"0":{"open":true,"element":"section-3-6"},"1":{"open":true,"element":"section-3-8"}}
ys-vmconfiguration-active => s:ext-comp-1005
ys-dashboard-active => s:ext-comp-1003
ys-debugpanel-active => s:ext-comp-1004
ja_purity_tpl => ja_purity
switchmenu => 8
virtuemart => 0230673836761533558d5eb174e2ec65
9aad8b7fa1d531ce90e6a50544104382 => 0230673836761533558d5eb174e2ec65
cbcc6125788040a19323045f8e5af6d6 => c4525bef2a4177724b98ccd7360bcd9e
order_subtotal_withtax => 50
payment_discount => 0

One post mentioned this was AJAX turned on but as I mentioned mine is off. I also contemplated some sort of Template error since i use a rocket theme and i did find a post about a problem with one of their themes.  So to eliminate that as a problem I changed back to the Default 1.5 Joomla Template and the behavior did not change.  Then to beat a dead horse i took a site that already had VM 1.1.3 and this hack working and copied the administrator/ and components/ for VM over to this site and it STILL didn't change the behavior.  I also systematically unpublished every module so that it was a default joomla template AND only VM and the Cart to eliminate any module conflicts. I am now thoroughly stumped and cant figure out why that variable is staying empty.  I am using ssl but only on checkout so I dont think that would matter but i mention it for completness.

Can anyone lend a hand?

Solved: In the crappiest way possible...a complete reinstall of everything including VM 1.1.4 and the 1.1.2 v1.5 extended attribute hack.  So for all the people who keep asking if it works with 1.1.4 ever read this deep in the thread -- IT WORKS FOR 1.1.4 FOR ME.

David Richmond

had same problem except mine was working ok & then stoppped only on some products. Have established that adding 'related products' to a product stopped the file upload working.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on March 29, 2011, 09:35:09 am
are the "windows" attributes included in the latest surface hack?
As I know, yes, but in worst case you can find a version focusing on that attribute on my site http://webgobe.ro/en/ (http://webgobe.ro/en/)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on April 02, 2011, 22:32:28 pm
Hi Denes!
I want to use this piece of code in the .../administrator/components/com_virtuemart/classes/ps_product_custom_type.php
 the "surface" section. (my code is in bold)

But I can't get the $quantity variable from the quantity box.

What I want to do by that: if someone wants 5 pieces of material which are less than one sq.m. each, the program should add them together and thus calculate the total price based on the actual total size, but not sum it up to 5 sq.m. and set corresponding price.

   /**
    * Outputs & Processes the submitted data for Custom Attribute to Cart
    */
   function customTypeProcess($value, $field=array()) {   
      global $charge;   
      $attr_value = explode('|',$field['attr_value']);
      $default_width = $attr_value[0];
      $default_height = $attr_value[1];
      $surface1 = $attr_value[2];      
      $surface_price1 = $attr_value[3];
      $surface2 = $attr_value[4];      
      $surface_price2 = $attr_value[5];
      $surface3 = $attr_value[6];      
      $surface_price3 = $attr_value[7];
      $multiplier = $attr_value[8];
      if(!$multiplier || $multiplier==0){
         $multiplier =1;
      } else {
      $multiplier=$multiplier*$multiplier;
      }
      $d_surface =($default_width*$default_height)/$multiplier;
      $surface = explode('*',$value);
      $e_surface =($surface[0]*$surface[1])/$multiplier;
      $b_surface = $e_surface-$d_surface;

      if (!$surface_price1 || !$value) {
//         echo $surface_price1."-".$value;
         return $value;
      } else {
         if ($e_surface <= $surface1) {
//            echo $b_surface." limit ". $surface1 ."<br>";
            $tim_msurf = $e_surface*$quantity;
            if ($tim_msurf > $d_surface) {
            $adjusted_price = $surface_price1 * $e_surface;

            }
         }
         elseif ($e_surface <= $surface2) {
            $adjusted_price = $surface_price1 * $b_surface;
//            echo $b_surface." limit ". $surface2 ."<br>";
         }
         elseif ($e_surface <= $surface3) {
            $adjusted_price = $surface_price2 * $b_surface;
//            echo $b_surface." limit ". $surface3 ."<br>";
         }
         else {
            $adjusted_price = $surface_price3 * $b_surface;
//            echo $b_surface." exceeds limit of". $surface3 ."<br>";
         }
         $pagevar = trim($field['attr_title']);
         $charge[$pagevar][$value] = '[+'.$adjusted_price.']';
          return $value;
      }
   }
   
}

I'm not a coder, but considering your busyness... want to help myself.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on April 03, 2011, 12:41:41 pm
Do you have more suggestions?
Will re-check the site, and get back to you!

Did you already had the time to re-check? I've bin trying to get it work, but still no result.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 04, 2011, 09:32:42 am
Hi Denes!
I want to use this piece of code in the .../administrator/components/com_virtuemart/classes/ps_product_custom_type.php
 the "surface" section. (my code is in bold)
But I can't get the $quantity variable from the quantity box.
You need to examine the cart and retrieve from there the quantity.
You can retrieve it with
Code: [Select]
$cart = $_SESSION['cart'];It's  a multi dimensional array, you need to locate the product_id your product have and to get the quantity info from there. Presuming that you saved somewhere in the code prior this step your product's id in the variable $product_id, then all you need to do is to loop through the cart content, (with a for() or a while() function maybe...) find the product in the cart, and retrieve the associated quantity. So the last bit of code will look like this:
Code: [Select]
for ($i=0;$i<$cart["idx"];$i++){
   if ($cart[$i]["product_id"] == $product_id) {
     $quantity = $cart[$i]["quantity"];
  }
}
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 04, 2011, 10:47:22 am
Do you have more suggestions?
Will re-check the site, and get back to you!

Did you already had the time to re-check? I've bin trying to get it work, but still no result.

Yes, and is working correctly. See the attached screenshoot ant this product:
http://helder-als-glas.nl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=74&category_id=28&option=com_virtuemart&Itemid=1 (http://helder-als-glas.nl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=74&category_id=28&option=com_virtuemart&Itemid=1)
The product is set up as I described several time in the forum, and on the readme:
the product price is equal with the price of the minimal surface set - this case the surface of a 100mm*100mm of glass, 0.01 squaremeter, I set it it to 1 euro net.
The attribute used is
Code: [Select]
Afmetingen (surface)(Hebt u onze inmeettips gelezen?|title-hover)(100|100|0.01|100|10|100|25|100|1000)so, the first surface limit is equal with the surface corresponding to the minimal attribute limits, the above calculated 0.01 square meter,
The prices in the attribute are the PER SQUARE METER PRICES for the respective surfaces, so 100 euros.
And you can see that the prices in the cart are correct.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: costinrhs on April 05, 2011, 21:45:49 pm
Hy,
Nice work with this hack.
I was wondering if you can help me.
Your hack can help me do this kind of order form?
http://www.publiserv.ro/produs/Invitatii-De-Nunta-775

Thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 06, 2011, 09:27:02 am
Yes, can be done. The problem would be the building the pre-visualizer for the fonts - that needs an extension for the hack, but using Cufon or sIFR and some extra coding definitively can be done.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: mikeyt on April 06, 2011, 09:45:03 am
Some of the confusion regarding this hack is created due the fact, that nobody really knows, which is the last version of the hack, since I unpublished it from my homepage, and posted it here as an attachment following the dispute I had with one of global moderators.
To eliminate this, I will republish the hack on my homepage, and will add a link to it in my signature. Hopefully this won't start again a dispute, because I never claimed, that I'm the sole author of the hack, and I have giving full credit to ALL contributors now and everytime.
But since I'm the sole person still supporting the hack, and from the more, than a half of existing attributes are the result of my work, I think I can't be accused of hijacking other's work by posting it on a single, easy to access and to locate site, reducing the confusion and made it easier to support in the future.
So, here's the list of contributors once again:
• Barnett - original J1.x version
• Joseph Kwan (JK) – port to J1.5
• Nemesis02 – port to VM 1.1.2
• Cer – error reporting
• Ben Stovall – groups
• Ruppert – Documentation
• Mike Taylor – Documentation
So, fellow contributors, if any of you have anything to say related to the above, let me know, I will try to find a solution to make happy everyone. But the current situation is leading to a chaotic "ecosystem", and ever with my determination to keep supporting this hack FREE OF CHARGE, and to made public ANY new developments slowly made it a chore to do it. If none of you contacts me with their observations/ideas I consider, that you agree with the solution chosen by me.

 

Hi Webgobe,

I agree with you - I've got no issues at all with you publishing the latest version on your website which includes the documentation I rewrote. It saves a lot of confusion (and reading of old posts!) trying to find it on the 65 pages of this topic.

Mike
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: erwin_m on April 06, 2011, 10:39:57 am
Hi Denes,

Finally its working great now. Thank you for your paience with me. Now I know how to put the data in!

Erwin
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: timkolm on April 15, 2011, 22:12:34 pm
Is there any possibility to make a progress bar for the uploaded files?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 18, 2011, 12:31:29 pm
Not with this solution. Maybe if someone adds a flash uploader to it.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on April 26, 2011, 18:27:43 pm
this hack is very nice . tnx for create and updating.
i have one question
for date choosing , can i add 2 date choosing attribute and (start and End date), and add price by date difference?

it is for renting products.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 26, 2011, 18:45:07 pm
In the latest pack you can find a special rental attribute, wich does exactly that.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: chacha153 on April 27, 2011, 06:33:53 am
Hi,

I installed this hack a long time ago and it works perfectly. I was wondering if it would be possible to count how many attributes have been ticked and after a certain number (for me:'8'), display a message saying that no more product can be added + enable the client to tick more than 8 ?

Could someone help me find the php file where the counter should be?

Thanks a lot.

Chacha
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 27, 2011, 08:33:12 am
The file in question is ps_product_custom_type.php. I would do it this way:
1. add to each attribute a hidden <input... > to store the counter value
2. update it via JavaScript - also added to each attribute I want to count
3. add to the same JavaScript a function to sum these values stored in hidden <input ... > fields and to trigger the action - like to show the message.
Isn't too tricky - just lot of work ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on April 28, 2011, 14:35:56 pm
for time picker i can display calender . but i need more complex date picker which have time and minute pick option . pls check pic
(http://65.60.53.10/~fanatne/datepicker/datepicker1.gif)

and calculating time difference for make extra charge.

we have this option?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 28, 2011, 16:46:20 pm
No, just dates. But can be built, based on that.
Title: Kind Attn to Webgobe
Post by: nighthawks on April 29, 2011, 01:55:10 am
Hi webgobe
Thanks for giving your precious time

I have installed this hack, its working fine calculating prices well.

But when I change currency (e.g. USD to INR or BP) it shows the same value I entered, how ever it change currency symbol correctly.

For example My Default currency is USD
I entered all prices in USD, Its fine

but as I changed currency, entered figure does not change, Plz have a look the screenshot I have attached






[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on April 29, 2011, 09:32:21 am
Hmm, it's a known problem, the hack isn't fully prepared for use in multi-currency sites. Some of attributes can handle multiple currencies, but some not. To solve it would need a deep rewrittal of these attributes. Currently I don't have the time for this.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nighthawks on May 01, 2011, 00:27:45 am
Hi webgobe
Thanks for quick response,
This is just a request, could you solve this when ever you are free
I understand you are quiet busy and I would like to  donate few bugs for this.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jomynn on May 02, 2011, 17:30:29 pm
Please help !
I would like to add ajax function .
For sum thing about (php gd).
When I input some textbox it will generate to image.
How to insert ajax function ! ???
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 02, 2011, 18:15:23 pm
Ajax where???
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jomynn on May 02, 2011, 18:18:43 pm
I had create Ajax function.

How to insert this function.

Example
(radio)(preview|)
Textbox1(Textbox)(...)
-When Textbox1 update this function will be update image path on radio on preview...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on May 02, 2011, 18:29:19 pm
Strange problems.

Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\freelancer\plugins\system\loading.php:32) in D:\xampp\htdocs\freelancer\administrator\components\com_virtuemart\classes\ps_session.php on line 68

Notice: Undefined index: charge in D:\xampp\htdocs\freelancer\administrator\components\com_virtuemart\classes\ps_product_attribute.php on line 841

how to fix it?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 02, 2011, 18:50:03 pm
I had create Ajax function.

How to insert this function.

Example
(radio)(preview|)
Textbox1(Textbox)(...)
-When Textbox1 update this function will be update image path on radio on preview...
Aha... humm, I'm not an  Ajax guru... probably is as simple as 1-2-3 ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jomynn on May 02, 2011, 18:52:08 pm
Please tell simply .
What file to insert .
My function write on header and body section

Thank you.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 02, 2011, 18:56:28 pm
Strange problems.

Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\freelancer\plugins\system\loading.php:32) in D:\xampp\htdocs\freelancer\administrator\components\com_virtuemart\classes\ps_session.php on line 68

Notice: Undefined index: charge in D:\xampp\htdocs\freelancer\administrator\components\com_virtuemart\classes\ps_product_attribute.php on line 841

how to fix it?
Probably is a syntax error somewhere. Smells like a typo, or an omission of a mandatory part of the syntax.
Did you tried the hack with one of example attributes? Produces the same error?
If the answer is yes, then you need to revisit how you applied the hack. More probably or do you didn't overwritten ALL files with the ones from the package, or you use another VirtueMart template, not the -default- (so you need to hack your template too).
If no - so the hack works properly, the next logical question is:
What attribute you use, exactly?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 02, 2011, 19:08:18 pm
Please tell simply .
What file to insert .
My function write on header and body section

Thank you.
LOL. There is no such thing, like simple answer. But let's take it in simplest way possible:
Most of wizardry happens in the /administration/components/com_virtuemart/classes/ps_product_custom_type.php file.
Here are the custom attribute related functions, here are the fields built - mostly. But for example part of the "select" type of attribute - the one you want to deal with - is found in the VirtueMart's template, namely in the /components/com_virtuemart/themes/default/templates/product_details/includes/custom_attribute/ps_product_custom_type_select.tpl.php file.
But, generally, a typical VM page is built from couple of PHP files (5+ typically), and things are complicated by the fact that Joomla itself "contributes" heavily to the final page compound.
It's possible to write in "header" section, of course, depending on exactly where you want to write, you should refer to VM and/or Joomla documentation.
Sorry, is no such thing, as "simple" here, with the risk to repeat myself, I just can emphasize on this.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on May 02, 2011, 19:45:34 pm
you were right . in local test it getting warnings. but at testing server everything is okey including ajax card. :D
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: juicydigital on May 03, 2011, 01:27:12 am
Hey Webgobe, I think everyone owes you a massive thanks for the amount of support and time you have put into this, I just have a simple question, I have been trying to nut this out over the last couple of weeks, basically I just need a custom attribute that lets the user enter a size and they get a price depending on what size bracket it falls in - example

Pricing Brackets: upto 610mm/1200mm = $56 | upto 610mm/1500mm = $60 | upto 760mm/1200mm = $60 | upto 760mm/1500mm = $66

680mm x 1400mm would be $66

I have tried using the window attribute but because the size is in pricing brackets that attribute doesn't really work.

i hope you can help.

thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 03, 2011, 09:03:10 am
None of the actual attributes does the exact job you need. I have a request from another forum member to build an attribute which acts as you need (essentially a modification of "window" attribute) but had no time to do it :( being overwhelmed with other tasks.
But hopefully sometime soon - maybe this week - I will be able to handle that, then you will have also what you need. Your case is simpler, BTW, he had a table with approx 30-40 cells to reproduce as price-grid ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on May 06, 2011, 16:16:48 pm
Quote
$html .= "End date: <input class=\"inputbox\" type=\"text\" name=\"".$titlevar."checkout\"  onchange=\"".$titlevar."_hrental();\" id=\"".$titlevar."checkout\" size=\"15\" maxlength=\"19\" value=\"".$tomorrow_date."\"  /><input type=\"reset\" class=\"button\" value=\"...\" onclick=\"return showCalendar('".$titlevar."checkout', '%Y-%m-%d');\" />\n";

how to fire textbox onchange event , when textbox's value changed by showcalendar?. if i change textbox value directly it's onchange event is firing.  ???
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 06, 2011, 16:35:20 pm
You can't associate two events to one single inputbox....
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on May 14, 2011, 12:25:30 pm
need a little help .at Chrome product updating and deleting functions are not working. but without using custom att hack, it is working. ???

pls check this site [http://www.super-rent.nl/].
thx you
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: nyamdavaa on May 14, 2011, 19:35:27 pm
fixed it by myself . and found some bug  ;D (i think it is bug )

On Chrome cart update and delete were not working , sometimes on Firefox. so i search some function and found this bug.

for cart update:
ps_cart.php line 319 .
function update(&$d) changed to  function update(&$d, $force=true)

line 354:
if ( ($_SESSION['cart'][$i]["product_id"] == $product_id )
            &&
            ($_SESSION['cart'][$i]["description"] == $d["description"] )
            ) 

changed  to

if ( ($_SESSION['cart'][$i]["product_id"] == $product_id )
         && ($_SESSION['cart'][$i]["description"] == $d["description"] || $force )
         )


it seems force option need to be here.

for delete: line 431

function delete($d, $force=false)  changed $force to true .

after this everything worked as expected.  :) . hope this little research will help for this hack.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: eclipsemedia on May 17, 2011, 20:40:13 pm
Are you having this problem!!!!

When you try to add more then one custom attributes for a child item you get these problems?

1) Click Add to Cart and nothing happens (you would have Ajax enabled)
2) Click Add to Cart and get Internal Server Error (you would have Ajax dis-abled)

Well to save you guys 67 pages of reading. Follow the innstructions below in the quote

Just to let you know I have Joomla 1.5.15 and VM 1.1.8




I found a solution.

in file administrator/components/com_virtuemart/classes/ps_product_attribute.php

around line 1096

comment this:
Code: [Select]
$_SESSION['charge'][$d['prod_id']]=$charge;to
Code: [Select]
//$_SESSION['charge'][$d['prod_id']]=$charge;
Don't ask me why, but it worked for me.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 18, 2011, 09:38:54 am
Will double-check what's going on, but the respective line is a needed one - just see the comment in the line before put in there by JK, one of the early developers of the hack - the one who ported it to VM 1.1 :
Code: [Select]
// added by JK to save $charge
//   This is needed in order for changing shopcart quantity
$_SESSION['charge'][$d['prod_id']]=$charge;
and I have lots of sites working perfectly, just one example:
http://www.kadkitchenandbedroom.co.uk/ (http://www.kadkitchenandbedroom.co.uk/)
If you take a look, you will see that the site have more, than 1k of products with child products, and not the simple ones, each of them have at least 3, but the average one have ~6 custom attributes.
So, it must be a conjunction of factors which creates the signaled error, it's not a typical case. I will need to re-create somehow the error to be able to provide a fix (personally I never meet it, and have done couple of sites using this hack ;) ).
BTW, most of problems of this or similar type are occurring when you use on the same product not only the custom attributes, but VM's own attributes too. Don't do that, use the custom attributes to create the same product. Although in most cases these can "peacefully coexist", there are couple of known cases when problems where arising from that.
Title: Upload feature
Post by: paradise4 on May 27, 2011, 16:44:31 pm
Hi,

first of all: G R E A T   H A C K ! ! ! Thank you very much!
I managed to establish a price per sq.m. calculation using the "surface" attribute, and it's working fine. Now I'd like to let the customers upload a file, here's what I put into the custom attributes list:

Datenupload(file)(PDF oder EPS hier hochladen|title-below)(/banner/|.eps,.pdf)

But the only thing I get is a subdirectory written into the directory I specified in the configuration, no file :( ... Any help would be hihghly appreciated!

paradise4
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2011, 16:54:22 pm
Did you set the upload directory correctly in the VM configuration - last tab?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: paradise4 on May 27, 2011, 17:24:15 pm
Yes - and I have discovered the mistake: I used AJAX update, and the upload won't work when it's activated (RTFM  ;D). Would be nice if it worked with AJAX update activated some day, but for the moment I can live with it.

Thanks!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2011, 17:50:00 pm
Great! Yea... tha'ts it. Someday I may have the time to search for a fix for this...
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: paradise4 on May 27, 2011, 18:44:15 pm
 :)
But I have still one question: after clicking "add to basket", the checkout screen now shows "50000 limit 1000000" in the first line. I can imagine that it's the sq.cm's of the banner ordered and the number after the limit is what I put in the attribute, but it's not needed. Can it be deleted?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 27, 2011, 19:18:24 pm
You can easily find in the code, yes, can be deleted. Was requested by the siteowner as a visual feedback on what can be entered.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: paradise4 on May 28, 2011, 10:24:26 am
Thanks for your great and fast support, webgobe!
Wasn't too easy to find as I would have supposed it should be in ps_cart.php but thanks to multi-file search for "limit" I found the lines responsible for the display in ps_product_custom_type.php. If anybody else needs to delete it:
comment out lines 1184, 1189, 1193 and 1197.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on May 30, 2011, 09:23:57 am
Sorry, I just forgot the mention wich file you need to search in, yea, that's correct, about 95% of hack related wizardy is happening there!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Helle on July 06, 2011, 19:19:19 pm
Hello!

Can you tell me where i can find the latest pack with the rental attribute mentioned in post #971?
And can you also tell me how the synthax is?

Thank you very much and best wishes
Tobias
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on July 11, 2011, 13:01:33 pm
Sorry, I'm on vacation, the package must be up there somewhere in an earlier post. As I reach a real Internet connection(I'm on phone, in roaming :( ) ill post it again, with the instructions.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Helle on July 14, 2011, 22:07:21 pm
Hi Webgobe,
Thanks, for response. Enjoy your holiday and i´m looking forward to hear from you.  ;)

I also post a screenshot of the result i´ve done yet. There is a product with 3 attributes (the customer can choose between a daily, a weekly or a monthly  ticket). With the hack i added the startdate and enddate. The Enddate should not be edited by customer, it should be calculatet with the choosen ticket and tge start date.

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Hy3n4 on July 21, 2011, 12:24:54 pm
Hi to all,
So far i reading this post i like this hack more and more. But I have a few questions about function of this hack.
1. Will this work on latest versions of virtuemart (1.1.8, 1.1.9)?
2. can this hack make something like product configurator?
- it means I need attributes which will be dependent to another attributes choosen before.
for example: I have gold jewels and those can be divided to white gold, yellow gold and both colors than i can choose if i want my gold jewel with diamond or zircon and zircons have different colors and I need if customer who chooses diamond can not to choose color, because diamond has no colors.

Thanks for reply.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: NickyV on July 29, 2011, 14:16:09 pm
Hi I've been using this hack on several sites since the first 1.0x Joomla versions and I love it.  I have a very specific problem with a new site i just deployed Joomla 1.5.9 VM Version 1.1.3. and i have contributed a couple of items to the hack (formatting fixes.)

Everything with this current site works as expected except for photo uploads *DISCLAMER IVE DONE EXTENSIVE SEARCHING IN THE FORUMS* Ajax is turned off but i dont even think thats the problem. The permissions and ownership of the directories and paths in VM are correct.  This is confirmed by deleting the directory and allowing the function to create the non existant directory and write the .html file that prevents direct access. The product gets added to the cart with all other custom attributes, but I get a vm logger msg ERROR: <blank> (The blank msg is a lack of the $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE not being in the language file but it would read "File/Image Upload Failed" if it where there but i digress...)

I tracked down where the error is thrown in this file:
/var/www/virtual/usankf.org/htdocs/administrator/components/com_virtuemart/classes/ps_product_custom_type.php


On or about Line 650 there is the function that handels uploads 'function customTypeProcess($value, $field=array())' I have traced the error to a simple boolean expression on or about line 710 of this function

Code: [Select]
if (isset($_FILES[$titlevar]) && is_array($_FILES[$titlevar])){
 
    ... Does a bunch of validation and uploads the file and logs problems...

}

Well the simple problem is that $_FILES is indeed an array but it is empty.  So with an empty array there is no filename passed into the function to init the upload.  With that said when I debug VM and look at the global $vars the filename of the upload IS contained in that array.

Code: [Select]
product_id => 18
Last_Name => David
First_Name => Richmond
Middle_Initial => P
Address_Line_1 => 110 anywhere st
Address_Line_2 => Suite A
City => Tomons
State => Hidalgo
Zipcode => AB4k33
Phone_Number => 44343250003
Email => nospam@thanks.com
Date_of_Birth => 5/15/89
Upload_Photo => IMG_0317.JPG
minimum_quantity => 0
flypage => shop.flypage.tpl
page => shop.cart
manufacturer_id => 1
category_id => 6
func => cartAdd
option => com_virtuemart
Itemid => 6
RokMicroNews => {"0":{"open":true,"element":"section-3-6"},"1":{"open":true,"element":"section-3-8"}}
ys-vmconfiguration-active => s:ext-comp-1005
ys-dashboard-active => s:ext-comp-1003
ys-debugpanel-active => s:ext-comp-1004
ja_purity_tpl => ja_purity
switchmenu => 8
virtuemart => 0230673836761533558d5eb174e2ec65
9aad8b7fa1d531ce90e6a50544104382 => 0230673836761533558d5eb174e2ec65
cbcc6125788040a19323045f8e5af6d6 => c4525bef2a4177724b98ccd7360bcd9e
order_subtotal_withtax => 50
payment_discount => 0

One post mentioned this was AJAX turned on but as I mentioned mine is off. I also contemplated some sort of Template error since i use a rocket theme and i did find a post about a problem with one of their themes.  So to eliminate that as a problem I changed back to the Default 1.5 Joomla Template and the behavior did not change.  Then to beat a dead horse i took a site that already had VM 1.1.3 and this hack working and copied the administrator/ and components/ for VM over to this site and it STILL didn't change the behavior.  I also systematically unpublished every module so that it was a default joomla template AND only VM and the Cart to eliminate any module conflicts. I am now thoroughly stumped and cant figure out why that variable is staying empty.  I am using ssl but only on checkout so I dont think that would matter but i mention it for completness.

Can anyone lend a hand?

Solved: In the crappiest way possible...a complete reinstall of everything including VM 1.1.4 and the 1.1.2 v1.5 extended attribute hack.  So for all the people who keep asking if it works with 1.1.4 ever read this deep in the thread -- IT WORKS FOR 1.1.4 FOR ME.

David Richmond

had same problem except mine was working ok & then stoppped only on some products. Have established that adding 'related products' to a product stopped the file upload working.

I also had the same problem and removing the "Related Products" enabled the file upload.  Having both would be the best option but I suppose I can live without the "Related Products" if the file upload is going to work.  Does anybody have any ideas why having a "Related Product" would break the file upload?
Cheers,
Nicky
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 02, 2011, 11:49:09 am
first of all, apologies for delays in getting your questions answered - but I was off in vacation.
Some of questions arrived in mean time:
a. Product configurator: humm, possible, but not with all attributes. couple of existing ones, Like the "Pizza", the "Reservation", the "Window" attribute are build based on this ideea. The hack itself isn't support this kind of "cascading" attributes, but can be further tweaked to meet your needs. But I guess you realize, that is more, than one-two clicks here and there...
b. Versions supported: current hack files are running based on 1.1.3 versions of VM core. No reported conflicts with never versions. I am running couple of sites based on fresher VM cores without problems. I planned to rewrite the code to be based on fresher VM, but had no time for it (I'm living from freelancing, so playing with code is coming into play only AFTER i secured my steady income - or I am paid for it). Upgrade is no more on roadmap, I expect the new VM to get stable and to port the code directly there... unless something else happens ;)
c. conflicts with upload and Related Products - I am aware of the problem, but is a funky one... in some installs works, in others not. And since I am only a CONTRIBUTOR - not the AUTHOR of this hack, and the file upload attribute is here, untouched, long before I started to add to it my pieces of code, I didn't studied too deeply what the cause of the conflict might be. I simply had no project involving the need to have BOTH the Related Products and the Upload to work together.
It's on my list of things planned to be checked and fixed in the future... but had no time for it yet. If someone has a fix for this - or anything else - I would be open to test it, and if works, to include it in the "official" release.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: Helle on August 24, 2011, 20:06:46 pm
Hello @ all,

do you thing there is any solution for the calculation i have described in my earlier post #1006? I thougt about the reservation hack but I could not find the Syntax.

At the moment I´m using parent/child "products" with the date picker hack in the child.
An Example can be found here: http://www.angelkarte.info/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=40&category_id=14&option=com_virtuemart&Itemid=64&vmcchk=1&Itemid=64 (http://www.angelkarte.info/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=40&category_id=14&option=com_virtuemart&Itemid=64&vmcchk=1&Itemid=64)
Many thanks in advance for your help

Yours Tobias
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: iwindsurf on August 27, 2011, 16:43:59 pm
Hi Webgobe - did you ever find a solution for combining this hack with the wishlist hack? - I saw a few posts there

I've been trying to get the two hacks working together but fail as the price never gets transferred when I transfer all items from a wishlist to a cart
do you know where the code is hidden that looks up the price when the product details are given?

any clues gratefully received...

Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueworm on August 28, 2011, 18:59:51 pm
Hello,

I would like to use this hack for VM 1.1.5 but I am not sure if I can just replace all the php files coming with the hack (I'm using the CustomAttributesExtendedWindow.zip posted on page 59 or so.. )

Has anyone done this? Or, shall I replace onmly some parts withing my 1.1.5 php-files? If so, what segments do I have to replace?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 29, 2011, 12:11:09 pm
Hello,

I would like to use this hack for VM 1.1.5 but I am not sure if I can just replace all the php files coming with the hack (I'm using the CustomAttributesExtendedWindow.zip posted on page 59 or so.. )

Has anyone done this? Or, shall I replace onmly some parts withing my 1.1.5 php-files? If so, what segments do I have to replace?
The hack reportedly works on 1.1.9 too. you need OVERWRITE all existing files from ones found in hack package and eventually hack the VM template files too, similar to the ones in the package, if you don't use VM's -default- template.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on August 29, 2011, 12:21:11 pm
Hi Webgobe - did you ever find a solution for combining this hack with the wishlist hack? - I saw a few posts there

I've been trying to get the two hacks working together but fail as the price never gets transferred when I transfer all items from a wishlist to a cart
do you know where the code is hidden that looks up the price when the product details are given?

any clues gratefully received...


No, the  single project I had using the both has been abandoned by the siteowner, so I did not solved all the problems found during the project. But should not be too hard to fix, since the CAE hack is piggybacking on the VM's default CustomAttributes, and stores all data needed to work correctly in cart. If the cart is saved then retrieved correctly (in fact this is the key point there) the CAE attributes should work correctly. The most critical point here is that the actual CAE hack files are based on 1.1.3 version, and to work, by appliying the hack to a newer VM you practically downgrade parts of the core. The hack itself - withouth other hacks applied to VM - is working, but I am not sure if interfering with WishList hack this will work on a newer VM. So, for the moment I advice you to try to apply both hacks to VM 1.1.3, to have the best chances to and up with something working.
I have planned to rewrite the hack to 1.1.9, but had no time for it... and don't know, if in near future will have it either.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bob30 on September 02, 2011, 15:13:53 pm
Hello, webgobe!

How can I make a link to uploaded file, instead of just a file name, which is shown in the cart/email/orders?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: blueworm on September 03, 2011, 15:02:44 pm
The hack reportedly works on 1.1.9 too. you need OVERWRITE all existing files from ones found in hack package and eventually hack the VM template files too, similar to the ones in the package, if you don't use VM's -default- template.

you mean I take the files from the hack and overwrite all (new) VM 1.1.9 files with the hacked ones?
But then all new 1.1.9 changes in the php files are gone, if I replace them with the hack-files
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 03, 2011, 15:09:08 pm
Currently the file is uploaded in a directory you set up in the CAE section of configuration, and the original filename is changed, by adding it the date of upload, to minimize possible filename conflicts. From here should be easy to add the code ;) you need to amend a bit the code. The problem is that you need to pass this through cart - and this can be a bit tricky.
The file to amend is  ps_product_custom_type.php, the FILE element class, function customTypeProcess, to make the return value instead the filename the complete HTML code needed for the link.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 03, 2011, 15:13:22 pm
The hack reportedly works on 1.1.9 too. you need OVERWRITE all existing files from ones found in hack package and eventually hack the VM template files too, similar to the ones in the package, if you don't use VM's -default- template.

you mean I take the files from the hack and overwrite all (new) VM 1.1.9 files with the hacked ones?
But then all new 1.1.9 changes in the php files are gone, if I replace them with the hack-files
Yes, you're right.  But you don't have alternatives - until someone rewrites the hack to be based on 1.1.9 files. I have this on my shortlist, but have no free capacity for that, I'm swamped with commercial assignments. Maybe if some project needing this is come on my way... or someone else will do this. It's not a 2 click job, otherwhise would be there posted for long.
And don't be afraid, the losses (the more advanced code you must throw away with the hack) is minimal, don't affect core functionality in any way.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: bob30 on September 03, 2011, 20:43:40 pm
Currently the file is uploaded in a directory you set up in the CAE section of configuration, and the original filename is changed, by adding it the date of upload, to minimize possible filename conflicts. From here should be easy to add the code ;) you need to amend a bit the code. The problem is that you need to pass this through cart - and this can be a bit tricky.
The file to amend is  ps_product_custom_type.php, the FILE element class, function customTypeProcess, to make the return value instead the filename the complete HTML code needed for the link.

oops... already solved myself, before reading your message :)

the most big problem was with passing the cart - when I added <a href=" and </a> to the file name in return of function customTypeProcess, I've got a broken code in the cart on front page, 'cause there is a hidden inputs named "description", which handles values of given custom attributes. The quotes (") in the <a href=" cutted attributes list before it's real end. Also cart update and delete are not worked.

and so, the trip begans...

I've replaced <a href=" and </a> with marks, something like WEB-DL-FL-STRT and WEB-DL-FL-END (something, that you never meet in the name of uploading file) at the start and the end of returning file name. Then, when I was need in the link to be displayed, I've str_replaced that marks with <a href=" and </a>, but in the hidden inputs I've replaced it with spaces. And in the html/basket.php I also str_replaced my marks with spaces so the cart update and delete are working.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 03, 2011, 21:05:23 pm
Great solution! congrats!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: enigmawz on September 16, 2011, 18:52:52 pm
Hi

Hope you are doing well. I will appreciate , if you let me know how to validate custom attribute..
For example, i can put alphabetics as well in price tag..
also very important, just like calendar, is there any way , i can put time field..?
so that user can input hours and minutes as well. i am using
version is VirtueMart 1.1.3
joomla 1.522
i have seen dynarch new calendar as well, they have option for time as well..
please let know, how i can update the calendar for time input if no other solution is not available...
will wait for your reply
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 16, 2011, 20:39:20 pm
Standalone time input is not implemented yet. (It is there in the Reservation attribute, if I remember well). If you need it, should be added. (Is not too complicated, if you are familiar with php and study a bit the code - I had done the same when I began to extend/modify the hack.)
Some of the attributes are having allready validations attached. If you study the code, you will figure out easily how to add it to the attribute you need (basically you need to add JavaScript validation to the attribute code in ps_product_custom_type.php.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: enigmawz on September 17, 2011, 03:36:09 am
thanks for reply..
where i can find reservation attribute..?
i will wait for your reply

TC
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: wharfadale on September 17, 2011, 05:29:20 am
Hi!
Does this hack support dependent attributes? For example, i have colors: black and white, also black has height 10 and 20 inches and white 30 and 40. And when i select black, new dropdown list appears and shows me values for height
thanks
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 17, 2011, 11:22:57 am
thanks for reply..
where i can find reservation attribute..?
i will wait for your reply

TC
RESERVATION element class : around line 1745 in ps_product_custom_type.php
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 17, 2011, 11:31:49 am
Hi!
Does this hack support dependent attributes? For example, i have colors: black and white, also black has height 10 and 20 inches and white 30 and 40. And when i select black, new dropdown list appears and shows me values for height
thanks
Not by default, but there are couple of attributes supporting something similar, as the Pizza attribute, or the Windows attribute.
You need to build yourself a personalized attribute to match your preferences based on the examples you can found here (see my previous 2-3 replies for where to look for those existing allready)... or hire someone to do it. it's 2-3 hours of work for a skilled VM developer.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: wharfadale on September 17, 2011, 12:37:54 pm
How much will it cost? Can you do it? I can pay for it and add for public access
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: enigmawz on September 17, 2011, 17:27:08 pm
Hi
still there is one confusion..
I am using extended hack 2.15 and there are no enough line of code there till 977 ..
There is no reservation attribute defined here..
Kindly let me know where i can find the files developed by you..
I need to have time event input field in my shop
Is there any way to put select attribute in the same line ...

Appreciate your assistance...

Regards
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crisware on September 19, 2011, 16:40:34 pm
Hello everybody!! I recently Installed this hack in my new eshop... It is exactly what I wanted but I have a small problem... As it seems the hack does not support attributes that are written in greek language...
For example I added these attributes in a product:

Υλικά (checkbox)()(Τυρί [+1.20], Ζαμπόν [+0.50], Μπέικον [+0.60], Σαλάμι Αέρος [+0.50], Γαλοπούλα [+0.60], Μπιφτέκι [+0.80], Λουκάνικο [+0.80], Ομελέτα [+0.80], Αυγό [+0.50], Φέτα [+0.60], Μανούρι [+0.60], Τυροκαυτερή [+0.50], Φιλαδέλφια [+0.80], Κοτόπουλο [+1.00], Κοτομπουκές [+0.80], Μανιτάρια [+0.50], Καλαμπόκι [+0.50], Ελιές [+0.50], Πάστα Ελιάς [+0.50], Ντοματα [+0.30], Μαρούλι [+0.30], Αγγούρι[+0.30], Πιπεριές [+0.30], Πατάτες [+0.50], Chips [+0.50], Τόνος [+1.00], Τυροσαλάτα [+0.50], Ρώσικη Σαλάτα [+0.50], Κηπουρού [+0.50], Ουγγαρέζα [+0.50], Μαγιονέζα [+0.50], Σως [+0.50], Σως Μουστάρδα [+0.50], Τσίλι σως [+0.50], Κάρρυ Σως [+0.50], Μπάρμπεκιου Σως [+0.50], Σως γιαουρτιού [+0.50], Ketsup, Μουστάρδα)

They are shown nice but the only attribute that is working is the first (Τυρί). If I choose something else and then Add to Cart, the Cart goes to EMPTY... As I can think it is a problem with cookies.... (??) ... But I am not sure...

Could anyone help me to find a solution for this problem??

Thank you!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 19, 2011, 17:02:26 pm
Not quite... it's something deeper... never find a good fix for that' it's around since I entered in the game...
But to give you some heads up: it's a brute-force fix implemented in the Reservations attribute for this problem - the accented characters - not all of them, just the ones making problems!!! - are replaced with their unaccented counterparts.
Not the best solution... but works.
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crisware on September 19, 2011, 17:53:36 pm
Thanks for your help webgobe... It has problems with some Uppercase greek letters and from the lowercase only with letter "π". So I wrote all attributes in lowercase and I found a letter similar to π from the russian alphabet... ;)
Not the best solution but it seems ok...

Thank you again!!!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jamesthecat on September 20, 2011, 19:41:18 pm
Hi,

I'm having a problem with error:
Code: [Select]
The server encountered an unexpected condition which prevented it from fulfilling the request.
The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log.

This error only occurs when an attribute is checked when item is added to cart. I was thinking it could be a permissions issue? I have the default permissions currently set as 644 for the uploaded files and 755 for directories? Is this correct?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 20, 2011, 20:38:50 pm
That's okay. Must be something else. Did you overwrote ALL the files with the ones found in the package????
Did you used the default VM template?
these are the top 2 errors in using this hack ;)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: wharfadale on September 21, 2011, 08:32:01 am
webgobe, do you have enough time to modify hack for vm 1.1.9 and add feature i talked about (select one attribute and additional apears)?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 21, 2011, 09:30:24 am
I am on postlaunch phase on a big site, and in pre-launch (in next 10 days) of other two biggies. I'm pretty overbooked right now. Maybe after that I can fit into my schedule. But, you know... money talks, I have a family (and a newborn grandchild ;) ) to feed.
I planned it for long, but had not spare time to do it (I'm merciful for that, in fact, lot of work means income - in most cases LOL)
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: jamesthecat on September 21, 2011, 11:04:31 am
Hiya Webglobe,

I read the entire forum and found a solution that you actually provided previously! I had register_globals enabled on my server - disabling this resolved the 500 error! :D

Works great, love the hack, the pizza topping attributes are very powerful - v.impressed.

I now want to style the checkbox layout. Anyone know where the HTML for this is stored? Or any new div's I can enter into theme.css to modify the attributes layout?
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: webgobe on September 21, 2011, 12:30:07 pm
See the code for checkboxes in the ps_product_custom_type.php and in the template files (check the hack package, there are couple of attributes which have their own template files). Should be easy to find your way around!
Denes
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: holmzor on September 27, 2011, 09:27:49 am
Hello, I'm using this script and i find it very useful, Thanks for it!

Anyway i have an issue im trying to resolve with the design of the amount of product shown.
This script gives the customer the option as choosing from 2 alternatives as Checkboxes.
Code: [Select]
Amount(Checkbox)-r(unit: gram|title-hover)(50g [+5.00],100g [+10.00])(|);

However i don't want a checkbox. I want it to be a slider much like the one I added as a attachment in this message.
This must be possible! Please help me out!

[attachment cleanup by admin]
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: holmzor on September 29, 2011, 18:53:59 pm
Perhaps there's a way to implement this Jquery script with it?
http://docs.jquery.com/UI/Slider
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: crisware on October 02, 2011, 02:27:28 am
Hello,
I would like to "bold" product attribute values in the Basket and confirmation email (not the labels, only values)... How could I do that?

thank you!
Title: Re: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5
Post by: coixcoix on October 22, 2011, 00:05:39 am
Hey, guys! Anyone out there want a pizza? Yea, a fresh backed, crispy Custom Attribute Extended for pizza!
Here how it works:
Go and download the latest version of the hack from my site:
http://www.webgobe.ro/en/downloads/component-hacks.html?download=7 (http://www.webgobe.ro/en/downloads/component-hacks.html?download=7).
Install it. You can find a detailed howto in the package.
Create the product in your shop, and add the code to the "Custom Attribute List box on the Product status tab.
What code? Something like this:
Code: [Select]
Pizza (pizza)(|)(Mini,Medium [+1.00],Big [+2.00]);
Cheese (topping)(|)(Mini [+0.10],Medium [+0.50],Big [+1.00]);
Salami (topping)(|)(Mini [+0.20],Medium [+1.00],Big [+2.00])
Let's explain how it works: First of all, the product price should be set for the smallest sized pizza's price, without toppings (let's say 5 &euro;).
Then you set the attributes, first for the pizza itself, using the syntax:
Pizza name (topping)(|)(size1 [extra price1],size2 [extra price2],....)
There are no limits of number of attributes, and the syntax is exactly the same as the general syntax for the CAE hack.
One special note, tough: since there is no special protection implemented, and the above values are used elsewhere, you must begin the extra attribute names WITHOUTH SPACES IN FRONT, so
Code: [Select]
...,sizeN [priceN], ... is correct,
Code: [Select]
..., sizeN [priceN], ... is incorrect!!!!

The toppings syntax is similar, but more restrictive:
The attribute names part of the list of extra attributes MUST BE EXACTLY THE SAME AT CHARACTER LEVEL AS THE LIST IN PIZZA ATTRIBUTE!!!
So: if we use the above example, then

Code: [Select]
Cheese (topping)(|)(Mini [+0.10],Medium [+0.20],Big [+1.00]); - is good

Code: [Select]
Cheese (topping)(|)(Mini [+0.10], Medium [+0.20],Big [+1.00]); - is wrong (The space in front of "Medium" is the wrong thing)

Code: [Select]
Cheese (topping)(|)(Mini [+0.10],Medium [+0.20],Extra [+1.00]); - is wrong, the Big in original Pizza attribute was replaced by Extra)
Toppings attribute(s) must be used only together with (pizza), in the above sequence. The good news is, that there is no limit on (toppings) you can add to a (pizza) ;) maybe only your stomach's capacity!
Enjoy!!!