Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prices for Logged-In Users Only - Customizing prob


alymid

Recommended Posts

I have installed Prices for Logged-In Users Only

 

And am also using Quantity box in Product Listing

 

When I do this I lose the quanity box on the product listing page.

 

in the product_listing module I replace (according to the ViewPrice install instructions)

 

$lc_align = 'right';

$lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . ' </td></tr></table></form>';

 

 

with

 

 

// ADDED for ViewPrice

$buy_now_button = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

if (PRICES_LOGGED_IN == 'false')

$buy_now_button_d = $buy_now_button;

 

if ( (PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) {

$buy_now_button_d = '<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_BUY_TEXT . '</a> ';

} else {

$buy_now_button_d = $buy_now_button;

}

$lc_text = $buy_now_button_d;

// END ViewPrice

 

Is there some way I can put these functionalities together?

 

=============================================

 

2nd problem

 

Some how what I change in the what's new module, Has it so that every product in the What's New in X Month box has the same price as the item being featured in the "What's New" box in the side column. I have played a bit and see to have gotten it so the items aren't showing any price at all . . . but that isn't the best improvement.

 

 

The problem seems to come from this bit of code I am supposed to insert into the whats_new.php

 

// ADDED for ViewPrice

if (PRICES_LOGGED_IN == 'false') {

$product_price_d = $whats_new_price;

}

if ((PRICES_LOGGED_IN == 'true') &&

 

(!tep_session_is_registered('customer_id'))) {

$product_price_d = ('<a href="' .

 

tep_href_link(FILENAME_LOGIN, '','SSL') . '">' .

 

PRICES_LOGGED_IN_TEXT . '</a> ' );

} else {

$product_price_d = $whats_new_price;

}

// END ViewPrice

 

 

this gets inserted right after:

$whats_new_price =

 

$currencies->display_price($random_product['products_price'],

 

tep_get_tax_rate($random_product['products_tax_class_id']));

}

 

 

============================

Thanks for any help or ideas you might have

If it helps at all my test site is at http://www.aylasoriginals.com/shoptest2

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...