Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 22, 2013, 09:03:50 am

Login with username, password and session length
Members
Total Members: 10766
Latest: zhangxia
Stats
Total Posts: 32380
Total Topics: 5480
Online Today: 67
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 44
Total: 44
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: removing Add to cart/buy free item button  (Read 3013 times)
cepsi
Inline PM Customer
*****
Offline Offline

Posts: 13


View Profile
« on: September 15, 2009, 06:31:58 am »

I have one catogory where i want to remove the "add to cart or buy free item" button/link. I have a 'coming soon' catogory where i want to show the items and price etc but without the purchase link. Is this possible to do anyway?

thx

Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10997


View Profile
« Reply #1 on: September 15, 2009, 07:18:38 am »

Yes but you would have to add code to the Store.template.php fille

Find
Code:
// Show buy it now and shopping cart items.
if ($free_item == false)
Change to
Code:
// Show buy it now and shopping cart items.
if ($context['store_item']['ID_CAT'] != ###)
if ($free_item == false)
Replace ### with the category id
Logged
cepsi
Inline PM Customer
*****
Offline Offline

Posts: 13


View Profile
« Reply #2 on: September 15, 2009, 10:42:35 am »

Thx Mr. Hacks perfect!  Grin

PS thx for quick response too  Grin
Logged
cepsi
Inline PM Customer
*****
Offline Offline

Posts: 13


View Profile
« Reply #3 on: January 07, 2010, 08:17:21 am »

hi,

I tried to add another category to this today but when i added it i got a Parse error with the cat numbers. I tried adding a comma but still got the parse error. Is it possible to add another category?

i tried..

// Show buy it now and shopping cart items.
if ($context['store_item']['ID_CAT'] != 6,8)
      if ($free_item == false)

and

// Show buy it now and shopping cart items.
if ($context['store_item']['ID_CAT'] != 6 Cool
      if ($free_item == false)

but neither worked

thx for any help!
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10997


View Profile
« Reply #4 on: January 07, 2010, 06:38:15 pm »

Replace
Code:
if ($context['store_item']['ID_CAT'] != 6,8)
With
Code:
if ($context['store_item']['ID_CAT'] != 6 && $context['store_item']['ID_CAT'] != 8)
Logged
cepsi
Inline PM Customer
*****
Offline Offline

Posts: 13


View Profile
« Reply #5 on: January 08, 2010, 05:29:51 am »

thx man Cheesy
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 05:36:18 am]

[Today at 03:03:31 am]

[Today at 01:01:03 am]

[May 21, 2013, 03:27:16 pm]

[May 21, 2013, 02:11:10 pm]

[May 21, 2013, 01:18:58 pm]

[May 21, 2013, 12:22:02 am]

[May 21, 2013, 12:20:41 am]

[May 19, 2013, 11:13:02 pm]

[May 19, 2013, 08:18:27 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 3.176 seconds with 19 queries.