Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Need help creating 2 different out of stock messages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-29-2009, 02:44 PM
 
Hallsons Hallsons is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 84
 

Default Need help creating 2 different out of stock messages

Hello,

I am trying to edit the buy_now.tpl template so that I can display two different messages for whether a product is Out of Stock By Mail (but available at the physical location) or Sold Out (completely gone). I have a nursery business and we only ship certain plants seasonally, but most plants are still available at the nursery in the summer.

My thought was that if I enter a product quantity something like -99 then it would display the message Out of stock by mail, otherwise quantities less than or equal to zero would just give my standard Sold Out message. Or I could do it the flip side - enter some huge number like 9999 and if the quantity available is 9999 then display the message Out of stock by mail.

Anyone able to help me out with my if statements in the buy_now.tpl template? So far I haven't been able to parse it correctly to make it work.

TIA,

Chris
__________________
Chris Wilson
4.7.10 (after 9 years with 4.1.12)
CDSEO Pro
Reply With Quote
  #2  
Old 05-30-2009, 07:12 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Need help creating 2 different out of stock messages

{if $products[product].avail le 99 and $products[product].avail gt 0}Out of Stock By Mail - Pick Up Only{elseif $products[product].avail le 0}Out of Stock{else}In Stock{/if}
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
Hallsons (05-31-2009)
  #3  
Old 05-30-2009, 07:28 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Need help creating 2 different out of stock messages

do you still want people to be able to buy online and pick up? or if it's pick up only they have to purchase offline?
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #4  
Old 05-30-2009, 09:13 AM
 
Hallsons Hallsons is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 84
 

Default Re: Need help creating 2 different out of stock messages

Thank you for the suggestions.

I still want to be able to have people order some items as I ship some things year round. However there are a some items I only ship in the spring, others only in the fall.

What has happened is that our mainly mail order website is now being used locally (and surrounding states) for people to make choices, then they are coming here and buying them. Every once in a while someone places a local order for pick up, but most of the time they just show up with a list they put together from the website.

When an item is no longer available by mail I don't want to disable it, as we are still selling them here, so I wanted to have a message "available for pick up at the nursery only" or something along those lines, but if I am really sold out I want to have it say "Sold Out" or "Out of Stock". Other items will still be available by mail, though.

Hope that helps to clarify it, and I will think more about this here too.

Chris
__________________
Chris Wilson
4.7.10 (after 9 years with 4.1.12)
CDSEO Pro
Reply With Quote
  #5  
Old 05-30-2009, 09:36 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Need help creating 2 different out of stock messages

It seems that setting an artificially large number for inventory levels will be a little messy if you ever what to track true inventory with your X-Cart database.

Instead, you could use a product extra field and set that to some value to indicate a product is available for pick up.

Another option is to use BCS Preorder/Backorder mod. I think you should be able to easily modify the backorder functionality to be the "available for pickup" functionality, but you could check with BCS.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #6  
Old 05-30-2009, 11:17 AM
 
Hallsons Hallsons is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 84
 

Default Re: Need help creating 2 different out of stock messages

Yes, that might work to have an extra options field, however I know I would still get people placing orders and asking to have it shipped. As we all know, most people don't take the time to read the details. Then again, I might be able to backorder those orders until fall or the following spring...

I'll keep thinking about this.

Chris
__________________
Chris Wilson
4.7.10 (after 9 years with 4.1.12)
CDSEO Pro
Reply With Quote
  #7  
Old 05-30-2009, 12:32 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Need help creating 2 different out of stock messages

You could use the product extra field (not an extra option field) to remove the add-to-cart button and replace it with your "product available for pick up" message. That way - customers would not be able to add the item to the cart. If you do that - I'd also suggest adding XCARTMODS X-Cart Direct Product Enquiry Form - so they have a way on the product page to contact you directly about that particular product if they have questions.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #8  
Old 05-30-2009, 03:17 PM
 
Hallsons Hallsons is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 84
 

Default Re: Need help creating 2 different out of stock messages

Now I'm making a little progress. I set up an extra field with "Availability : Out of Stock by mail - may be available for pickup at the nursery." This will appear on the product details page IF I force the quantity to -999. If a product is less than or equal to zero it is out of stock anyway, but when I can no longer ship something I can force the quantity to -999.

However, how do I use this to remove the add-to-cart button? And how do I get it on the product listings when browsing categories?
__________________
Chris Wilson
4.7.10 (after 9 years with 4.1.12)
CDSEO Pro
Reply With Quote
  #9  
Old 05-30-2009, 03:52 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Need help creating 2 different out of stock messages

There are lots of posts on the forum about how to customize the extra fields - it seems complex, but once you get the hang of it - the extra fields can be useful for lots of things. Try this thread for the changes you need to make to use the extra fields on product listing pages.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #10  
Old 05-31-2009, 06:52 AM
 
Hallsons Hallsons is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 84
 

Default Re: Need help creating 2 different out of stock messages

Thanks, I have it working just fine on the product page, am lost when trying to modify the products template, and need to get back to my regular job now. I'll revisit this some other time when my head clears. I know this is really a lot easier than it should be, but for now I'm lost and need to just quit.

Thanks again.

Chris
__________________
Chris Wilson
4.7.10 (after 9 years with 4.1.12)
CDSEO Pro
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:40 AM.

   

 
X-Cart forums © 2001-2020