Post by reetp » Tue Jan 07, 2020 2:47 am

Hi,

I have been looking at OpenCart as a possible solution for our website.

One issue I am struggling to answer is with Product Display and I wasn't sure where best to ask this question.

We have a large number of products and the pricing is fixed with set discounts for quantity eg:

Shot1.jpg

Shot1.jpg (20.32 KiB) Viewed 1537 times


Ideally we would like to be able to do something like this so clients can ask for a quote for a basket of items:

Shot3.jpg

Shot3.jpg (20.16 KiB) Viewed 1537 times


I know that might not be quite so easy. In which case this type of layout might be easier with a number box to add quantity required without pricing in the total section.

Shot4.jpg

Shot4.jpg (19.1 KiB) Viewed 1537 times

Last is we have several thousand products and need to be able to automate updating pricing via API.

Any ideas whether there is an extension that can do this as I can't see anything currently?

Thanks.

B. Rgds
John

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by straightlight » Tue Jan 07, 2020 3:41 am

Last is we have several thousand products and need to be able to automate updating pricing via API.
What API are you referring to? Have you also looked on the Marketplace?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by by mona » Tue Jan 07, 2020 3:44 am

There are many extensions in the marketplace that cover most of the needs. Some are free and some are paid.
You just need to look, some examples based on your question

https://www.opencart.com/index.php?rout ... 20quantity
https://www.opencart.com/index.php?rout ... n_id=34915

https://www.opencart.com/index.php?rout ... or%20price
https://www.opencart.com/index.php?rout ... n_id=35031
https://www.opencart.com/index.php?rout ... n_id=36055

https://www.opencart.com/index.php?rout ... n_id=33112


Developers usually will edit their modules to suit your needs at a reasonable price (sometimes free if it is not a lot of work)
For everything else there is a commercial section :
viewforum.php?f=88

Happy New Year and best of luck with your site.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Tue Jan 07, 2020 7:10 pm

reetp wrote:
Tue Jan 07, 2020 2:47 am
Last is we have several thousand products and need to be able to automate updating pricing via API.
I wouldn't bother using the API, it's the simplest of scripts to update prices of products based on their ID.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by reetp » Tue Jan 07, 2020 8:10 pm

straightlight wrote:
Tue Jan 07, 2020 3:41 am
Last is we have several thousand products and need to be able to automate updating pricing via API.
What API are you referring to? Have you also looked on the Marketplace?
Yes, but not everything is obvious when you first look.... !

I can see this:

https://github.com/iSenseLabs/OpenCartAPI

I'd need to extend that somehow I guess.

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by reetp » Tue Jan 07, 2020 8:11 pm

paulfeakins wrote:
Tue Jan 07, 2020 7:10 pm
reetp wrote:
Tue Jan 07, 2020 2:47 am
Last is we have several thousand products and need to be able to automate updating pricing via API.
I wouldn't bother using the API, it's the simplest of scripts to update prices of products based on their ID.
OK thanks (we have other things we need to do so using the API is probably quite important in the long run)

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by paulfeakins » Tue Jan 07, 2020 8:14 pm

reetp wrote:
Tue Jan 07, 2020 8:11 pm
OK thanks (we have other things we need to do so using the API is probably quite important in the long run)
It depends what those things are, a lot of things are better accomplished directly.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by reetp » Tue Jan 07, 2020 8:28 pm

by mona wrote:
Tue Jan 07, 2020 3:44 am
There are many extensions in the marketplace that cover most of the needs. Some are free and some are paid.
Thanks for the response. The choice is a bit overwhelming!

You just need to look, some examples based on your question
Yes I did, but became a bit blind after a while and couldn't see the wood for the trees.

Quantity discount with special price - This looks quite hopeful thanks

