Jump to content



Member Since 08 Nov 2008
Offline Last Active May 02 2022 02:11 AM

#338193 Conditional Script Loading In Checkout

Posted by tbirnseth on 04 April 2021 - 07:29 PM

Looks like this is being cached by the js/tygh/ajax.js and is using an internal 'promise' mechanism.

I'm not a JS expert by any means.  But I need to be able to prevent caching and (I'm assuming) it's adding a parameter to the end of the URL.  The script is self-checking an if it's not from an exact 'src=' that it expects, it will not allow execution.  Not clear why refreshing the page and having it load outside of the ajax request allows it to work properly.


I've  tried using $.getScript() but that is also overridden in tygh/ajax.js.  So I'm outside of my experience if anyone can help.  Possibly someone from cs-cart might chime in?

#338001 Managing Tabs Per Vendor On The Product Page

Posted by tbirnseth on 30 March 2021 - 02:56 AM

Not certain I understand your request so let me paraphrase it and then you can tell me if I got it or not.


You want 4 tabs (A, B, C, D) on your MVE frontend product page.  A&B are specific to each product and are updated via products.update.  C&D are specific to the vendor and the data could be stored/saved in the vendor profile.  Ie. the Company Description and the Shipping/Delivery Information.


It is certainly possible to do this.  It's a very simple addon if the Shipping/Delivery Information is already a separate column in the cscart_company_descriptions database table and related UI components on the Vendor's profile page.  If you need to create this and get your vendors to update it for their companies, then it's a bit more work.


If the above is your situation, it's not very complicated to do, it just takes time.


If you are using Common Products addon then you could have several vendors selling the same product.  Until the vendor is selected, that information would need to be stubbed out with something like "Select vendor first"!

#337615 Guide For Vendors

Posted by tbirnseth on 16 March 2021 - 07:22 PM

Create a Design/Layouts/Layout/VendorAccopunt and create a block to appear above the main-content of the vendor home page that contains a link to your document.  I'd suggest you just generate a PDF file and have it in the root of your store.  The link can be set to target="_blank" to open in a separate tab (which would be most useful).

#336775 How I Can Hide / Disable This Fields And Tab In Vendor Account?

Posted by tbirnseth on 18 February 2021 - 06:52 PM

your request is well beyond the scope of a community forum.  Suffice to say that yes, you can change things to appear differently in the admin/vendor views.  But you would need to either override the pages to change language variable names based on context or ask cs-cart to add a hook (or temporarily add one yourself) to the __() function like

fn_set_hook('lang_vars_pre', $var, $params, $lang_code)

that would allow you to change the value of a language variable if a comparable name existed.  I.e. for 


if an complementary name of 'vendor.customers' exists, then you would substitute that value for $var.


This is all just examples, don't rely on the actual values I've referenced.  A better (more unique) naming construct would be better.

#336774 Paypal For Commerce

Posted by tbirnseth on 18 February 2021 - 06:41 PM

