Post by designconscious » Thu Sep 08, 2011 4:46 pm

OpenCart: v1.5.1
Install: Clean

Hi,

My client has a need to do two things which I see as being linked. First he sells items in his retail store that can not be sold online (chainsaw for example) however, he obviously needs these items to appear on the site, but the button needs to be removed thus preventing ordering.

He also wants to be able to take an order for the an item but force that item to be collect in store only.

Is this possible to achieve any of this from the admin settings or does it require a mod? If so Is there such a mod available?

I'm hoping you can help, please shout up any advice you may have - all help is appreciated.

Ian


Posts

Joined
Thu Sep 08, 2011 4:27 pm

Post by designconscious » Mon Sep 12, 2011 9:40 pm

Hi,

I really need some help with this one, would anyone want to quote for doing the mod?

Hopefully the offer of payment will spark someone to reply to this request.

Looking forward to your replies.


Posts

Joined
Thu Sep 08, 2011 4:27 pm

Post by Johnathan » Tue Sep 13, 2011 9:19 pm

For items that cannot be sold online, you could set their stock to 0 and use a mod like this:

http://www.opencart.com/index.php?route ... on_id=2945

For forcing items to be collected in store, I would just create an option that says "Pickup Options" and have the only option be "Pickup in store". Then add a note saying such in the product description. As long as the customer knows, the admin can ship whatever he needs to when the order comes in.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by designconscious » Tue Sep 13, 2011 9:38 pm

Hi, thanks for that.

I have come up with a slightly different idea. I have created a new stock status called 'Instore Item Only' and I have set my products to that status. Then on the product page I have added this bit of code:

<?php
if ( $stock == "Instore item only" ) {
echo "<h3>Sorry this item is restricted and can only be sold instore</h3><br />
<style type='text/css'>
<!--
.cart {
display:none;
}
-->
</style>";
}
?>

That will then hide all the contents of the 'cart' <div>. This works a treat, except on the search results page where the $stock variable isn't returned to the page.

Do you know how or where I can set the stock item variable so I can call it back on the search result page and also the product category list?

All help very much appreciated

Ian


Posts

Joined
Thu Sep 08, 2011 4:27 pm

Post by Johnathan » Wed Sep 14, 2011 2:51 am

You'll need to add it to the relevant controller files:

/catalog/controller/product/category.php
/catalog/controller/product/search.php

You can see how it's done on the product page controller file (/catalog/controller/product/product.php) to recreate it in those files.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 94 guests