Print Page | Close Window

Code in product boxes

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=5325
Printed Date: 01-November-2024 at 12:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Code in product boxes
Posted By: GreggS
Subject: Code in product boxes
Date Posted: 23-October-2012 at 12:58pm
This might be a simple thing.

I just found out you can put code into some of the boxes when modifying a product not just the long description.

For example some things are special order so we check Not For Sale and add this to the message:

Please call or <a href=contact.asp>contact</a> us to check for availability and ordering

In the short description we added a picture instead of text.

<br><a href=http://www.1st-line.com/store/pc/configurePrd.asp?idproduct=5287><img src="test-sale.jpg"></a><br><br>

We're trying to add code that has an "if" statement.  When we put that in, it displays text not code.  We tried adding around the code - quotes, brackets, <body> - but it still reads as text.



Replies:
Posted By: Guests
Date Posted: 23-October-2012 at 5:25pm
Hi Gregg,

It reads as text because it is text. You can't store server-side code in the db and expect it to execute because the server side code executes before pulling the textual content from the db. You could inject client-side code such as HTML, JavaScript, etc., but not server-side code.


Posted By: GreggS
Date Posted: 23-October-2012 at 5:30pm
Thanks.  I had a feeling it wouldn't work.  I just won a bet :)


Posted By: Guests
Date Posted: 24-October-2012 at 2:31am
Glad you won some dig there ... but back to the UI issue you are trying to solve. It's possible that the condition your trying to hedge against could be handled with client side code (esp. with the magic of AJAX).

Want to explain exactly what you're trying to accomplish here? I'm all ears.


Posted By: GreggS
Date Posted: 24-October-2012 at 11:18am
It's part of our BTO scenario.  I posted a long description of our (complex) scenario somewhere but I can't find it.   On some Standard Products, we put a link(which is a picture) in the short description which goes straight to a BTO Product configuration page.  We have custom code for BTO to prevent going to the configuration page if all items in a required category are out of stock.  It didn't give a message or anything it just went to the BTO Product detail page and if you try to hit the Customize button again it goes to the config page and back to the detail page in the blink of an eye.  Customers would probably think the button is broken.  So what my boss tried to do is copy the "if" statement code that displays the Availability: Out of Stock and use that code in the short description.

---If Availability is out of stock ---> don't show the link
---else ---> show the link

I told him I don't think that would work.  He bet me and I won.


Posted By: whizzinpc
Date Posted: 26-October-2012 at 1:54pm
I'm pretty sure that's possible. You just have to do it directly in the asp code.


Posted By: Guests
Date Posted: 26-October-2012 at 2:47pm
Hi Gregg,

Could you post us an example link? A picture being worth a thousand words? If you need this embedded somewhere in the middle of the description (rather than before or after it, in which case Art is correct), I might be able to come up with a client-side option for you.


Posted By: GreggS
Date Posted: 29-October-2012 at 1:55pm
We have a workaround that we might be able to live with.  Originally we had BTO Products visible and the Standard Products in a hidden category.  Now we flipped it and the BTO Products are in the hidden category.

Here is an example of an item that is in stock.
http://www.1st-line.com/store/pc/Bezzera-Strega-Commercial-Espresso-Machine-switchable-tank-direct-connect-A107-126p4422.htm" rel="nofollow - http://www.1st-line.com/store/pc/Bezzera-Strega-Commercial-Espresso-Machine-switchable-tank-direct-connect-A107-126p4422.htm
The item is a Standard Product.  The picture in the short description points to the BTO Product configuration page.

Here is an example of an item that is out of stock.
http://www.1st-line.com/store/pc/ECM-Germany-Barista-Commercial-Espresso-Machine-tank-C104-127p10.htm" rel="nofollow - http://www.1st-line.com/store/pc/ECM-Germany-Barista-Commercial-Espresso-Machine-tank-C104-127p10.htm
The out of stock message shows up but the BTO link is still there.  With the custom code, since the required category doesn't have an item underneath that has stock, it redirects to the BTO Product details page; and because it's in a hidden category you get that "error" page.  We also reworded the page and put a back link in there.

This is something we can live with.  Taking it to the next step would be to hide the link or replace the link with a message like "No Package Deals Available At This Time."  If it's something simple to add that would be great, but if we had to change multiple files we would rather not.

