Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

i installed sppc in my store and I get the following error when I try to set a specialin the admin panel .Parse error: parse error, unexpected T_ELSE in /mnt/web_f/d05/s48/b025105d/www/catalog/admin/specials.php on line 211

Can anyone help please

Link to comment
Share on other sites

Any help with the above problem?

 

I know some of you gifted coders could tackle this little project in a couple minutes, id be forever grateful. Im VERY close to being done with my cart and this is one of those little things that need completed.

 

...im not too proud to beg, honest :D

 

Bob,

 

Why don't use Easy Populate ? It's work very well and you don't need to modify your files. It's wil do the same thing as you want to do with Multi-Product Update v1.00.

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

Bob,

 

Why don't use Easy Populate ? It's work very well and you don't need to modify your files. It's wil do the same thing as you want to do with Multi-Product Update v1.00.

 

 

Mainly because, as far as I know, it uses excel. I think its much nicer just to do it within the admin section of OSC. Truthfully, I figured somebody would be able to add a couple lines to the multi-product update and have it work with SPPC too:(

 

Any certain version of easy populate that works with SPPC? I guess since im getting nowhere with the other file ill be forced to install easy populate and open office.

Link to comment
Share on other sites

In regards to this problem i was having:

 

http://www.oscommerce.com/forums/index.php?sho...23entry737523

 

Just noticed something. When a customer logs in, no matter what SPPC group they are in, they go to 'http://www.myshop.com/index.php'. When I try to login as the store owner....first the SPPC box comes up asking what group I want to login as(which is at 'http://www.myshop.com/login.php?action=process'), then I go to the following page which is a 404 not found:

 

'https://secure.myhost.net/~mystore/catalog/login.php?action=process&skip=true&osCsid=4bbc69153293d25cb26210e3ae77239a'

 

NOTE: I use a shared SSL

Why does it seem to only use the SLL connection when logging in as the store owner, and where is it getting the SID from?

 

I just thought(HOPED!) this would give somebody an idea as to why this is happening. I still somewhat think it MAY be SPPC related since it goes to the SPPC storeowner group option box when logging in no problem everytime, but jumps to the SSL connection with SID everytime after that and gives me the 404 error.

 

Once again....after hitting refresh on the 404 page it stays on the same URL and brings up the login page with the 'Error: No match for E-Mail Address and/or Password.' error box BUT you are actually logged in.

 

Any ideas? :(

Edited by Sid04
Link to comment
Share on other sites

Update:

I went back and removed the latest changes I made to my login.php file(paypal contrib) and still have the problem. I went back and replaced my login.php with the pre-SPPC file(only difference is the lack of SPPC code) and the problem no longer exists.

 

Def. guessing its somehow SPPC related, although I have no clue as to why it happens now after changing my configure.php file.

Link to comment
Share on other sites

Def. guessing its somehow SPPC related, although I have no clue as to why it happens now after changing my configure.php file.
In a way yes, but the whole purpose of being on a https page when you login is to encrypt user name and password when doing that. For some reason you go/send people to that page as a http page: bad move. Apparently, the intermediate step when logging in as step owner sends you to the correct page: the https page.

 

Something goes wrong definately, but it is before you get on the login page.

 

 

I know some of you gifted coders could tackle this little project in a couple minutes
I wish that was true. It is more complicated than that. For group prices, the sql will be different and also you cannot be sure that there is an entry for a group price (whereas you know that if a product exists, the field for the price will surely be there). Also, the code should look for a case where you delete the price for a group and then make sure the entry gets deleted in the table with group prices too. That is something you do not need to do with the retail price...
Link to comment
Share on other sites

In a way yes, but the whole purpose of being on a https page when you login is to encrypt user name and password when doing that. For some reason you go/send people to that page as a http page: bad move. Apparently, the intermediate step when logging in as step owner sends you to the correct page: the https page.

 

Something goes wrong definately, but it is before you get on the login page.

 

Well, ya got me there. The issue of not loggin in through https is related to a loginbox contribution that I installed. The login box in the column would login without HTTPS, but if I go to the login.php page I get the same funky problem if I login as store owner OR customer.

 

I since tried another loginbox contrib and it also does not login through HTTPS. I hope I can find one that does before my vacation is over......then I can focus on my other 4000000 problems :(

 

I think ill bring the 404 issue up to my webhost, maybe they will have an idea since they did the addon domain.

Link to comment
Share on other sites

The issue of not loggin in through https is related to a loginbox contribution that I installed. The login box in the column would login without HTTPS, but if I go to the login.php page I get the same funky problem if I login as store owner OR customer.
OK, that explains part of the problem (the fact that you login through http, don't think you can get around that). However, I can't think of a reason why you shouldn't be able to login on the login page "the regular way".
I think ill bring the 404 issue up to my webhost, maybe they will have an idea since they did the addon domain.
Good idea.

 

If nothing else works, you might get around it (in an unsafe way of course) by using (around line 58):

echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process&skip=true', 'NONSSL'));

or perhaps this also works:

echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process&skip=true', '(($request_type == 'SSL') ? SSL : NONSSL)'));

Link to comment
Share on other sites

Got my old login box in the side column working.....its amazing what adding 'SSL' in the right place will do(only took me the better part of the day to figure out exactly what I was doing). If you wouldnt mind, could you tell me if when you go to the 'password forgotten' page and the 'create account' page from your index page.....are they HTTPS?

 

That should straighten out my login box, then ill go see if the webhost can shed some light on my other issue. Thanks a ton for your help.

Link to comment
Share on other sites

I've just installed this contrib with CCGV 5.14 fully functional. I've got the admin side fully functional, but the catalog side is messed up, particularly when you try to log in to the site.

 

I've chance the localhost to my email admin email as stated, when I sign in this is the error

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

SELECT vendors_affiliate_id FROM vendors WHERE vendors_id=

[TEP STOP]

 

Here is the link to the site if you would like to try for yourself........any ideas???

 

https://ssl.perfora.net/gforceperformanceau...pping/login.php?

 

thanks

 

Chris

Link to comment
Share on other sites

Chris,

I've just installed this contrib with CCGV 5.14 fully functional. I've got the admin side fully functional, but the catalog side is messed up, particularly when you try to log in to the site.

 

I've chance the localhost to my email admin email as stated, when I sign in this is the error

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

SELECT vendors_affiliate_id FROM vendors WHERE vendors_id=

[TEP STOP]

.......any ideas???

Vendors stuff is not in SPPC and neither in CCGV I guess. I presume you have added a contribution to your login page that has something to do with vendors. Now when the intermediate step is made to logging in as another group it actually verifies first if you login correct, stores the password and login name in hidden fields and then continues with the logging in after you have chosen the group.

 

The information needed for the vendors stuff you see the error for probably needs to be stored as a hidden field in the intermediate step for the webmaster too.

Link to comment
Share on other sites

Hi

 

This contrib is really interesting and very complex in installing, looks like pain... Just to bad I do not have anymore a fresh osc....

I like to be able to have a group price that will give a set discount (eg 5%) on the all entitled products, but under the condition, that the customer has bought for a given amount (eg $ 250) - total of previous sales and this sale - in a given time (eg. January to June / July to December or a flexible time like the past 90 days).

On top, but not a must, the following would be nice: So, if it is possible with SPPC I like to have "group discount" (volume discount) active and the customer still can be in an other group like "club discount" or so.

If the customer can get group (volume) discount (eg minimum buy $250 over the past 120 days) I do not like him to get also SPPC discount. In this case it would be great to have an automatic selection of the greater discount.

 

Do you get what I would like to be able to do???

Now, is that possible with SPPC or an related SPPC add on? OR how can I do that???

 

Would be nice to get an answer, so I can decide if I install SPPC or if it is better to use an other contribution.

 

Thanks

 

Rich

Link to comment
Share on other sites

I like to be able to have a group price that will give a set discount (eg 5%) on the all entitled products, but under the condition, that the customer has bought for a given amount (eg $ 250) - total of previous sales and this sale - in a given time (eg. January to June / July to December or a flexible time like the past 90 days).
I think you should look for a more simple contribution given the fact that you have a (one) fixed discount and special conditions you will have to code for yourself anyway.
Link to comment
Share on other sites

Hi,

 

I just installed v 4.1.1 (I think... whichever one is the latest).

 

I am getting this error in my catalog/boxes/specials.php:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /catalog/includes/functions/database.php on line 100

 

When I look at the corresponding line, it only says this:

 

return mysql_fetch_array($db_query, MYSQL_ASSOC)

 

Any ideas?

 

Everything else seems to work fine for now.

Link to comment
Share on other sites

I am getting this error in my catalog/boxes/specials.php:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /catalog/includes/functions/database.php on line 100

 

When I look at the corresponding line, it only says this:

 

return mysql_fetch_array($db_query, MYSQL_ASSOC)

 

Any ideas?

I have only seen an error like that when I made a mistake in the code: trying to access results of a mysql query when there hadn't be a query. Did you use the file includes/boxes/specials.php that was in the package?

 

Otherwise, I would have put my original file for that box back for the time being. The only thing wrong then would be an inaccurate price, more preferable than this I would say.

 

I also would have installed this locally first and then uploaded the new files....

Link to comment
Share on other sites

Ok, I'm an idiot.

 

I totally forgot that I had a different file in the includes/column_right.php for the specials.

 

I had the specials_scroll.php file called in that code instead of the regular specials.php.

 

Any idea how to make them work together? What would I need to change in this to make it work?

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 $rp_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc");
 if (tep_db_num_rows($rp_query)) {
?>
<!-- specials //-->
	  <tr>
		<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_SPECIALS);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS));

while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$rp .= "</SPAN><BR />\n---------\n";
}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
							 'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "20" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');

