Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: 1 ... 65 66 [67]   Go Down
Print
Author Topic: Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5  (Read 322181 times)
nyamdavaa
Newbie
*
Posts: 12


« Reply #990 on: May 06, 2011, 09:16:48 AM »

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.  Huh
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #991 on: May 06, 2011, 09:35:20 AM »

You can't associate two events to one single inputbox....
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
nyamdavaa
Newbie
*
Posts: 12


« Reply #992 on: May 14, 2011, 05:25:30 AM »

need a little help .at Chrome product updating and deleting functions are not working. but without using custom att hack, it is working. Huh

pls check this site [http://www.super-rent.nl/].
thx you
Logged
nyamdavaa
Newbie
*
Posts: 12


« Reply #993 on: May 14, 2011, 12:35:27 PM »

fixed it by myself . and found some bug  Grin (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.  Smiley . hope this little research will help for this hack.
Logged
eclipsemedia
Newbie
*
Posts: 3


« Reply #994 on: May 17, 2011, 13: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:
$_SESSION['charge'][$d['prod_id']]=$charge;
to
Code:
//$_SESSION['charge'][$d['prod_id']]=$charge;

Don't ask me why, but it worked for me.
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #995 on: May 18, 2011, 02: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:
// 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/
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 Wink ).
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.
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
paradise4
Newbie
*
Posts: 20


« Reply #996 on: May 27, 2011, 09:44:31 AM »

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 Sad ... Any help would be hihghly appreciated!

paradise4
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #997 on: May 27, 2011, 09:54:22 AM »

Did you set the upload directory correctly in the VM configuration - last tab?
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
paradise4
Newbie
*
Posts: 20


« Reply #998 on: May 27, 2011, 10:24:15 AM »

Yes - and I have discovered the mistake: I used AJAX update, and the upload won't work when it's activated (RTFM  Grin). Would be nice if it worked with AJAX update activated some day, but for the moment I can live with it.

Thanks!
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #999 on: May 27, 2011, 10:50:00 AM »

Great! Yea... tha'ts it. Someday I may have the time to search for a fix for this...
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
paradise4
Newbie
*
Posts: 20


« Reply #1000 on: May 27, 2011, 11:44:15 AM »

 Smiley
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?
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #1001 on: May 27, 2011, 12: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.
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
paradise4
Newbie
*
Posts: 20


« Reply #1002 on: May 28, 2011, 03: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.
Logged
webgobe
Advanced
Sr. Member
*****
Posts: 384


Follow me on Twitter! http://twitter.com/webgobe


WWW
« Reply #1003 on: May 30, 2011, 02: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!
Logged

Like a fine wine... Good from the start and getting better over time.
Donations are welcome!
Pages: 1 ... 65 66 [67]   Go Up
Print
Jump to: