[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Strange behaviour when ordering multiple items w/options


Quoting marc.brevoort (suppressed):
> Hello group,
> 
> > Hmm. I think that the ability to accept separate mv_sku variables for
> > the "separate widgets" prevents ordering multiple matrix items. My guess
> > is you can't do what you want to do.
> 
> Below a 'diff' showing what I changed in Order.pm (4.8.5) to allow ordering
> multiple items with matrix options.
> 
> As I haven't given myself the time to get really deep into the code, I 
> suppose I've broken a thing or two, although for now it *seems* things 
> are working OK. Mike, could you shed your light on this? Thanks again for 
> having helped me out!

I will put it in my todo list, to evaluate the consequences and see if 
it makes sense to do it (or provide a reasonable alternative for multiple
matrix orders...)

Thanks.

> 
> To all group members: This patch is not official! Use at your own risk!
> 
> Regards,
> 
> Marc Brevoort
> 
> ====
> 
> 1713a1714,1716
> > # Patch: Added my (@sku);
> > 	my(@sku);
> > # Patch end
> 1760c1763,1766
> < 		my @sku = split /\0/, $CGI::values{mv_sku}, -1;
> ---
> > # Patch: To make sku array available in a broader scope
> > #		my @sku = split /\0/, $CGI::values{mv_sku}, -1;
> > 		@sku = split /\0/, $CGI::values{mv_sku}, -1;
> > # Patch end
> 1765c1771,1773
> < 		$items[0] = join '-', @sku;
> ---
> > # Patch: Do not modify the sku of any item.
> > #		$items[0] = join '-', @sku;
> > # Patch end
> 1803a1812,1814
> > # Patch: To get correct sku from sku array.
> > 	my $loopcount = 0;
> > # Patch end
> 1804a1816
> > 
> 1805a1818,1822
> > # Patch: To get correct un-extended sku from sku array
> > 		my $currentsku=$sku[$loopcount] if defined $sku[$loopcount];
> > 		logError("Adding item $currentsku to cart, loopcount=$loopcount.\n");
> > 		$loopcount=$loopcount+1;
> > # Patch end
> 1883,1884c1900,1903
> < 			$item->{mv_sku} = $skus[$i] if defined $skus[$i];
> < 
> ---
> > # Patch: This allows ordering multiple items with options.
> > #			$item->{mv_sku} = $skus[$i] if defined $skus[$i];
> > 			$item->{mv_sku} = $currentsku if defined $currentsku;
> > # Patch end
> èd5
> _______________________________________________
> interchange-users mailing list
> suppressed
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <suppressed>

Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.