Taxation is based on the rates you setup for "locations".  Each vendor is an 'origin' and the customer is a 'destination'. So taxes are calculated on the destination and shipping is done between origin and destination.  Not sure your above is a valid scenario (but I'm not in EU and am surprised by many things there).  But all the taxes should be based on the customer's location.


Taxjar is great in the US since we tax based on product type, amounts and State, County and City levels.  I.e. in NY City, garmets are not taxed if the item is under like $110.  But if it's over that, it's taxed at 8%.  If you sell auto tires, you have tire taxes at federal level and all jurisdictions down to the city level.  US Taxes MUST be done by something like TaxJar or not done at all to be accurate.


But, given taxes are different EVERYWHERE, it's hard to set accurate rules and exceptions.  I.e. a customer can be 'tax_exempt' but maybe only for one vendor on a site they may not be "tax exempt" for others in the order. Especially if you have a truly worldwide marketplace.

#336490 How I Can Hide / Disable This Fields And Tab In Vendor Account?

Posted by tbirnseth on 10 February 2021 - 09:17 PM

Changing menu structure is well outside the scope of the community forum. 


Personally, I prefer UI's that work as follows for a main menu:

* hover displays the list after 500ms

* clicking the menu name (top) automatically selects the first item in the list which should (in this case) be 'Products'


It saves clicks and (like you've noted) saves \duplication especially on mobile devices.  It also seems much more intuitive than a Products menu where Categories is the first in the list.  But that can be changed in the backend.  But the main navigation menu functionality is pretty embedded in the code.  You could add a lang variable and call it something like product_menu_item and give it a value of "Seller info" and then change the schema for the navigation to use that language variable in a my_changes/schemas/menu/menu.post.php.

#336439 Changing Our Marketplace Of Add-Ons And Themes

Posted by tbirnseth on 10 February 2021 - 01:44 AM

Note that this is a community forum.  You should use helpdesk if you want a direct dialog.  But then no one else will be aware of your conversation.

#336349 How To Check If User Purchased An Item On The Product Page

Posted by tbirnseth on 07 February 2021 - 08:51 PM

sorry, I've already freely provided all that I can in support of your endeavor.  

Again, I strongly suggest you hire a developer to help you.

#336338 Why Is There No Developers Trying To Create A Add-On To Make Vendor Panel Int...

Posted by tbirnseth on 06 February 2021 - 10:22 PM

I agree with @harmsmitsdev on this one....  There is no business model to support the investment nor the maintenance.


It used to be (when I first started developing for cs-cart) that cs-cart was cautious about stepping on addon vendor's addons.  I.e. if functionality were available in an addon from a 3rd party developer, they wouldn't add it to the core product.  Then they got bigger!!  Now, they seem to have total disregard for 3rd party developers and their investments (unless you're simtechdev).


You'll notice that the number of new production addons has decreased over the past few years.  Reason is that it's no longer profitable to do so. There's just not enough volume and when cs-cart stomps on your work it just depreciates the value of the addon in the market.  No need to compete with the big-fish here.


Best solution is for you go get together with several other merchants (cs-cart customers and more importantly potential customers) and demand that they adjust the product to meet your needs.  If not, the only power you have is to walk away.


We've tried to address pieces of this in our EZ Vendor Fields addon for MVE that lets a site admin hide various menus and fields from vendors that aren't need by vendors on their site.  But my bet is it will last less than a year before I have to pull it because either cs-cart will add something similar (and most likely less complete) and/or the maintenance costs will become too high relative to sales. 


Using EZ Vendor Fields as an example, it was released in Nov-20.  There have been MAYBE 1/2 dozen sales.  I'll need about 50 sales just to break even.  You can do the math for how long that will take  Bottom line is that cs-cart addon market is VERY SMALL.  It takes forever to recover your investment in production addons.  Therefore there's not a lot of incentive to make large investments in addons that won't be profitable till after I die.


It's all business.  If you want addon vendors to provide lower cost production addons, then you need to buy our products.  Otherwise it forces us and you into custom development which is much more expensive for you and much safer for us.

#335850 Dissatisfaction With Bug Tracker Response Times

Posted by tbirnseth on 27 January 2021 - 04:25 AM

They should involve the community at the concept and design phase.  Beta is way too late in the process and they are highly resistant to any design changes once they've implemented.


It's a development driven organization.  More energy is put into new technology (not functional improvement) than into both fixing outstanding issues and to acting on customer requests.


Fixing bugs is only a lot of work if:

1) you have defect density that is greater than your development staff's ability to resolve.

2) You get behind and refuse to invest in catching up.

3) Your QA process doesn't include defined workflows and only validates via automation.  Nothing beats monkeys on a keyboard to test a product given scenarios and workflows.

#335690 Dissatisfaction With Bug Tracker Response Times

Posted by tbirnseth on 21 January 2021 - 11:59 PM

Yeah if I want to spend my time researching, debugging, testing and submitting.  Sorry, that's their job, not mine and why we all pay "prolongation license fees".  If they start paying me as a developer, I'm happy to do their work for them.

#335617 Dev Store

Posted by tbirnseth on 19 January 2021 - 06:07 PM

Agree with Ecom... 

#335189 Delete Logs

Posted by tbirnseth on 05 January 2021 - 07:30 PM

If it's specific to "log clear", you could create a file named app/addons/my_changes/backend/logs.pre.php

And in it have content similar to:

if( !defined('BOOTSTRAP') ) die('Access denied');
use Tygh\Registry;
if( $_SERVER['REQUEST_METHOD'] == 'POST' && $mode == 'clear' ) {
  $email = db_get_field("SELECT email FROM ?:users WHERE user_id=?i", $_SESSION['auth']['user_id']);
  $msg = sprintf("[%s]: %s cleared logs.\n",  date("m/d/Y H:i:s", TIME), $email);
  @file_put_contents("./clear_log.log", $msg, FILE_APPEND);

#335097 How Can I Clear This Every 24Hrs?

Posted by tbirnseth on 03 January 2021 - 09:33 PM

Why don't you want to track product views?

product views are done in the frontend/products.php controller.

Suggest you use the hook 'update_product_notifications_pre' to alter the data that is updated if you want to disable the 'viewed' tracking.


I can't find the template code you are referring to in the standard release.


If you need help utilizing the hook, feel free to contact me via the 'get a quote' link in my signature. 


If you truly want to do this hourly because you want to see views/hr, suggest you also utilize that hook and possibly extend the functionality  to capture views/hr rather than zapping the total views.  But note that you will then need code to visualize the data like a line graph or bar graph and a way to select the period you want to view.

#334566 Vendor Options Add Missing

Posted by tbirnseth on 17 December 2020 - 11:42 PM

Options (with modifiers) are NOT the same as variations. There's no need to have multiple instances of a product to support product options such as "installation fee" and other similar common "options" that are not "variations" of the product!  Cs-cart needs to stop removing functionality.