This could be up for debate.  Looking at it from a customer's point of view and not a ProductCart point of view, does this current setup look unappealing, where you see a big button leading to a Special Sale only to be redirected to another page that says there is no sale?  Or do you think it's  implied enough that there wouldn't be a sale when there is a message underneath that says Out Of Stock?  The out of stock button does show up in search results.
http://www.1st-line.com/store/pc/showsearchresults.asp?pageStyle2=H&resultCnt2=15&keyword=ECMG88074&submit=Go" rel="nofollow - http://www.1st-line.com/store/pc/showsearchresults.asp?pageStyle2=H&resultCnt2=15&keyword=ECMG88074&submit=Go


Posted By: Guests
Date Posted: 29-October-2012 at 2:21pm
Hi Gregg,

Thanks for this. I can see that the "Package Deal" button is outside of the content of the short description. It should be very easy to make the not show when the "Notify Me" button shows -- even easier if we put them in the same place.

I'll have Kelly take a look at this and at the "Notify Me" button not showing on the search results page.


Posted By: GreggS
Date Posted: 29-October-2012 at 2:32pm
The Notify Me stuff works ok.  The button does show up on the http://www.1st-line.com/store/pc/showsearchresults.asp?pageStyle2=H&resultCnt2=15&keyword=ECMG88074&submit=Go" rel="nofollow - search results page .  I'm pretty sure I put the code that shows the "package deal" button in the short description

Inside the short desciption box.
<br><a href=http://www.1st-line.com/store/pc/configurePrd.asp?idproduct=4627><img src="http://www.1st-line.com/store/pc/catalog/misc/package-deal.jpg"></a><br><br>


Posted By: whizzinpc
Date Posted: 02-November-2012 at 5:27pm
Why don't you just skip the product details page and go straight to the BTO configure page. Just put the description on that page along with the graphics.
The product details page don't make sense to me... the drop down menus don't give a description of what they are.
You might as well have just one page... then sell them on the specials from the same page instead of going to another one.
In a products bto settings... you can choose Skip Product Details Page:


Posted By: GreggS
Date Posted: 05-November-2012 at 11:02am
We were experimenting with that.  The problem we have is that the descriptions of some products can be very very long.  Here is one I can think of, and we have others that are longer.
http://www.1st-line.com/store/pc/Vibiemme-Double-Domobar-Commercial-Espresso-Machine-V3-manual-DB-tank-DC-switchable-rotary-pump-94p3.htm" rel="nofollow - http://www.1st-line.com/store/pc/Vibiemme-Double-Domobar-Commercial-Espresso-Machine-V3-manual-DB-tank-DC-switchable-rotary-pump-94p3.htm

Plus all the little extra features of the Product Details page don't show up on the Product Configuration page (+AddThis, Tell A Friend, social icons, product reviews etc).  Down the line we wanted to incorporate the tabbed products add-on to shorten the pages.

What I was mainly concerned with was showing a button that guides people to Special Package Deal only to come to a page that says it's unavailable.  Kind of like a person seeing an advertisement for a product, driving to the store, reading a sign that tells them where it is located in the store, and then coming to an empty shelf.  A lot of people can understand that, but some people can be ridiculous.  Some people will actually call to complain because they wasted a few clicks.  I think though we have covered as much as we can with what we have - displaying Out Of Stock in 2 places, customizing the "error" page.
http://www.1st-line.com/store/pc/msg.asp?message=86" rel="nofollow - http://www.1st-line.com/store/pc/msg.asp?message=86

We shall see if that's enough for customers when we go live.


Posted By: GreggS
Date Posted: 02-May-2013 at 2:57pm
We started setting up a leasing/financing option on our site.

Here is an example
http://www.1st-line.com/store/pc/viewPrd.asp?idproduct=1105" rel="nofollow - http://www.1st-line.com/store/pc/viewPrd.asp?idproduct=1105

Here is the code which we put in the short description:
<iframe id = "LeaseStationButton" style = "height: 70px; width: 168px; overflow: hidden;" scrolling = "no" rel = "nofollow" frameborder = "0" src = "https://secure.LeaseStation.com/marketing/financing-buttons.cfm?VendorCode=yr524xn&ButtonSize=CheckWithGradiant&AmountToFinance=3998.00&ProductId=40800.0000&ProductName=Bunn+LCR-3+HV+High+Volume+Liquid+Coffee+Refrigerated+Dispenser+-+Scholle+QC+connector+type"></iframe>

The 3 underlined values can be replaced with values so you don't have to hard code the values in.  I tried finding what the variables are.  I saw this code on the viewPrdCode.asp page:
response.write scCurSign & money(pPrice)
and I am assuming that money(pPrice) is the variable for the online price.  I tried putting that in but it is not displaying the price correctly.

Are variables considered server side code?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net