View Full Version : Can Be Ordered Online
Chuckie
27-Nov-2003, 12:32 AM
Hi there comes the time when sometimes we have to take the tick out of the can be ordered online box but still want the product visible on the internet, but when we do this we get the emails 'we tried to order x of your site and there was no add to cart button'
what i would like to do is get actinic to put either a different image there or a message im running catalog v5 and would like to know if this is possible ?
NormanRouxel
27-Nov-2003, 01:07 AM
Three ways spring to mind.
1) Copy your product template to a new file, add a message regarding "Not for Sale" to that template, and use that template for these special products.
2) Make a Custom Property (say NOTFORSALE). Add CUSTOMVAR:NOTFORSALE to yout product template where you want the message to appear. In the not for sale products add a warning message to the custom property NOTFORSALE. Other products will display no message as their NOTFORSALE property is empty.
3) If you want to make this fully automatic you could try this. On your usual product template, where you want the message to appear, add the following. However this adds about 200 bytes to every product you display:-
<script language=JavaScript>
<!--
if ( 'NETQUOTEVAR:ADDTOCARTBUTTON' == '' ) document.write('<font color=red>This product is not for sale.</font>');
// -->
</script>
note all ' characters above are the single quote one - best to copy and paste rather than retype this.
Norman
Chuckie
27-Nov-2003, 01:46 AM
What im trying to acheive is if the show cart image is not displayed i would like to display and icon of a basket crossed out or something like that, that code i uploaded didnt seem to do anything and am i correct in think that would only work if they clicked the cart button.
thanks again
NormanRouxel
27-Nov-2003, 02:37 AM
I presume you're talking about (3). It's totally automatic. Hide a product and the warning message appears instead of the cart button. Unhide and the cart buttons back.
It works fine here. Post your Product Template (Original and Modified ones) so I can see what you've done.
For an image instead of the text all you'd need to do is to replace the bit
<font color=red>This product is not for sale.</font>
with
<img src="notavailable.jpg">
where you create the image yourself and place it in Site1\PreviewHTML and also add this file in Advanced / Additional files.
Norman.
Chuckie
27-Nov-2003, 03:16 PM
im unsure where i have to place the code do i enter the code in act_cartbutton.html
<!-- CartButton HTML begin -->
<!-- This template is used for the add to cart button. -->
<P><INPUT TYPE=SUBMIT VALUE="NETQUOTEVAR:BUTTONLABEL" NAME="NETQUOTEVAR:BUTTONNAME"></P>
<!-- This template is used for the add to cart button. -->
<!-- CartButton HTML end -->
thats whats in there at the moment
just need to know where to place the java script you have posted on here thanks
cdicken
27-Nov-2003, 03:50 PM
It looks like it needs to go into your product layout template (normally Act_ProductLine) in place of NETQUOTEVAR:ADDTOCARTBUTTON.
Chuckie
28-Nov-2003, 12:02 AM
I did as cdicken said and replaced all of the NETQUOTEVAR:ADDTOCARTBUTTON in the file Act_ProductLine and uploaded the website but still no luck, the code i have @ the moment stands like this
<tr>
<td colspan="2" align=LEFT><Actinic:ACTIONS>
<script language=JavaScript>
<!--
if ( 'NETQUOTEVAR:ADDTOCARTBUTTON' == '' ) document.write('<img src="no-cart.jpg">');
// -->
</script>
</Actinic:ACTIONS>NETQUOTEVAR:TEMPLATEENDXML</td>
</tr>
There are two of these in Act_ProductLine but even after adding this line to my file i still am not getting anything, am i editing the wrong bits?
cdicken
28-Nov-2003, 03:29 PM
I've just realised that I've given you the wrong information, sorry.
You are not supposed to use the code as a replacement for NETQUOTEVAR:ADDTOCARTBUTTON. You are just meant to add it to the templates anywhere e.g.
<tr>
<td colspan="2" align=LEFT><Actinic:ACTIONS>
NETQUOTEVAR:ADDTOCARTBUTTON
<script language=JavaScript>
<!--
if ( 'NETQUOTEVAR:ADDTOCARTBUTTON' == '' ) document.write('<img src="no-cart.jpg">');
// -->
</script>
</Actinic:ACTIONS>NETQUOTEVAR:TEMPLATEENDXML</td>
</tr>
As a caveat to the code, it only works if the product has no attributes or choices.
Chuckie
28-Nov-2003, 04:38 PM
If i have a choice can a bit code be added to cover this problem too
NormanRouxel
28-Nov-2003, 05:03 PM
To make this work with products that have Variants.
In your original Product Template replace the fragment
NETQUOTEVAR:ADDTOCARTBUTTON
With
NETQUOTEVAR:VARIANTS
NETQUOTEVAR:VARIANTADDTOCARTBUTTON
<script language=JavaScript>
<!--
if ( 'NETQUOTEVAR:VARIANTADDTOCARTBUTTON' == '' ) document.write('<img src="no-cart.jpg">');
// -->
</script>
Norman
Chuckie
28-Nov-2003, 05:29 PM
I have done alterations that were mentioned on here and have refreshed my website but im still not getting the correct result the image is up there to display out of stock, when the tick has been taken out of the box to say if they can order it online.
I have attached my full Act_ProductLine File maybe im still doing something wrong.
Thanks for help in advance guys.
NormanRouxel
28-Nov-2003, 05:43 PM
In my post above I said REPLACE the fragment NETQUOTEVAR:ADDTOCARTBUTTON ....
You've not replaced it.
Norman
Chuckie
28-Nov-2003, 10:17 PM
I have followed all the in structions in here, maybe its me im still getting nothing displayed if the box in actinic is unticked.
http://www.modelpower.co.uk/acatalog/12v_sla.htm is a good example the 4 item down i would like to put his image i got that shows its not instock this page is running the code with the modifications.
The file attached is modified and different than the last post.
NormanRouxel
28-Nov-2003, 11:22 PM
It works just fine for me here.
The page you refered to above isn't being generated from the template you attached.
Find the Product Template you're really using and patch that. Remember that the image will probably need uploaded via Advanced / Additional files.
To locate this file look in the Product Details / General / Product Layout and click Edit. See what filename opens. If Edit is greyed out look in Design / Options / Defaults / Default Product Layout and click Edit there.
Norman
Chuckie
30-Nov-2003, 04:09 PM
I got it working now thanks fellas :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.