new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- specials_eof //-->
<?php
 }
?>

 

Thanks

Edited by Sethman
Link to comment
Share on other sites

Chris,

Vendors stuff is not in SPPC and neither in CCGV I guess. I presume you have added a contribution to your login page that has something to do with vendors. Now when the intermediate step is made to logging in as another group it actually verifies first if you login correct, stores the password and login name in hidden fields and then continues with the logging in after you have chosen the group.

 

The information needed for the vendors stuff you see the error for probably needs to be stored as a hidden field in the intermediate step for the webmaster too.

 

Janz

 

thanks for the reply, I've restored from an absolute archive and went from beyond compare to compare and merge and that fixed this issue, must have been a copy over error. My newest problems are no longer that, but some type of parsing error when i add the data from:

 

Parse error: parse error, unexpected $ in /homepages/2/XXXXXXXXXX/htdocs/GForce/shoppingbeta/includes/boxes/specials.php on line 55

 

If I use the absolute php file, no problem, bring in the new data from this contrib and this is the error.........thanks for the response, hopefully you may have some wisdom on my new issue.

 

thanks

 

Chris

Link to comment
Share on other sites

Sethman,

I had the specials_scroll.php file called in that code instead of the regular specials.php.

 

Any idea how to make them work together? What would I need to change in this to make it work?

