Post by deanfourie » Tue Apr 22, 2014 9:17 pm

Hey guys, a request here, quite surprised on the lack of availability on this type of module.

What I am after is a stock indication of a date when stock is expected to be back in stock. Instead of just displaying out of stock or pre-order, at least let the customers know that stock is on its way and just around the corner.

Had one, but looks quite old and seems like theres no longer any support! Im running OC 1.5.6
http://www.opencart.com/index.php?route ... on_id=4753

So, if anyone's up to the challenge or knows of something that could help me accomplish this that would be awesome.

Thanks

www.quadscene.co.nz

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by deanfourie » Wed Apr 23, 2014 6:43 pm

Anyone?

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by labeshops » Wed Apr 23, 2014 8:39 pm

I use the one you linked to. Haven't tried it in 1.5.6 but it should work.

Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by deanfourie » Wed Apr 23, 2014 8:55 pm

Ok ill give it a shot. Cheers

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by deanfourie » Thu Apr 24, 2014 7:42 pm

Someone please help me. According to the readme (attached) i need to find the text

<span><?php echo $text_stock; ?></span> <?php echo $stock; ?>

In /catalog/view/theme/[YOUR THEME NAME]/template/product/product.tpl

However, I cannot find this text in the file product.tpl.

Any idea how I can get it to display the date when the stock will be arriving?

Do I need to do something with VQMOD?

Thanks guys!

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by deanfourie » Thu Apr 24, 2014 10:32 pm

Thanks for the reply.

I found

Code: Select all

<td><?php echo $text_stock; ?></td>
and replaced it with

Code: Select all

<td><span><?php echo $text_stock; ?></span>
<?php
	if (isset($product_info['location']) &&  $i = strpos($product_info['location'], '-instock') !== false ){
		if (isset($product_info['stock_status_id']) && $product_info['stock_status_id'] == 5){
			$i = strpos($product_info['location'], '-instock');
			echo 'Back In Stock ';
			$hold = substr($product_info['location'], $i + 8);
			echo date('M-d-Y', mktime(0, 0, 0, substr($hold, 5, 2), substr($hold, 8, 2), substr($hold, 0, 4)));
		} else if (isset($product_info['stock_status_id']) && $product_info['stock_status_id'] == 8){
			echo 'Pre Order ';
			$hold = trim(substr($product_info['location'], $i + 8));
			if ($hold != ''){
				echo date('M-d-Y', mktime(0, 0, 0, substr($hold, 5, 2), substr($hold, 8, 2), substr($hold, 0, 4)));
			}
		} else {
			echo $stock;
		}
	} else {
		if (isset($product_info['stock_status_id']) && $product_info['stock_status_id'] == 8){
			echo 'Pre Order';
		} else {
			echo $stock;
		}
	}
?></td>
Still with no luck.

Any ideas?

Thanks again!

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by deanfourie » Thu Apr 24, 2014 10:35 pm

PS. There appears to be NO support for this plugin, so I did purchase with that in mind, but I guess im a bit stuck now :(

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm

Post by deanfourie » Fri Apr 25, 2014 5:10 pm

Can someone please help me with this.

Im really quite desperate to get this up and running!

Cheers

New member

Posts

Joined
Sat Mar 22, 2014 9:01 pm
Who is online

Users browsing this forum: No registered users and 3 guests