Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

shotputty

Pioneers
  • Posts

    31
  • Joined

  • Last visited

About shotputty

  • Birthday 08/25/1976

Profile Information

Recent Profile Visitors

7,037 profile views

shotputty's Achievements

  1. This solution should be in the contribution, if it isn't allready. (I use the Osc 2.2 version)
  2. This contribution is really great. Unfortunately it's so complex for me that I cannot find the code for a change I need for my shop. Because my shop is in 6 languages I need it to say: www.mydomain.com/french/product_info.php/courage-under-fire-p-16 or www.mydomain.com/german/product_info.php/courage-under-fire-p-16 ..depending on the language that you're currently using. I've had another SEO contribution which does this exactly but I cannot seem to mix the two together. Could someone give me a clue in which file I should be looking to add this feature? :rolleyes: (the other contribution wouldn't allow old url's to redirect to the seo url's)
  3. I seem to have found a solution. I changed the function computePrice($qty) so that it does not compute the price by the quantity of one product but by that of the quantity of the total of all products in the cart. For this to work I added my variable: global $totaal; and changed $qty = $this->adjustQty($qty); to $qty = $this->adjustQty($totaal); I thought this would take me weeks to figure out. Turned out to be just 2 hours... ;)
  4. I have perhaps a really simple question for what I now think is really difficult. I need the quantity price break to start if the accumulated ammount of several products reaches the quantity set for one of those products.. let say product A costs €20 or €15 at 3 pieces. product B costs €30 or € 25 at 5 pieces. when I have 2 x product A and 1 time product B in my cart, I would like product A to get the price for 3 pieces because the accumulated ammount is 3.. I allready made a formula which adds all quantities together, so that I have. I just can't figure out in which file i need to replace the quantity with my total cart quantity for this to start working... :blush: Anybody any tips? :rolleyes:
  5. Same problem here, seems to be something wrong, so i checked this with var_dump(get_defined_vars()) ; Then you can see that people actually have something in their cart! So I managed to work around it and by using some objects i wrote a piece of code that does it for me: (VERY UGLY CODE THOUGH) just after: $cart = $_SESSION['cart']; $currency = $_SESSION['currency']; I did this: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = 15; $i < $n; $i++) { if ($cart->contents[$i]['qty'] > 0) { if ($i == 7) { $productnaam = 'name1' ; } if ($i == 8) { $productnaam = 'name2' ; } if ($i == 9) { $productnaam = 'name3' ; } if ($i == 10) { $productnaam = 'name4' ; } $contents[] = array('text' => $cart->contents[$i]['qty'] . ' x ' . $productnaam ); }
  6. Hello everybody. Today I'm opening a topic on my "Limit Country Dropdown per Language" contribution. You can find it here: http://addons.oscommerce.com/info/6357 Original description: With this Mod you can LIMIT the countries drop down lists on your site according to the language people are viewing your site. IE when a customer set the language to german, you can limit the countries in your dropdown when the customer creates an account for example to; "Germany" and "Austria". That way they don't have to go through an entire list of 250 countries. Note(!): When you need countries to be available under more than one language, just create a copy of that country. Say you need "Belgium" to be available when viewing in Dutch language and English too. Just create "België" and asign it to your Dutch language and then create "Belgium" and assign it to your English language. At this moment, after several upgrades you can. 1) Show only the country text if a language only has one country assigned to it. This means there is no need for a customer to select!! 2) If you asign 2 or 3 countries to a language the dropdown is automatically replaced by 2 or 3 selection checkboxes. ( These checkboxes will have their correct country preselected when you enter your addressbook) 3) When you assign 4 or more counties to a language it will have the standard dropdown menu with only those countries. I'm open for suggestions or tips on how to make the code faster, smaller & better ;)
  7. I found a little clue to why the priceformatter table is not loading. I can recreate this problem by logging in, logging off, and then clicking on any product. On first sight there is no table. On pagerefresh it's loaded. So what I did is echo some variables to see what they are at the time the problem occurs. This is what happens: $sppc_customer_group_id ---> EMPTY! $_SESSION[sppc_customer_group_id] ---> 0 On page refresh (and the table comes up): $sppc_customer_group_id ---> 0 $_SESSION[sppc_customer_group_id] ---> 0 I fixed this in application_top.php by making $sppc_customer_group_id take on the value of $_SESSION[sppc_customer_group_id] and it works. This piece of code in product_info.php, shouldn't it do something with the $sppc_customer_group_id if the session isn't registered yet? // BOF Separate Price per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } Anyway, happy I found the clue. This is one of the best MODs I've seen! EDIT: This is what I added at the bottom of application_top.php before the last ?> $sppc_customer_group_id = $_SESSION['sppc_customer_group_id'] ;
  8. The Dutch customer in Germany has ran out of luck here. :lol: I set new accounts from countries (shipping address) which are not Holland automatically to group 3 (SPPC) so eventually he will get the price beloging to that (shipping) country.. By the way. One more question, :blush: don't know if it has come along on the previous 250 pages... I see that accasionally the priceformatter tabel isn't loaded. I'll have to refresh the product_info.php page to see it. This happens more often after a logoff action. (and then click on a product). I have QPBPP on other sites but without the SPPC with it, don't have this loading problem on those sites. Does this piece of code make loading a little slower and perhaps sometimes make it not load at all? // BOF Separate Pricing per Customer, Price Break 1.11.3 mod $pf->[b]loadProductSppc[/b]((int)$HTTP_GET_VARS['products_id'], (int)$languages_id, $product_info); $products_price = $pf->getPriceString(); // EOF Separate Pricing per Customer, Price Break 1.11.3 mod
  9. It's working!! I've made this piece of code in application_top.php if (!isset($_SESSION['customer_zone_id'])) { $_SESSION['sppc_customer_group_show_tax'] = 1; if ($languages_id != 4) { $_SESSION['sppc_customer_group_id'] = 3; } else { $_SESSION['sppc_customer_group_id'] = 0; }} Is there a prettier way to check if someone is logged in then: if (!isset($_SESSION['customer_zone_id'])) ? Aren't there a lot of people here that need SPPC (ountry) ? :rolleyes: Now it's real easy, I made a group called EU (group 3) and gave them different prices from some other groups I made.
  10. Okay, I've searched some hours for a solution but I'm afraid I need some help here. I use the SPPC contribution and it works great. I just have one slightly unusual (?) functionality I need it to do. I need the prices to be different for all countries together BUT one. (that makes two groups) What I had in mind: I made a group called NOT_THAT_COUNTRY (id = 3) and gave it al those prices they need. Now somewhere I thought this would do the trick: if ($languages_id != 4) { $customer_group_id = '3'; } Well I guess that would have been too easy... Apparently it is required to be logged in because that $customer_group_id just won't budge... Is there any way? Is it possible to fake a guest beging logged in and giving them the $customer_group_id = 3 temporarily (unless offcourse they switch language to THAT one country that does not need those specific prices...) Can I SET a $_SESSION variable or override it? :blink:
  11. Okay, I made just what I want but it isn't that much different from what YOU want. Do you know any php. It's really just about changing something in checkout_shipping.php and ot_shipping.php (2 lines did it for me). I now have free shipping for 2 products of the same kind and free shipping from 3 products of your choice. (and beyond of course). Let me know if you need any help. :-)
  12. I'm working (and searching) on this now. Let you know when I have something. :-)
  13. This solution is so simple, it's genious. Long long time ago but thanks a million!!!
  14. i like this contribution a lot!!! currently I'm trying to add a logo to the generated pdf's. This is kind of how I'm trying to get it to work: (in admin/batch_print.php after $y = $pdf->ezText(STORE_NAME_ADDRESS,COMPANY_HEADER_FONT_SIZE); $y -= 10; ) $pdf->ezImage('images/mylogo.gif','0','full','','right',''); It actually doesn't do much but make a big white space 2 pages long. :blush: Can anyone point in the right direction?
×
×
  • Create New...