Developers usually will edit their modules to suit your needs at a reasonable price (sometimes free if it is not a lot of work)
For everything else there is a commercial section :
Yup - I have been in Open Source a very long time. I know how it works and have no issues paying as and when I need too :-)
I am pretty sure I will have to pay for some refinements - just wanted to see if the core bits were basically there

Happy New Year and best of luck with your site.
Gracias, y igualmente :-)

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by reetp » Tue Jan 07, 2020 8:35 pm

paulfeakins wrote:
Tue Jan 07, 2020 8:14 pm
reetp wrote:
Tue Jan 07, 2020 8:11 pm
OK thanks (we have other things we need to do so using the API is probably quite important in the long run)
It depends what those things are, a lot of things are better accomplished directly.
Hmmmm. I am never keen on direct access to a DB personally.
Indeed, an API might be a slower, but you tend to make less of a mess......
Just in my own experience :-)

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by paulfeakins » Tue Jan 07, 2020 8:40 pm

reetp wrote:
Tue Jan 07, 2020 8:35 pm
Hmmmm. I am never keen on direct access to a DB personally.
Indeed, an API might be a slower, but you tend to make less of a mess......
Just in my own experience :-)
Depends on the system, the OC database is so simple and human readable that it is sometimes best.

With something like Magento that uses the EAV database design or Concrete5 where the database isn't instantly understandable then I would agree about not accessing it directly.

But I think you will see if you do much work with OpenCart that accessing the database directly for simple tasks is fine.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by reetp » Tue Jan 07, 2020 8:55 pm

paulfeakins wrote:
Tue Jan 07, 2020 8:40 pm

Depends on the system, the OC database is so simple and human readable that it is sometimes best.

With something like Magento that uses the EAV database design or Concrete5 where the database isn't instantly understandable then I would agree about not accessing it directly.

But I think you will see if you do much work with OpenCart that accessing the database directly for simple tasks is fine.
Get all that thanks. However, I may want to do more data interchange with my CRM, Chat system, and other stuff. So both input, and output.
So yes a bit of messing around in the DB is one thing, but I am looking a bit wider :-)

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by paulfeakins » Tue Jan 07, 2020 9:00 pm

reetp wrote:
Tue Jan 07, 2020 8:55 pm
So yes a bit of messing around in the DB is one thing, but I am looking a bit wider :-)
I guess make a decision based on what you need at the time but you could consider a 3rd option which would be using the core OpenCart methods and classes but not the official API or direct database changes.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by reetp » Tue Jan 07, 2020 9:29 pm

Can anyone tell me why this extension appears to be already installed on the github install which I am testing with?

https://www.opencart.com/index.php?rout ... n_id=34915

I just went to my test setup and the settings are already there?

Attachments

Shot6.jpg

Shot6.jpg (31.48 KiB) Viewed 1375 times

Shot5.jpg

Shot5.jpg (18.02 KiB) Viewed 1375 times


Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by paulfeakins » Tue Jan 07, 2020 10:21 pm

reetp wrote:
Tue Jan 07, 2020 9:29 pm
I just went to my test setup and the settings are already there?
I think you're mistaken, the screenshots from that extension are standard, all that ext. does is use the lower of 2 prices but doesn't modify the store as far as I can see.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by reetp » Wed Jan 08, 2020 1:07 am

paulfeakins wrote:
Tue Jan 07, 2020 10:21 pm
reetp wrote:
Tue Jan 07, 2020 9:29 pm
I just went to my test setup and the settings are already there?
I think you're mistaken, the screenshots from that extension are standard, all that ext. does is use the lower of 2 prices but doesn't modify the store as far as I can see.
Roger. Hard to tell what it does when you don't have the code.... !

Couple of other quickies. I must have missed something as pricing seems to have a mind of it's own.

I have set a test product with a base price of 10.00 and Taxable goods, and I get this?

£8.58
Ex Tax: £6.13

It also shows in the Product list as Price £6.13

I then removed the 'Eco tax rate' and we now get:

£7.35
Ex Tax: £6.13

