Jump to content

davestacey

Members
  • Content count

    89
  • Joined

  • Last visited

Everything posted by davestacey

  1. davestacey

    dob dropdown

    Hi, i installed the contribution "dropdown for dob". as the title says it adds a drop down for the date of birth on the create_account.php page. This works no problem when creating an account, however, if someone signs up with a duplicate email address, it then produces this error... Date of Birth: Fatal error: [] operator not supported for strings in /home/buzzshop/public_html/create_account.php on line 378 The line it refers to is: <td class="main"> <?php for ($i=1; $i<32; $i++) { line378: $dob_day[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i)); } for ($i=1; $i<13; $i++) { $dob_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000))); } $today = getdate(); $first_year = $today['year'] - 77; $last_year = $today['year'] - 10; for ($i=$first_year; $i < $last_year; $i++) { $dob_year[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i)); } echo tep_draw_pull_down_menu('dob_day', $dob_day); echo tep_draw_pull_down_menu('dob_month', $dob_month); echo tep_draw_pull_down_menu('dob_year', $dob_year); echo tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''; ?> </td> that code replaced this original code in the create_account.php page, which was: <!-- <td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td> --> this is a link to the contribution http://www.oscommerce.com/community/contributions,1547 Can anyone help me find out whats going wrong please?
  2. If i wanted to add the category name to the URL string, what would i have to do? i.e: instead of example.com/pair-of-brown-leather-shoes-p-26.html would become example.com/mens-shoes-c-2/pair-of-brown-leather-shoes-p-26.html Im guessing i would have to edit both the tep_validate_seo_urls() function and the .htaccess file? Any help or pointers greatly appreciated.
  3. If i wanted to add the category name to the URL string, what would i have to do? i.e: instead of example.com/pair-of-brown-leather-shoes-p-26.html would become example.com/mens-shoes-c-2/pair-of-brown-leather-shoes-p-26.html Im guessing i would have to edit both the tep_validate_seo_urls() function and the .htaccess file? Any help or pointers greatly appreciated.
  4. GOD DAMN IT!! Sorry for swearing, but i finally figured out what is going on, after too much time wasted! Regarding my post above, when your on a category page, and you click on a BUY NOW button, if that product has any attributes (such as colour, size, etc) then it will take you to that product page, because you have to select an attribute before you can add it to the cart. Otherwise how will it know what you want? a brown pair of shoes, or black? If a product does not have any attributes, then it add's straight to the cart. Doh! no wonder no one has replied about these types of posts, as it should be common sense! i feel like a right nugget now.....aaarrrggghhhhh lol, thanks anyway....
  5. My next problem, is the BUY NOW buttons (on a category page) not adding the product to the cart. Instead it redirects to the product page without adding the product to the cart. here's what the link looks like myshop.com/category-c-1.html?products_id=2532&action=buy_now&sort=2d I've searched through this forum and noticed others posting about it, but no solutions have been mentioned. Any ideas please?
  6. Hi again, I managed to fix my problem, although i dont think its the best solution, but none the less it appears to have worked. So my problem was: When on the shopping_cart.php page, when you clicked on a product that had attributes the URL looked like this example.com/product_info.php?products_id=2171{3}60 My guess is that the seo.class.php got confused with the product id not being an interger and thus displayed the non SEO'd link. So i edited the shopping_cart.php file (around line 130) First of all i changed.... $products[$i]['id'] .....to this...... $iProductID ........see below....... $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; ....I then added this code just above it.... list($iProductID, $ignorethis) = explode("{",$products[$i]['id']); This seems to have worked. Any better solutions please let me know.
  7. I've just noticed something, the name of the product that was added to my cart was 3 Piece Pony Yaki Synthetic Hair Extensions It also has attributes. I have added other products and the links work fine, just that named product above, the link for it displays as http://example.com/product_info.php?products_id=2171{3}60 UPDATE: Ok so i just renamed that product so it didnt start with a number and it still showed the same incorrect link. I then added another product that uses attributes, and it also added the incorrect way. So i can narrow it down to attributes causing the problem in my case. Any suggestions please?
  8. Hi everyone! What a brilliant contribution! I installed version 2.1d on osC 2.2 MS2. My problem is, on the shopping_cart.php when you click on a product that is added to the cart. the link displays like this.... http://example.com/product_info.php?products_id=2171{3}23 the rest of the links on the shop works fine. Any ideas please? here is the code that builds the shopping_cart.php links.... ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; By the way, the link still works, its just not SEO'd, its as if the link isnt being parsed via the seo function, yet the code above would say it is? Any help greatly appreciated as always.
  9. davestacey

    Increase your search rankings

    I haven't seen the contrib for this yet, but what i have seen is a contrib that puts the breadcrumb trail in the title bar. I understand search engines index the title bar right? Dave
  10. davestacey

    dob drop down menu

    This problem is for the "dob drop down menu" Please see the problem here = http://forums.oscommerce.com/index.php?showtopic=109414
  11. hi everyone, first off great contrib! just what the doctor ordered. however as always i have come across a snag. hopefully its an easy one to answer... ok here's the deal: i want to give away a free CD with every order over ?15. here's what i've done: 1) create a discount coupon 2) ammount of coupon is ?6 as thats how much the cd costs 3) set the minimum order ammount as ?15 4) free shipping is NOT ticked 5) coupon code: freecd 6) uses per customer and voucher (blank, unlimited) 7) valid product list (207,208,209,210) (these are a list of the cd's im giving away free) 8) valid category list (22_56) (category the cd's are in) 9) start and end date (valid for 1 month) ok, save that and then activate that to be included in the welcome email. 1) now i goto the shop and create an account 2) recieve email with coupon code 3) select a range of products so the total comes to over ?15 (also have selected cd i want for free) 4) then goto check out and enter the payment option and enter the redeem code 5) the confirmation page that follows doesn't display any discount info (so hasn't worked). 6) if i then goto the admin and remove the "valid product list" and "valid category list" save it and goto the checkout_confirmation page, the discount info then appears (so it has worked). However, if i was to remove the free cd from the cart and proceed to checkout the ?6 discount appears, so this is wrong because i dont want ?6 discount to be added unless the free cd is in the cart. Otherwise i'll be sending a free cd out and they'll have also got ?6 off the cart total. hope this makes sense. so to summerise, what this needs is, when creating a discount coupon and when using the valid product list, it needs to calculate the discount on that product even if you have other products from other categories in the cart. any help appricated Dave
  12. davestacey

    Worldpay support III

    By removing the language code i managed to fix the problem [TEP STOP] 1062 - Duplicate Entry '45yg4455yhg6' for key 1 ...when returning to osc from worldpay. However it still leaves me with the problem as described in a previous post in this thread. After returning to osc from worldpay, it displays the "success" page and then re-directs me to the login page. So the transaction is successful, (receive email) but it doesn't log the order in the admin. here's my details: oscommerce 2.2 ms2 non SSL worldpay contrib = 4 v1.7 cookies path in config file = define('HTTP_COOKIE_DOMAIN', 'http://myshop.co.uk'); cookies option in admin = force cookie use "true" any ideas please?
×