[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] mv_price and CommonAdjust
- Subject: [ic] mv_price and CommonAdjust
- From: interchange-users@icdevgroup.org (Karen Gold)
- Date: Mon Oct 14 13:30:01 2002
- In-reply-to: <20021014160002.17731.12405.Mailman@linux20118>
Hi John,
Here's how I got a price override to work on 4.8.7 for the IC admin order
entry page.
Mike Heins also mentioned:
[set mv_UseModifier]mv_price[/set]
in the html page, but I haven't got it to work, so I used UseModifier in the
catalog.cfg.
Change CommonAdjust and add UseModifier in ./catalogs/_STORE_/catalog.cfg:
The first CommonAdjust entry needs to be "$".
CommonAdjust $, ;:sale_price, ;:price, ==:options
UseModifier mv_price
Makesure after.cfg isn't change CommonaAdjust to something different than in
catalog.cfg
./catlogs/_STORE_/etc/after.cfg
Restart IC if you make changes in the cfg's.
./interchange/lib/UI/pages/admin/entry.html
[item-list]
[comment} modifier-name only works in item-list [/comment]
<TR BGCOLOR=__UI_C_INTBLOCK__>
<TD BGCOLOR=__UI_C_INTBLOCK__ VALIGN=TOP align=center>
<FONT SIZE="-2"><INPUT TYPE=checkbox NAME="[quantity-name]"
onClick="this.form.action='[process-target]',
this.form.submit()"
VALUE=0>remove</FONT> [item-code]</TD>
<TH BGCOLOR=__UI_C_INTBLOCK__ WIDTH="2"> </TH>
<TD BGCOLOR=__UI_C_INTBLOCK__ VALIGN=TOP MARGINWIDTH=12
MARGINHEIGHT=12>
[page [item-code]][item-description]</A>
[if-item-field weight]
<SMALL>WEIGHT: [summary amount=`[item-quantity] * [item-field
weight]`]</SMALL>
[/if-item-field]
[if-item-data options o_enable]
<br>
<table>
[table-organize cols=2]
[item-options td=1]
[/table-organize]
</table>
[/if-item-data]
</TD>
<TD BGCOLOR=__UI_C_INTBLOCK__ VALIGN=TOP ALIGN=CENTER>
<INPUT TYPE=text NAME="[quantity-name]" VALUE="[item-quantity]"
SIZE=3>
</TD>
<TD BGCOLOR=__UI_C_INTBLOCK__ VALIGN=TOP ALIGN=RIGHT>
[discount-price]
[if discount [item-code]]
<BR><FONT COLOR=__CONTRAST__ SIZE=-2>[L]Item is
discounted[/L]
[item-discount]
</FONT>
[/if]
<INPUT NAME="[modifier-name mv_price]" value="[item_modifier
mv_price]" size=12>
</TD>
<TH BGCOLOR=__UI_C_INTBLOCK__ WIDTH="2"> </TH>
<TD BGCOLOR=__UI_C_INTBLOCK__ VALIGN=TOP ALIGN=RIGHT>
[item-subtotal]
</TD>
</TR>
<TR><TD ALIGN=CENTER COLSPAN=7><IMG SRC="clear.gif" WIDTH="1" ALT=""
HEIGHT="1" BORDER="0"></TR>
[/item-list]
I didn't notice it at first, so I'll mentions again.
modifier-name only works in [item-list]
http://www.icdevgroup.org/cgi-bin/ic/docfly.html?mv_arg=ictemplates08.10
--
Karen Gold <kareng@LOADUP.COM>
http://www.loadup.com
> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of
> interchange-users-request@icdevgroup.org
> Sent: Monday, October 14, 2002 9:00 AM
> To: interchange-users@icdevgroup.org
> Subject: interchange-users digest, Vol 1 #1116 - 63 msgs
>
>
> Message: 32
> Date: Mon, 14 Oct 2002 11:47:37 +0100
> From: John Allman <allmanj@houseofireland.com>
> To: interchange-users@icdevgroup.org
> Subject: Re: [ic] mv_price and CommonAdjust
> Reply-To: interchange-users@icdevgroup.org
>
> Dan Browning wrote:
>
> > At 03:59 PM 10/11/2002 +0100, you wrote:
> >
> >> Hi - I'm still trying to manually set the price of an item when
> >> ordering. I've managed to set mv_price for that item to a new value
> >> and have confirmed that the item has this new value for mv_price in
> >> the cart by using [dump]. I am having problems getting it to display
> >> this new price on the basket page. I'll be the first to admit that my
> >> understanding of CommonAdjust is as vague as can be but i believe i
> >> need to alter it in catalog.cfg to allow me to override the price
> >> with mv_price? I've tried CommonAdjust $ in catalog.cfg but it makes
> >> no difference.
> >>
> >> I am quite over my head here - can anyone point me in the right
> >> direction?
> >>
> >> John
> >
> >
> > Make sure your after.cfg isn't overwriting your CommonAdjust.
> >
> I have no etc/after.cfg. There only appears to be one
> CommonAdjust statement
>
> [root@linux1 hoi.new]# grep -r CommonAdjust *
> catalog.cfg:# CommonAdjust "[hoipricesub]"
> catalog.cfg:CommonAdjust $
> catalog.cfg:# CommonAdjust pricing:price_group,q5,q10: ;:wholesale ;$
> catalog.cfg:# This makes CommonAdjust effective, since no_price doesn't
> exist
> [root@linux1 hoi.new]
>
> I found a mail before in the archives where Mike Heins pretty much spelt
> out how to do this but search as i might i have been unable to find it:(
>
> Reading the documentation, there seems to be something called
> attribute-based adjustment:
>
> *"==attribute:table*:column*:key**
>
> Does an attribute-based adjustment. The attribute is looked up in
> the database *table*, with the optional *column* defaulting to the
> same name as the /value/ of the *attribute*. If the column is not
> left blank, the /key/ is set to the /value/ of the *attribute* if
> blank."
>
> Has anyone had any experience using this? Ideally what i want is that if
> an attribute is set for an item, a database lookup is done and the price
> is set to the value of a specific field for that item. Is there better
> way to do this? I dont really understand how to use the above
> CommonAdjust string to do what i want and i cant find an example in the
> documentation. Could someone post one?
>
> I found the following in the documentation which is confusing me a lot:
>
> "If the value of the CommonAdjust directive is set to a
> CommonAdjust string, and the price field is empty or specifically
> /0/, then it will be used to set the price of the items."
>
> This seems to imply that if the price field is not empty and is not
> speciffically 0 then the CommonAdjust string will not be used no matter
> what... Am i misunderstanding?
>
> any help or advice would be appreciated
>
> thanks
>
> John
>
>
>
>
>