Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 18, 2013, 10:42:40 pm

Login with username, password and session length
Members
Total Members: 10757
Latest: DTroup
Stats
Total Posts: 32348
Total Topics: 5473
Online Today: 56
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 37
Total: 37
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
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 3010 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: 10987


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: 10987


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
[May 16, 2013, 10:13:46 pm]

[May 15, 2013, 11:32:14 pm]

[May 15, 2013, 11:31:24 pm]

[May 12, 2013, 09:10:43 am]

[May 10, 2013, 03:49:55 am]

[May 07, 2013, 07:12:40 pm]

[May 07, 2013, 02:37:14 pm]

[May 06, 2013, 10:29:56 pm]

[May 04, 2013, 03:22:01 pm]

[May 04, 2013, 01:08:57 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 1.178 seconds with 21 queries.