Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
  1. #1
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    I installed Opencart on a quilting site back in September. I modified a bunch of files to change the design layout. I also changed a few files relating to how the quantity was calculated. I changed 3 files I believe to make the site calculate items in fractions because the fabric would be sold in 1/4, 1/2, 3/4 yard increments.

    Long story short it didn't work no matter how hard I tried. My friend is now getting impatient and am I.

    Question: should I delete the database, reinstall Opencart and start fresh (again) ? Then make the design changes so I can hand it off to her?

    Or can I try to undo the quantity changes I made so I don't lose the design changes? Will I corrupt the shopping cart by trying to undo this? (The Opencart version is still current so I don't need to update that. Thank God!)

    Any help is greatly appreciated. I really want to move on from this.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    Let's look closer at this statement ...
    Long story short it didn't work no matter how hard I tried.
    Describe what you mean by "didn't work".
    Maybe it can be made so it works?

    I don't see why incremental dimensions would be a problem.


  4. #3
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    Hi Mlseim,

    It works up to a point. What happens is that if you order say 2.5 yards of fabric it will calculate until you go to the checkout and then I get an error message that it can only be ordered in whole numbers. So it looks like I'm missing something.

    Also, I've posted this problem on the Opencart forum and the feedback has been that if I go down this road then everything will have to be ordered in this way such as single-type items like scissors for example.

    I still have the shop up. If you want to take a look, it's at:

    shop.kilboraquiltshoppe.com

    Thanks!!

  5. #4
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    I have a document with all the changes I made. One of the changes was supposed to be made to the shoppingcart.php but I could not find where to change a certain line of code. I suspect that could be causing the checkout problem.

    Here's the info I got about the shopping cart:

    includes/classes/shopping_cart.php
    There is a function called: "function add_cart" around line 91.
    Below it you'll find the code:
    $this->update_quantity($products_id, (int)$qty, $attributes);
    If you need fractions this line should read:
    $this->update_quantity($products_id, $qty, $attributes);
    I removed the (int) since I need the decimal feature for a fabric store. That got decimals working correctly for our store.

    The only thing I can think of is that these changes perhaps were applicable to a previous version of OpenCart? Perhaps that's why I can't find where to make the change?

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    The most recent discussion I could find is this:
    http://forum.opencart.com/viewtopic.php?t=20441

    Scroll down to the post by Decimal Quantity 1.4.9 posted on Feb. 04, 2012
    Referring to this version: v1.5.1.3.1

    Changes to several files and a SQL query you need to do in order to change column types.

    You may want to use Notepad+ to do the editing.
    They have a nice search and replace command.


  7. #6
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    Thanks, mlseim. I'll check it out. I did make changes to the DB in PHPAdmin area as well.

    I'd like to fix this rather than start all over again.

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    I agree ... fixing it will allow you to use fractional quantities, starting over won't change that.

    You may want to make sure you're using the latest opencart version before you modify anything.
    Wouldn't it be ironic if the newest versions allow for fractional quantities?

    Also, after modifying files, you can never again update versions ... because you will overwrite
    your modified files. It would be nice if they had a way to customize some configurations so that
    wouldn't happen (much like WordPress does with themes and child-themes).

    If things get really bad, it will be almost impossible for me to determine the solution without
    actually being able to access your website. If you trust me enough, I would be able to take a
    peek if you email me your FTP account info. If so, email me through the 'catpin' site (link) on
    the bottom of this post. Use the contact page.

    You should know that I do not have any opencart experience ... I do have PHP experience though.
    If I can't solve it, perhaps someone else can. A lot of people see these forum discussions.


  9. #8
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    Hi Mlseim,

    I thank you for your offer and will send you the FTP info. All I ask is that you do not make any changes before you let me know what you think should be done. Because you are WDF staff I trust you!

    I take your point that going forward, updating the OpenCart will be impossible once some of the configuration files are changed. As far as I know, I am running the latest version of Opencart but that's not to say there will not be problems when they update the software going forward.

    Thank you very much for your help!!

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    One more thing ...
    You said you did update some files and database.
    Is it working better, the same, or any different than when you first posted on this thread?


  11. #10
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    The instructions I got from the OpenCart forum indicated that both the php files and the DB files in PHPMyAdmin needed to be changed.

    In PHPMyAdmin:
    I changed "products_quantity" and "products_ordered" from INT to decimal (15,3)

    The other databases that I was supposed to change I couldn't find: orders_product and customers_basket.


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

open cart with fractional quantity

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:50 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com