[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Strange behaviour when ordering multiple items w/options
Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> Hello group,
>=20
> >=A0Hmm. I think that the ability to accept separate mv_sku variables for
> >=A0the "separate widgets" prevents ordering multiple matrix items. My gu=
ess
> >=A0is you can't do what you want to do.
>=20
> Below a 'diff' showing what I changed in Order.pm (4.8.5) to allow orderi=
ng
> multiple items with matrix options.
>=20
> As I haven't given myself the time to get really deep into the code, I=20
> suppose I've broken a thing or two, although for now it *seems* things=20
> are working OK. Mike, could you shed your light on this? Thanks again for=
=20
> having helped me out!
I will put it in my todo list, to evaluate the consequences and see if=20
it makes sense to do it (or provide a reasonable alternative for multiple
matrix orders...)
Thanks.
>=20
> To all group members: This patch is not official! Use at your own risk!
>=20
> Regards,
>=20
> Marc Brevoort
>=20
> =3D=3D=3D=3D
>=20
> 1713a1714,1716
> > # Patch: Added my (@sku);
> > my(@sku);
> > # Patch end
> 1760c1763,1766
> < my @sku =3D split /\0/, $CGI::values{mv_sku}, -1;
> ---
> > # Patch: To make sku array available in a broader scope
> > # my @sku =3D split /\0/, $CGI::values{mv_sku}, -1;
> > @sku =3D split /\0/, $CGI::values{mv_sku}, -1;
> > # Patch end
> 1765c1771,1773
> < $items[0] =3D join '-', @sku;
> ---
> > # Patch: Do not modify the sku of any item.
> > # $items[0] =3D join '-', @sku;
> > # Patch end
> 1803a1812,1814
> > # Patch: To get correct sku from sku array.
> > my $loopcount =3D 0;
> > # Patch end
> 1804a1816
> >=20
> 1805a1818,1822
> > # Patch: To get correct un-extended sku from sku array
> > my $currentsku=3D$sku[$loopcount] if defined $sku[$loopcount];
> > logError("Adding item $currentsku to cart, loopcount=3D$loopcount.\n"=
);
> > $loopcount=3D$loopcount+1;
> > # Patch end
> 1883,1884c1900,1903
> < $item->{mv_sku} =3D $skus[$i] if defined $skus[$i];
> <=20
> ---
> > # Patch: This allows ordering multiple items with options.
> > # $item->{mv_sku} =3D $skus[$i] if defined $skus[$i];
> > $item->{mv_sku} =3D $currentsku if defined $currentsku;
> > # Patch end
> =08=E8d5=08=11
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
--=20
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun