View Single Post
  #4  
Old 04-30-2003, 09:09 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default Almost finished my own version...

If anyone wants to clue me into how you chose to write your javascript validation and exceptions code to work on multiple products on the same page, I'd love to hear it. I don't need the code, just the logic. I've resorted to using a preg_replace to parse out the function names and give them numbers. Was this part of your solutions or did you find a more elegant approach?

I've got the code working on my test server (though I still need to add the quantity select menu to the products.tpl) with only one minor problem left to solve (one of my Javascript functions is being incorrectly numbered because I'm using the wrong increment variable).

Post UPdate: I think I've finally conquered this one. It was definitely a brain teaser and I still haven't tested it with the validation exceptions, but now my script displays product options (but not quantity) on the products.tpl page. It ain't pretty and I had to stoop so low as to grab some php array values by numeric index rather than by associative index and do some lame preg_replace-ing, but it seems to work for me. I'll post the results of my hair-pulling session in a bit.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote