vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - microCART: Shopping System for vB4 (https://vborg.vbsupport.ru/showthread.php?t=256723)

Eric 05-16-2011 10:53 AM

vB 4 no longer uses =& new for it's classes. It's not even necessary in PHP 5/5.3

So that line should be changed to
PHP Code:

$bbcode_parser = new vB_BbCodeParser($vbulletinfetch_tag_list()); 

This line should be changed as well
PHP Code:

 $pdf =& new Cezpdf(('A4')); 

to
PHP Code:

 $pdf = new Cezpdf(('A4')); 


BaziCenter 05-16-2011 10:56 AM

Quote:

Originally Posted by micheal332001 (Post 2196287)
cart.php line 342 is down to this

PHP Code:

$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list()); 

so you might have something set wrong as this is vb code.
this goes for the other errors as well.

This is an old vB code.
Quote:

Since PHP 5, new returns a reference automatically, so using =& in this context is deprecated and produces an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions. (Technically, the difference is that, in PHP 5, object variables, much like resources, are a mere pointer to the actual object data, so these object references are not "references" in the same sense used before (aliases). For more information, see Objects and references.)
http://php.net/manual/en/language.references.whatdo.php
So in PHP5 it is safe to use '=' instead of '=&' which new vB codes do.

And for the "ereg_replace() is deprecated" warning try using the preg_replace() instead.


Anyway thanks for your quick reply.

micheal332001 05-17-2011 05:49 AM

Quote:

Originally Posted by Eric (Post 2196297)
vB 4 no longer uses =& new for it's classes. It's not even necessary in PHP 5/5.3

So that line should be changed to
PHP Code:

$bbcode_parser = new vB_BbCodeParser($vbulletinfetch_tag_list()); 

This line should be changed as well
PHP Code:

 $pdf =& new Cezpdf(('A4')); 

to
PHP Code:

 $pdf = new Cezpdf(('A4')); 


Quote:

Originally Posted by BaziCenter (Post 2196298)
This is an old vB code.
So in PHP5 it is safe to use '=' instead of '=&' which new vB codes do.

And for the "ereg_replace() is deprecated" warning try using the preg_replace() instead.


Anyway thanks for your quick reply.

Thank you both for your input i will get this changed asap and get new files uploaded by the end of the day.

CvP 05-17-2011 07:44 AM

I apologize if this has been asked before but I have downloaded both versions available here.
Both are giving these errors:
in forum.php: Fatal error: Cannot redeclare getFormatPrice() (previously declared in includes\block\html.php(95) : eval()'d code:40) in includes\block\html.php(95) : eval()'d code on line 51

in admincp > microcart > options:
Parse error: syntax error, unexpected $end in \admincp\microcart_admin.php on line 2776

jackalopejoe 05-19-2011 12:58 AM

Hello All. My apologies if i missed this. I searched both threads but couldn't find an answer. However, i'm amazed i would be the fist to have said problem.

It is around combined shipping. I have a category where i need to only charge 5 dollars shipping regardless of quantity. Buy 1 or buy 3 the shipping is $5... But in the product where shipping is calculated if someone adds 3 items the shipping is $15.

Is there a way to "combine shipping" or flat rate shipping per order in a category.

Thanks everyone. :)

micheal332001 05-19-2011 08:43 AM

Quote:

Originally Posted by CvP (Post 2196689)
I apologize if this has been asked before but I have downloaded both versions available here.
Both are giving these errors:
in forum.php: Fatal error: Cannot redeclare getFormatPrice() (previously declared in includes\block\html.php(95) : eval()'d code:40) in includes\block\html.php(95) : eval()'d code on line 51

in admincp > microcart > options:
Parse error: syntax error, unexpected $end in \admincp\microcart_admin.php on line 2776

please make sure you have uploaded all files and also disable the forum block as there is a problem with this.

Quote:

Originally Posted by jackalopejoe (Post 2197385)
Hello All. My apologies if i missed this. I searched both threads but couldn't find an answer. However, i'm amazed i would be the fist to have said problem.

It is around combined shipping. I have a category where i need to only charge 5 dollars shipping regardless of quantity. Buy 1 or buy 3 the shipping is $5... But in the product where shipping is calculated if someone adds 3 items the shipping is $15.

Is there a way to "combine shipping" or flat rate shipping per order in a category.

Thanks everyone. :)

this has not been added but could be added or if you know some php code you could change this yourself.
when i get home i will post a small bit of code that you could use to make this happen.

jackalopejoe 05-19-2011 11:34 PM

Quote:

Originally Posted by micheal332001 (Post 2197481)

this has not been added but could be added or if you know some php code you could change this yourself.
when i get home i will post a small bit of code that you could use to make this happen.


Man! I would appreciate that soooo much... My work around now is to disable shipping and add a product called shipping that is $5... Not a fix as it requires human action to add it to their cart.. And we all know how that'll go... lol.. Thanks again.

deschutes 05-20-2011 12:22 AM

Is combined shipping not a current feature? I haven't installed yet, but I figured it would be there. In many cases shipping is a flat rate, shipping one item is the same cost as multiple items. It would be good to have the ability to specify that shipping is a flat rate of say $10, but X quantity more ship for 0 additional.

jackalopejoe 05-20-2011 03:20 PM

Quote:

Originally Posted by deschutes (Post 2197809)
Is combined shipping not a current feature? I haven't installed yet, but I figured it would be there. In many cases shipping is a flat rate, shipping one item is the same cost as multiple items. It would be good to have the ability to specify that shipping is a flat rate of say $10, but X quantity more ship for 0 additional.

Correct. It is not.

The only option is by weight..

First X amount of lbs, oz etc = $Y to ship | Anything over X weight = +$Y

And you set the weight of each product individually.

deschutes 05-22-2011 02:52 PM

Quote:

Originally Posted by jackalopejoe (Post 2198020)
Correct. It is not.

The only option is by weight..

First X amount of lbs, oz etc = $Y to ship | Anything over X weight = +$Y

And you set the weight of each product individually.

I guess you could fake this, for the most part. If you were selling T-Shirts you could say that the first 10 lbs ship for $10. Although this would definitely not work in every case.


All times are GMT. The time now is 04:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01975 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete