Jump to content

Pricing in Category listings


G Dubyah

Recommended Posts

I've got an issue with the price and "Add to Basket" showing on the category screen, especially when using the options system, I don't want this to show, if it can't be done, IMO it makes the options system useless ! and every produc will have to be entered as a separate product.

 

591b371d0b83c_Categorypricing.thumb.png.cd05c0c665658bd4903e227bc185d637.png

Link to comment
Share on other sites

I don't use Options, so I can't speak to that. But I don't show Add to Basket on Latest Listings or on Category listings. The only Add to Basket I have is on the Product Listing.

On content.homepage.php you will find this:

            {* Remove comment if you want info button
            <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a>
            *}

You can change the language for Info to whatever suits your store. Then you can comment out the Buy button and price if you want. Just be sure you save a stock version before you start experimenting.

Once you've figured out what you need there, you may be able to make the appropriate changes to content.category.php.

Link to comment
Share on other sites

2 hours ago, Dirty Butter said:

I don't use Options, so I can't speak to that. But I don't show Add to Basket on Latest Listings or on Category listings. The only Add to Basket I have is on the Product Listing.

On content.homepage.php you will find this:


            {* Remove comment if you want info button
            <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a>
            *}

You can change the language for Info to whatever suits your store. Then you can comment out the Buy button and price if you want. Just be sure you save a stock version before you start experimenting.

Once you've figured out what you need there, you may be able to make the appropriate changes to content.category.php.

My HTML skills are not up to this !

Link to comment
Share on other sites

3 minutes ago, Dirty Butter said:

I'm sorry!!!!

I forgot you are using Mican! So few people provide a signature I'm out of the habit of looking.

i'll download Mican and see what I can do.

It's Broad actually !!

Link to comment
Share on other sites

Broad is based on Foundation. So make a good copy of content.homepage.php and save it. We'll take baby steps and see if you can get more comfortable with the code.

See if you can take off the {*        *} around the code, so the Info Button shows on your listings (of course I'm assuming the code is there).

Link to comment
Share on other sites

1 minute ago, Dirty Butter said:

Oh - I misunderstood - I thought you were trying to get all the options/price/add to cart button stuff off the Category listing of Products.

Ok lets start again !

If you go to my site and click on "Paints" on the Navbar, it takes you to the category page, one category is Own Brand Acrylics, the other is Humbrol Enamels. Both of these are showing an "add to basket"  button and a price. What I want to do is remove the button and price from category pages for all categories, is this possilbe ?

Link to comment
Share on other sites

What's your url? No sooner asked than I saw it. BRB

Yes, removing buttons is a matter of finding the section in the code and putting {* has to have a space before the code.... and a space before the asterisk *} around it.

Find this section and comment it out with braces and asterisks. Just remember I'm guessing!!

                     {if $product.ctrl_sale}<span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span>
                     {else}
                     {$product.price}
                     {/if}

 

Link to comment
Share on other sites

You should be able to remove some lines from `content.category.php` to achieve your desired result.

I removed all of the code between lines 98 and 128 (if using unmodified code):

// keep this line and the closing div - remove everything else
<div class="small-3 columns">
  <h3>
	 {if $product.ctrl_sale}<span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span>
	 {else}
	 {$product.price}
	 {/if}
  </h3>
  {if $product.available <= 0}
  <div class="row collapse">
	 <div class="small-12 columns">
		<input type="submit" value="{$LANG.common.unavailable}" class="button small postfix disabled expand marg-top" disabled>
	 </div>
  </div>
  {* ctrl_stock True when a product is considered 'in stock' for purposes of allowing a purchase, either by actually being in stock or via certain settings *}
  {elseif $product.ctrl_stock && !$CATALOGUE_MODE}
  <div class="row collapse">
	 <div class="small-4 columns">
		<input type="text" name="quantity" value="1" class="quantity text-center">
	 </div>
	 <div class="small-8 columns">
		<button type="submit" value="{$LANG.catalogue.add_to_basket}" class="button small postfix">{$LANG.catalogue.add_to_basket}</button>
	 </div>
  </div>
  {elseif !$CATALOGUE_MODE}
  <div class="row collapse">
	 <div class="small-12 columns">
		<input type="submit" value="{$LANG.catalogue.out_of_stock_short}" disabled class="button disabled expand small">
	 </div>
  </div>
  {/if}
</div>

That does not affect the home page nor the side bars (e.g. best sellers), but you can look around in the skin templates for similar code and change as desired.

Link to comment
Share on other sites

6 minutes ago, G Dubyah said:

I havew a lot more code in that section !

Do you understand HTML / SMARTY at all? If so, compare the parts that I deleted above and remove those from your code. If not, you may need to hire a developer to help you.

Link to comment
Share on other sites

One thing I forgot to mention is that it is now possible to designate 'default' options for your products; doing so will allow the 'Add to Basket' button to work directly from the catalogue or home page.

Note, however, that the database query that requests the product price does not yet query options at all, so you should set the overall product price to whatever it is for the default set of options.

Link to comment
Share on other sites

There are at least two very good plugins available to populate the category pages with options.

14 hours ago, bsandall said:

One thing I forgot to mention is that it is now possible to designate 'default' options for your products; doing so will allow the 'Add to Basket' button to work directly from the catalogue or home page.

Note, however, that the database query that requests the product price does not yet query options at all, so you should set the overall product price to whatever it is for the default set of options.

@bsandall Where is this option please.

Link to comment
Share on other sites

@keat When you are editing or adding a product's options, there is a new column, 'Default', with a checkbox. Set one option per required option group as the default to allow it to be added directly via the 'Add to Basket' button.

Furthermore, any option set as the default will automatically be selected when first viewing the product page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...