Zen Cart Logo
Forums / Managing Customers and Orders / customer pending approved placed an order

customer pending approved placed an order

Views: 3,662

Results 21 to 27 of 27
9 Feb 2012, 1:27 AM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

customer pending approved placed an order

Try on the tpl_featured.php sidebox to use the code in RED:

    $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$random_featured_product->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    $display_button = zen_get_buy_now_button($random_featured_product->fields['products_id'], $the_button);
    $content .= '<div>' . $display_button . '</div>';

    $random_featured_product->MoveNextRandom();

you may need to fuss with it to make it look pretty and such ...

Then, adapt it for the Specials sidebox ...

9 Feb 2012, 1:49 AM
#22
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: customer pending approved placed an order

Thanks for sending me the code, I did include it just above $random_featured_product->MoveNextRandom(); but it still allows me to see the price and checkout without any mention of approval pending. Perhaps I am placing the code in the wrong place but it still will need to know whether the customer has been authorised or not. Once a customer clicks on the buy now button, it would probably have to go the product page as in the add to cart where approval appending displays. Is this over-complicating things?

9 Feb 2012, 2:05 AM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: customer pending approved placed an order

That code is just for the button not the price ...

A Guest or unauthorized customer would get from the normal Featured sidebox with this code:

<image> <product name> Price Unavailable APPROVAL PENDING

It looks like you are using an add on for your sideboxes so you will need to adapt the code to fit it ...

9 Feb 2012, 2:10 AM
#24
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: customer pending approved placed an order

Thanks Linda - I'll look at this in the morning, tiredness getting the better of me. cheers.

9 Feb 2012, 3:08 PM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: customer pending approved placed an order

Sorry but this would be better code to work with:

        $lc_text = '';
        $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $random_featured_product->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
        $the_button = $lc_button;
        $products_link = '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($random_featured_product->fields['master_categories_id'])) . '&products_id=' . $random_featured_product->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $lc_text .= '<br />' . zen_get_buy_now_button($random_featured_product->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($random_featured_product->fields['products_id']);
        $lc_text .= '<br />' . (zen_get_show_product_switch($random_featured_product->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($random_featured_product->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');


    $content .= '<div>' . $lc_text . '</div>';

    $random_featured_product->MoveNextRandom();
9 Feb 2012, 10:29 PM
#26
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: customer pending approved placed an order

Thank you, thank you, works like a dream. I move the code further up and deleted a line already there which was calling for the button and perfect. Any guest logging in now is asked to login for price in the carousel, if not approved it shows 'approval appending' once approved the buy button show. Brilliant, you are a life saver girl.:clap::clap::clap:

9 Feb 2012, 11:19 PM
#27
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: customer pending approved placed an order

You are most welcome ... thanks for the update that this is now working for you ...