Then I look at the test 'MacBook Air' which has a Price of 1000 and Tax Class Taxable Goods then:

£735.00
Ex Tax: £612.50

WTF?

I did wonder if it was trying to automatically convert the currency as this test machine is on my own server here in Spain? Every which way I wriggle with taxes it refuses to play ball ! I can see the price is correct in the database. Somehow it is getting mangled.

Oh even better. Deleted cache. Opened the same product with different browsers and get this:

Prod1.png

Prod1.png (17.3 KiB) Viewed 1336 times

Prod2.png

Prod2.png (16.92 KiB) Viewed 1336 times

Mobile browser shows £7.35/£6.13 amd £735/£612.50 as well

Oh dear :-( Wasting a day of my life just to do some simple stuff doesn't bode well.


I also wanted to take a look at a sample theme and module layout and was reading the dev docs here:

http://docs.opencart.com/en-gb/developer/module/

They point to this but the site no longer exists (I have seen the forum post as to why).
The easiest way to create a module is to download the DIY Module Builder skeleton from HostJars.
The docs need updating. Not inspiring.....
Are there any other sample layouts for themes and modules?
I want to make some minor change to the default theme so wanted to 'copy' it to a 'new' theme as a template and modify from there.

Sorry - this is pretty frustrating and after a day I am starting to wonder if it is worth wasting any more of my time. I'm not a kid, and not exactly stupid - I already run my own cart but wanted to look at something a bit 'fresher', happy hacking a bit of code here & there etc etc. This seems quite nice and slick, but not exactly user friendly out of the box.

Feels like a day bashing my head against a wall trying to simple things. Hey ho.

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm

Post by by mona » Wed Jan 08, 2020 1:36 am

better to start a new topic than to add it this one

This covers the basics
https://code.tutsplus.com/tutorials/und ... -cms-25106

This explains the shipping tax
viewtopic.php?f=201&t=214760


you can turn off caching for development in the DASHBOARD => Top right Cog


You can make modifications to the default theme by using the OCMOD
https://github.com/opencart/opencart/wi ... ion-System
It does not cover everything but it is somewhere to start.

And this ..
https://blog.templatetoaster.com/how-to ... art-theme/

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by reetp » Thu Jan 09, 2020 8:20 pm

Damn. Foro logged me out and lost my post. :-( Sheeesh.

by mona wrote:
Wed Jan 08, 2020 1:36 am
better to start a new topic than to add it this one
Sorry - I was kind of making notes as I went.

This covers the basics
https://code.tutsplus.com/tutorials/und ... -cms-25106

This explains the shipping tax
viewtopic.php?f=201&t=214760
Thanks. Shame information is incomplete (github wiki) or is littered everywhere. Just finished mentoring in GSOD and one thing that I had hammered home to me by a professional doc writer was for there to be a 'single source of truth' :-)

OK the $ vs £ issue was due to a session cookie being set. For some reason it managed to get set as $. No idea why.
Is is stored in the oc_session table. The cookie data looks to be set for a month?

It also seems to survive a browser restart as well. Tenacious little thing.

Fixed one bit to do with pricing.

Either all the currency conversions should default to 1 out of the box, or there should be a more obvious warning.

https://github.com/opencart/opencart/issues/7813

Hey ho.

you can turn off caching for development in the DASHBOARD => Top right Cog
Yup got that thanks. Have also deleted out the cache dir as well, just to be sure.

You can make modifications to the default theme by using the OCMOD
https://github.com/opencart/opencart/wi ... ion-System
It does not cover everything but it is somewhere to start.

And this ..
https://blog.templatetoaster.com/how-to ... art-theme/
Nice thanks.

Again, it is a shame there isn't more here.

Newbie

Posts

Joined
Mon Jan 06, 2020 7:47 pm
Who is online

Users browsing this forum: Majestic-12 [Bot], muko34 and 19 guests