FCS-Webmaster
VP-CART New User

Canada
120 Posts |
Posted - June 07 2018 : 12:55:17
|
In past versions of VPASP I was able to use [cprice] to insert the price into the description for the sales copy of a product. It had the advantage that if the price of the item was changed then as the web page pulling it from the database the web page would not require any updating. Any suggestions on how to do that in version 8?
I already have tried [formatcurrency cprice] but it doesn''t work in the description.
|
|
manilow
VP-CART New User

France
134 Posts |
Posted - June 07 2018 : 16:14:31
|
Do you mean you inserted previously [cprice] in the text editor in shopa_addproduct.asp ? That would not work since keywords between square brackets are processed in the template before the field data is retrieved from the database, and so is the text in the product descriptions. Keywords between brackets can only be included in the templates.
Erik www.aquathermia.com (vpasp7) |
 |
|
Alex123
VP-CART Super User
 
USA
223 Posts |
|
FCS-Webmaster
VP-CART New User

Canada
120 Posts |
|
manilow
VP-CART New User

France
134 Posts |
Posted - June 07 2018 : 17:27:36
|
I''m not really sure about what you would like to achieve by including the price in the sales copy of a product. Wouldn''t it be appropriate if you add the cprice field somewhere in your product template near the description field? |
 |
|
FCS-Webmaster
VP-CART New User

Canada
120 Posts |
Posted - June 07 2018 : 17:36:50
|
Manilow, to clarify we are selling on the product page a protective mask for your mouth that in the sport of airsoft people shoot BBs at you. The players in this sport frequently get teeth chipped as people are shooting small BBs at them.
I want to add the price of the mask to the line ... Dentists in London currently charge $1000 to $1500 for a cap on a chipped tooth. At only [FORMATCUSTOMERPRICE cprice] our masks are a lot cheaper!
I''m worried that if I change the template to achieve this change it will have an impact on the other 2500 products we have in our VPASP cart. |
 |
|
diegomilito
VP-CART Expert
  
Argentina
779 Posts |
Posted - June 07 2018 : 21:56:55
|
im reading your post and what you want, actually you can set some products you want to use their own template
in add or editing product (im talking about vpasp admin area) , under Advanced Fields , you get to see what it called "Template File (template)", just create the new template for your certain products maybe call it tmp_product_mask.htm
what i m suggesting this, so that it will not affecting to all other products.
diego. |
 |
|
manilow
VP-CART New User

France
134 Posts |
Posted - June 08 2018 : 03:50:37
|
FCS-Webmaster thanks for your explanations which make it very clear to me. There is a way to achieve this but you have to modify some code.
Go to shopprotabs.asp, around line 94, add the following lines in green:
case "xproductextdesc" ''701 - 2011.04.19 - Enhancement: Speed enhancement fixes fieldvalue = parseRS("extendeddesc")
transvalue=TranslateLanguage(dbc, "products", "extendeddesc","catalogid", parsers("catalogid"), fieldvalue) htmlwrite "<br />" ''code modification : allow cprice field in extended product description if instr(transvalue,"[cprice]")>0 or instr(transvalue,"& #91;cprice& #93;")>0 then dim descprice descprice = HandleCustomerPrice(parsers("cprice"), parsearray, parseRS) transvalue=replace(transvalue,"[cprice]",descprice) transvalue=replace(transvalue,"& #91;cprice& #93;",descprice) end if htmlwrite transvalue
This should work without affecting other products. You may have to add some lines if you want taxes to be included. Remove the spaces between & and #91/#93 which were needed for display on the forum.
Regards. |
 |
|
apswater
VP-CART Super User
 
444 Posts |
Posted - June 08 2018 : 14:23:33
|
I would think you can just use the Template Listing field listed on the edit page for the product and make a different template for those products. That seems the easiest way.
Although I do like Manilows approach. Also be careful the tick marks convert to quote marks on this forum. tick marks for comments and quotes for code. |
Edited by - apswater on June 08 2018 14:27:28 |
 |
|
Alex123
VP-CART Super User
 
USA
223 Posts |
Posted - June 08 2018 : 15:13:07
|
As diegomilito mentioned the template option should be working for you. Alex |
 |
|
apswater
VP-CART Super User
 
444 Posts |
|
|
Topic  |
|