[ic] Redefine variable

Chad Wittrock interchange-users@interchange.redhat.com
Mon Sep 10 14:37:01 2001


> -----Original Message-----
> From: interchange-users-admin@interchange.redhat.COM
> [mailto:interchange-users-admin@interchange.redhat.COM]On Behalf Of Ed
> LaFrance
> Sent: Monday, September 10, 2001 11:21 AM
> To: interchange-users@interchange.redhat.COM
> Subject: RE: [ic] Redefine variable
>
>
> At 09:51 AM 09/10/2001 -0500, you wrote:
> > > -----Original Message-----
> > > From: interchange-users-admin@interchange.redhat.COM
> > > [mailto:interchange-users-admin@interchange.redhat.COM]On Behalf Of
> > > mheins@redhat.COM
> > > Sent: Friday, September 07, 2001 3:12 PM
> > > To: interchange-users@interchange.redhat.COM
> > > Subject: Re: [ic] Redefine variable
> > >
> > >
> > > Quoting Ron Phipps (rphipps@reliant-solutions.com):
> > > > > From: interchange-users-admin@interchange.redhat.com
> > > > [mailto:interchange-
> > > > > users-admin@interchange.redhat.com] On Behalf Of Chad Wittrock
> > > > >
> > > > > Is there a way I can redefine a variable within IC? I
> would like to
> > > > > redefine
> > > > > [shipping] from its default to :
> > > > >   [set total_shipping]0[/set]
> > > > >   [item-list]
> > > > >                   [seti total_shipping][calc]
> > > > >                   [scratch total_shipping] + ([item-field
> > > > shipping] *
> > > > > [item-quantity])
> > > > >                   [/calc][/seti]
> > > > >   [/item-list]
> > > > >   [set shipping][scratch total_shipping][/set]
> > > > >
> > > > > Where do I find where [shipping] is defined or is this
> not possible?
> > > >
> > > > You may want to look into using the standard shipping
> routines instead
> > > > of redefining what shipping does.  It seems like you could setup a
> > > > formula in the shipping.asc to use the shipping field for
> each product
> > > > to determine the shipping amount.  Take a look at the shipping
> > > > documentation for how to setup formulas.
> > >
> > > That particular one is quite easy, unless I am missing something:
> > >
> > > STD   Standard Shipping       shipping        0       0       e
> > > Nothing to ship!
> > > STD   Standard Shipping       shipping        0       99999
> f @@TOTAL@@
> > >
> >
> >I added these lines (tab seperated fields per line) to shipping.asc and
> >restarted interchange. When I visit my cart, I get a value of $0.00 for
> >shipping instead of the correct amount. I am displaying [shipping] at my
> >cart. This is correct right? Have I missed something? I am new to editing
> >shipping.asc. I read over the minivend shipping documents and I
> think I did
> >this correctly.
> >
> >Can you give me some more assistance?
> >
>
> You need to determine why shipping is evaluating to zero.  Do you have a
> column named shipping in your products table, and did you load it with
> values for each item?

Yes.

>Did you add the mode 'STD' to the appropriate column in your country table?

No.

>Did you make it the default shipmode in your catalog.cfg
> (http://ic.redhat.com/cgi-bin/ic/dev-4.8/icconfig_83.html)?

Again, no.

> Put [data session ship_message] on your pages/ord/checkout.html page -
what does it
> say?  On the first line of the new entries for shipping.asc add a message
> after 'e', like 'got zero shipping line', and see if that message
> shows up
> on the checkout page as [data session ship_message]; that would tell you
> that the shipping routine is not getting the accumulated value of
> shipping
> for some reason.
>
> Also the space between 'f' and '@@TOTAL@@' is a space character,
> not a tab (likewise for 'e' and your error message).

I did have that. :)

> If you downloaded shipping.asc and edited it on a Bill Gates wonderbox, it
may contain carriage returns; strip them out thusly on the *nix command
line, from within the products directory:

No editing was done with M$ products.

>
> perl -i.bak -p -e 's/\r//g' shipping.asc
>
> That's all I can think for now.
>
> - Ed L.

Thanks for all your helpful comments Ed. I did have the shipping field in
the products table and did have values in them. I removed the entries for US
in the country table and replaced them with STD. I also editted catalog.cfg
to make STD my standard shipping mode. Restart IC and it appears to work
now.

Thank you very much for your help!
Chad

>
>
>
> ===============================================================
> New Media E.M.S.               Software Solutions for Business
> 463 Main St., Suite D          eCommerce | Consulting | Hosting
> Placerville, CA  95667         edl@newmediaems.com
> (530) 622-9421                 http://www.newmediaems.com
> (866) 519-4680 Toll-Free       (530) 622-9426 Fax
> ===============================================================
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users