I guess this already has come up once before because I have an adapted script somewhere. Can't find it in the thread quickly, so here it is (this is just the top part of the file, with the changes):

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
// next line original code
/*  $rp_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc"); */

 if(!tep_session_is_registered('sppc_customer_group_id')) { 
 $customer_group_id = '0';
 } else {
  $customer_group_id = $sppc_customer_group_id;
 }

 if ($customer_group_id == '0')  {
  $rp_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id = '0' order by s.specials_date_added desc");
 } else { // $sppc_customer_group_id is in the session variables, so must be set
  $rp_query = tep_db_query("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, customers_group_id) where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc");
}

 if (tep_db_num_rows($rp_query)) {
?>
<!-- specials //-->

Link to comment
Share on other sites

Chris,

Parse error: parse error, unexpected $ in /homepages/2/XXXXXXXXXX/htdocs/GForce/shoppingbeta/includes/boxes/specials.php on line 55
Sounds like a missing ";" at the end of a line of PHP, or a missing PHP end tag, brace or something like that.
Link to comment
Share on other sites

Hi,

 

This post is a repply to a previous problem in this thread addressing the quantity box in product listing. As I didn?t find any answers, i?ll write the way I got things to work here.

 

I?m using SPPC, Quantity Price breaks for SPPC and Hide Products for SPPC.

 

In product_listing.php, comment the following line:

 

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

 

And copy (as replacement for the commented code) the code below:

 

$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[$x]['products_id']), 'POST') . tep_draw_input_field('buyqty', $listing[$x]['products_qty_blocks'], 'size=2 maxlength=2') . '?' . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</form>';

 

In application_top.php comment the line:

 

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

 

And copy (as replacement for the commented code) the code below:

 

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+(int)$HTTP_POST_VARS['buyqty']);

 

The credits go to the author of the original contribution (sorry, don?t remember exactly wich).

 

Just a note: these changes do not add a column to product_listing.php. In my store I inserted two columns, one displaying the quantity block and the other for the input field.

Link to comment
Share on other sites

I recently installed this contribution on a fresh install of OSC.

Works ok, but then I found something and I dont know why it is doing it.

When I actually click on a category in my category box, it gives me this error:

1146 - Table 'shopdb.specials_retail_prices' doesn't exist

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials_retail_prices s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '23'

 

[TEP STOP]

 

I dont know why, but I cant click on a category. This happens when I am logged in with a a price group. But not when I am not logged in.

 

Also, is there a way for people with a price group to see the Retail price as well, in red with a line through it?

 

Thank you,

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...