Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Product is 'to order' is this possible?

Product is 'to order' is this possible?

Locked

Views: 1,395

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
18 Sep 2007, 12:59 PM
#1
nemo avatar

nemo

New Zenner

Join Date:
Sep 2007
Location:
Enebakkneset, Norway
Posts:
2
Plugin Contributions:
0

Product is 'to order' is this possible?

I have searched this topic considerably but to no avail.

What I am trying to do is to have some products in a to order status, that is rather than appearing as sold out, which screams negativity.

My site is to showcase available designs as well sell finished pieces (limited edition jewellery)

Many thanks to any that can help

Neil

18 Sep 2007, 3:30 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product is 'to order' is this possible?

Add this line to
/includes/languages/english/your_template/product_info.php

Line #20 : define('TEXT_PRODUCT_O_O_S', 'Made to Order');

and in
/includes/templates/your_template/templates/tpl_product_info_display.php

edit this line to look like this:

(in Product Details section - your number will be different) Line #102 : <?php echo ((/*$flag_show_product_info_quantity == 1 and */$products_quantity <=0) ? '<li>' . TEXT_PRODUCT_O_O_S . '</li>' : '') . "\n"; ?>

This will not show quantity in stock. If you want that, delete the /* */ comment marks.

18 Sep 2007, 3:50 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product is 'to order' is this possible?

To show quantity in stock, and "Made to Order" if out of stock, edit your product details list code to this:

<!--bof Product details list  -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
  <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?>
<!-- made to order code -->
<?php echo (($products_quantity <=0) ? '<li>' . TEXT_PRODUCT_O_O_S . '</li>' : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity >0) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
<!-- made to order code -->
  <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<br class="clearBoth" />
<?php
  }
?>
<!--eof Product details list -->
19 Sep 2007, 10:07 PM
#4
nemo avatar

nemo

New Zenner

Join Date:
Sep 2007
Location:
Enebakkneset, Norway
Posts:
2
Plugin Contributions:
0

Re: Product is 'to order' is this possible?

Hi Glenn
Thanks for the quick reply.
Right, a few questions if you have the time:

*I presume all changes to the product details list code are done to filename: *
tpl_product_info_display.php
and this should be a file that resides in my_template/templates

Were you advising me to follow both steps that you have kindly posted?*

*Do I need to change any settings in Admin/configuration/stock ? *
specifically:
'Products status in Catalog when out of stock should be set to'
'Show Sold Out Image in place of Add to Cart'

I have tried several different methods\combinations of the above, editing files within templates/my_template and languages/english/my_template.
I was unable to get this to work correctly.

However, when setting:'Products status in Catalog when out of stock should be set to' to being true,
I can see some text on the product page: 'TEXT_PRODUCT_O_O_S' So it looks like I am editing the correct files, but editing incorrectly.

I really appreciate your time, I am a complete newbie to this, though am self-taught, determined and stubborn.

Cheers
Neil

20 Sep 2007, 8:00 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product is 'to order' is this possible?

Correct, you will edit /your_template/templates/tpl_product_info_display.php.

Which post you follow depends on what you want. My first post was simply a copy of my setup, which is not to show stock except for the "Made to Order" message if out.

If you want only the MTO, use this line:```php

<?php echo (($products_quantity <=0) ? '<li>' . TEXT_PRODUCT_O_O_S . '</li>' : '') . "\n"; ?>

If you want stock levels  if in stock and MTO if out of stock, use both lines:```php
<?php echo (($products_quantity <=0) ? '<li>' . TEXT_PRODUCT_O_O_S . '</li>' : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity >0) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
```You will also want the "show quantity in stock" set to true for this option.

It will make no difference where you put the define in product_info.php, as long as you copy it correctly. If you see 'TEXT_PRODUCT_O_O_S' in the store display, the code is not finding the define statement, or there is something wrong with the statement.

I presume you want to allow customers to add to cart even when the "Made to Order" message is showing, so you would not want to change the add to cart to a "sold out" image.

And thanks for the compliments on our Thor's hammers! It means a lot coming from a Norwegian jeweler.
19 Feb 2008, 12:32 PM
#6
rjspomer avatar

rjspomer

Zen Follower

Join Date:
Jan 2008
Posts:
173
Plugin Contributions:
0

Re: Product is 'to order' is this possible?

Hi Glen,
Your script is just what I wanted but for some reason I don't get the stock quantity to adjust after a item is put in the cart. If I have one item in stock it just stays at one item and will let me add any amount with out changing the 1 quantity.

RJ

19 Feb 2008, 5:09 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product is 'to order' is this possible?

Settings in Configuration > Stock that may be relevant to you:

Check stock level true
Subtract stock true <---------------
Allow Checkout true
Mark product out of stock Made to Order
Stock Re-order level 5
Products status in Catalog when out of stock should be set to 1
Show Sold Out Image in place of Add to Cart 0

19 Feb 2008, 7:57 PM
#8
rjspomer avatar

rjspomer

Zen Follower

Join Date:
Jan 2008
Posts:
173
Plugin Contributions:
0

Re: Product is 'to order' is this possible?

Glenn that worked great!! Thanks, now I would like to change/add a statement to the:

"Products marked with Made to Order are out of stock.
Items not in stock will be placed on backorder.

I would like to change the second line to "Orders will be taken but please allow 7 days for production of Items not in stock.

I did the changes in includes/language/english/shopping_cart.php

It seems to work but I would like to ask if this is correct and if you may have other suggestions for made to order products.

Zen cart is good but it is people like you in this forum that makes it a great product

Thanks a lot RJ

19 Feb 2008, 9:16 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product is 'to order' is this possible?

If you changed the defined text and it works, that says it all...

Good work!

Oh, by the way, you should save the edited file to your template folder:

/includes/language/english/your_template/shopping_cart.php

so it doesn't get erased when you next upgrade to a new version of Zen Cart.