Author Topic: Replace notify button with add to cart  (Read 5459 times)

nuller-joe

  • Beginner
  • *
  • Posts: 46
Replace notify button with add to cart
« on: March 17, 2010, 10:04:06 am »
Hey guys

Im about to finish up my homepage but i have minor problem:

Is it possibel to change the Notify me! button with add to cart button?

So youre able to buy a product there isnt in stock (you will of cause be told that is not in stock :) )

Thank you

Nuller

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #1 on: March 18, 2010, 00:08:40 am »
Just use your stock options as usual, but un-tick the "Check Stock" in your VM admin config.

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #2 on: March 18, 2010, 10:12:02 am »
I cant do that, i need the check stock function.
Istn there just a simple hack replacing the notify me with add to cart?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #3 on: March 18, 2010, 17:51:10 pm »
Why do you need to check stock then?

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #4 on: March 18, 2010, 19:08:15 pm »
Becuase there might be som long delivery times, so if the customer can see a product in stock, and a product out of stock, they might want to buy the in stock instead.
And i need the notify me button replaced beacuse if they order a product there isnt in stock i have to order it home, and if they just subsribe the product, i dont have an insurance, that they actually want to buy the product when its there.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #5 on: March 18, 2010, 19:29:01 pm »
Right, so instead of hacking the hell out of VM, why not disable the VM "Check stock", and just modify your VM Template to show the # in stock. Just make that number very big, and next to the "add-to-cart" button so they can't miss it!

Much simpler and cleaner. They can still order, but they will know what is in stock and what is not. You can make template so:

0 in stock.
You may order out of stock items,
or order more than what's in stock,
but delivery will be longer in such cases.


ADD-TO-CART-BUTTON

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #6 on: March 18, 2010, 20:44:02 pm »
How do i make joomla check stock?, or do i manually have to change the stock number on every product? if thats so, that will be way to confusing, then i also have to change every time someone buys a product..

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #7 on: March 18, 2010, 23:13:24 pm »
Checking stock does not disable the CHANGE IN STOCK! Check stock only check to see if stock is available. So if you UNTICK check stock, but still put a stock in your products, stock will still decrement as users buy. Try it yourself with a fake order.

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #8 on: March 19, 2010, 22:19:48 pm »
Hm, okay, but the customer still needs to be able to see if the product is in stock or not, and still be able to buy it if it isnt

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #9 on: March 19, 2010, 22:21:19 pm »
And what I have suggested would do that. Have you tried it?

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #10 on: March 20, 2010, 07:55:43 am »
I havent tried it, because i cant see how they will be able to see how many theres in stock

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #11 on: March 20, 2010, 09:58:13 am »
echo $product_availability;

put that in your VM browse template!

nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #12 on: March 20, 2010, 13:45:28 pm »
Cant get it working, but i kinda suck in codeing. It get the idea now.
Could you specify more what i have to write in the flypage.tpl.php?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Replace notify button with add to cart
« Reply #13 on: March 20, 2010, 20:55:10 pm »
1. Here is an example of showing instock... I do use the stock check on this site though, because my clients cannot order more than what is in stock. You can see all I did was call out how much was in stock.
http://www.ccwines.com/central-coast-wines-wine-store.html?page=shop.product_details&flypage=ccwflypage.tpl&product_id=203&category_id=0

2. In your case, I recommend making the stock LARGER, so people can see it.

3. Put this in your product details template you use:
         <?php
           if( $this->get_cfg( 'showAvailability' )) {
              echo $product_availability;
           }
           ?>

You may want to add a font style around it to make it larger, like:

         <div style="font-size:16px;"><?php
           if( $this->get_cfg( 'showAvailability' )) {
              echo $product_availability;
           }
           ?></div>


LIKEWISE, YOU MUST TURN ON THE "SHOW PRODUCT AVAILABILITY" in your VM admin configuration.

VM Admin Configuration -> Site (tab) -> Layout (section) -> Configuration (link) -> Check Yes to: Show Availability Information?



nuller-joe

  • Beginner
  • *
  • Posts: 46
Re: Replace notify button with add to cart
« Reply #14 on: March 21, 2010, 10:11:28 am »
Hm, still cant get it working, its only showing the in stock when "Check Stock" is enabled in core settings..