TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-project-tt-products@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 01.07.2009, 23:22
Simon J
Gast
 
Beiträge: n/a
Standard [TYPO3-shop] Select shipping method depending on weight

I'm doing some light adjustments on a tt_products shop

I've got two shipping options - letter or parcel
Created my own typoscript values 'weightlimit' and 'replaceShipping'.
If the total weight is higher than the weight limit, the below-mentioned
code selects the key stored at the 'replaceShipping'-index (e.g. next
payment option at index '20')

However I admit this is quite a poor hardcoded hack, and it does not
work 100% correctly as it is not in sync with the rest of the shop.. So
I was hoping someone would share a more elegant solution or come up with
some ideas.

class.paymentshipping.php

if ($pskey == 'shipping')
{
if ($calculatedArray['weight'] >=
$this->conf['shipping.']['10.']['weightlimit'])
if ($activeArray[0] == 10) { $activeArray[0] =
$this->conf['shipping.']['10.']['weightlimit.']['replaceShipping'];
unset($confArr[10]);
unset($value);
$actTitle = $this->conf['shipping.']['20.']['title'];
}
}
}
_______________________________________________
TYPO3-project-tt-products mailing list
TYPO3-project-tt-products (AT) lists...netfielders.de
http://lists.netfielders.de/cgi-bin/...ct-tt-products
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Sponsored Links
  #2  
Alt 02.07.2009, 22:53
Simon J
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] Select shipping method depending on weight

Simon J skrev:
> I'm doing some light adjustments on a tt_products shop
>
> I've got two shipping options - letter or parcel
> Created my own typoscript values 'weightlimit' and 'replaceShipping'.
> If the total weight is higher than the weight limit, the below-mentioned
> code selects the key stored at the 'replaceShipping'-index (e.g. next
> payment option at index '20')
>
> However I admit this is quite a poor hardcoded hack, and it does not
> work 100% correctly as it is not in sync with the rest of the shop.. So
> I was hoping someone would share a more elegant solution or come up with
> some ideas.
>
> class.paymentshipping.php
>
> if ($pskey == 'shipping')
> {
> if ($calculatedArray['weight'] >=
> $this->conf['shipping.']['10.']['weightlimit'])
> if ($activeArray[0] == 10)
> { $activeArray[0] =
> $this->conf['shipping.']['10.']['weightlimit.']['replaceShipping'];
> unset($confArr[10]);
> unset($value);
> $actTitle =
> $this->conf['shipping.']['20.']['title'];
> }
> }
> }


Ok, seems like I need to build a new function.
In class.paymentshipping.php whenever I need to access basketinformation
in $this->basket, the computer goes nuts, why?

I need to grab the total weight, and use it for comparison with a custom
typoscript-value - the weight limit
_______________________________________________
TYPO3-project-tt-products mailing list
TYPO3-project-tt-products (AT) lists...netfielders.de
http://lists.netfielders.de/cgi-bin/...ct-tt-products
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 03.07.2009, 08:04
Franz Holzinger
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] Select shipping method depending on weight

Simon J a écrit :
> Simon J skrev:
>> I'm doing some light adjustments on a tt_products shop
>>
>> I've got two shipping options - letter or parcel
>> Created my own typoscript values 'weightlimit' and 'replaceShipping'.
>> If the total weight is higher than the weight limit, the below-mentioned
>> code selects the key stored at the 'replaceShipping'-index (e.g. next
>> payment option at index '20')
>>
>> However I admit this is quite a poor hardcoded hack, and it does not
>> work 100% correctly as it is not in sync with the rest of the shop..
>> So I was hoping someone would share a more elegant solution or come up
>> with some ideas.
>>
>> class.paymentshipping.php
>>
>> if ($pskey == 'shipping')
>> {
>> if ($calculatedArray['weight'] >=
>> $this->conf['shipping.']['10.']['weightlimit'])
>> if ($activeArray[0] == 10)
>> { $activeArray[0] =
>> $this->conf['shipping.']['10.']['weightlimit.']['replaceShipping'];
>> unset($confArr[10]);
>> unset($value);
>> $actTitle =
>> $this->conf['shipping.']['20.']['title'];
>> }
>> }
>> }

>
> Ok, seems like I need to build a new function.
> In class.paymentshipping.php whenever I need to access basketinformation
> in $this->basket, the computer goes nuts, why?
>
> I need to grab the total weight, and use it for comparison with a custom
> typoscript-value - the weight limit



plugin.tt_products.shipping {
10.title = Parcel
10.price.type = weight
10.price.WherePIDMinPrice.155 = 7.5
10.price.1 = 1.5
10.price.500 = 2.5
10.price.1000 = 3.5
}


There is already a solution for more advanced shipping calculations in
tt_products 2.8.0:

plugin.tt_products.shipping {
10.title = Parcel
10.price.calc {
use = 10
}
}


plugin.tt_products.shippingcalc {
10.type = price
10.sql.where = category = 12
10.prod.250 = 4
}

It would be better to improve this function.


- Franz
_______________________________________________
TYPO3-project-tt-products mailing list
TYPO3-project-tt-products (AT) lists...netfielders.de
http://lists.netfielders.de/cgi-bin/...ct-tt-products
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 03.07.2009, 15:24
Simon Justesen
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] Select shipping method depending on weight

Franz Holzinger skrev:
> Simon J a écrit :
>> Simon J skrev:
>>> I'm doing some light adjustments on a tt_products shop
>>>
>>> I've got two shipping options - letter or parcel
>>> Created my own typoscript values 'weightlimit' and 'replaceShipping'.
>>> If the total weight is higher than the weight limit, the below-mentioned
>>> code selects the key stored at the 'replaceShipping'-index (e.g. next
>>> payment option at index '20')
>>>
>>> However I admit this is quite a poor hardcoded hack, and it does not
>>> work 100% correctly as it is not in sync with the rest of the shop..
>>> So I was hoping someone would share a more elegant solution or come
>>> up with some ideas.
>>>
>>> class.paymentshipping.php
>>>
>>> if ($pskey == 'shipping')
>>> {
>>> if ($calculatedArray['weight'] >=
>>> $this->conf['shipping.']['10.']['weightlimit'])
>>> if ($activeArray[0] == 10)
>>> { $activeArray[0] =
>>> $this->conf['shipping.']['10.']['weightlimit.']['replaceShipping'];
>>> unset($confArr[10]);
>>> unset($value);
>>> $actTitle =
>>> $this->conf['shipping.']['20.']['title'];
>>> }
>>> }
>>> }

>>
>> Ok, seems like I need to build a new function.
>> In class.paymentshipping.php whenever I need to access
>> basketinformation in $this->basket, the computer goes nuts, why?
>>
>> I need to grab the total weight, and use it for comparison with a
>> custom typoscript-value - the weight limit

>
>
> plugin.tt_products.shipping {
> 10.title = Parcel
> 10.price.type = weight
> 10.price.WherePIDMinPrice.155 = 7.5
> 10.price.1 = 1.5
> 10.price.500 = 2.5
> 10.price.1000 = 3.5
> }
>
>
> There is already a solution for more advanced shipping calculations in
> tt_products 2.8.0:
>
> plugin.tt_products.shipping {
> 10.title = Parcel
> 10.price.calc {
> use = 10
> }
> }
>
>
> plugin.tt_products.shippingcalc {
> 10.type = price
> 10.sql.where = category = 12
> 10.prod.250 = 4
> }
>
> It would be better to improve this function.
>
>
> - Franz


Hi Franz,

Thanks, I'll try that, I can only find tt_products 2.5.13. Where's 2.8
located?

Have a great summer

Simon
_______________________________________________
TYPO3-project-tt-products mailing list
TYPO3-project-tt-products (AT) lists...netfielders.de
http://lists.netfielders.de/cgi-bin/...ct-tt-products
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #5  
Alt 06.07.2009, 08:40
Franz Holzinger
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] Select shipping method depending on weight

Simon Justesen a écrit :
> Hi Franz,
>
> Thanks, I'll try that, I can only find tt_products 2.5.13. Where's 2.8
> located?
>
> Have a great summer
>
> Simon


Hello Simon,

tt_products in version 2.8.0 beta is available to sponsors only at
http://ttproducts.de .
http://ttproducts.de/tt_products_ext.html?&tt_products[backPID]=7&tt_products[product]=1&cHash=72944411fe

It will be in TER about 3 years after having been marked as 'stable'.

Greetings,

Franz
_______________________________________________
TYPO3-project-tt-products mailing list
TYPO3-project-tt-products (AT) lists...netfielders.de
http://lists.netfielders.de/cgi-bin/...ct-tt-products
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
[TYPO3-shop] Hide shipping method when weight higher than... Simon Justesen typo3-project-tt-products@lists.netfielders.de 0 10.03.2009 17:15
[TYPO3-shop] Weight without decimal places (T3 <4.2.3;tt_prod v1.7.1) Franz Gutsch typo3-project-tt-products@lists.netfielders.de 1 28.01.2009 19:14
[TYPO3-shop] checkout requirement: minimum weight in basket Heiko Hänsge typo3-project-tt-products@lists.netfielders.de 1 28.11.2008 12:30
[TYPO3-shop] How to hide shipping address prompt in "pick up in thestore" purchases (no shipping) Juan Pablo Villaverde typo3-project-tt-products@lists.netfielders.de 1 04.07.2008 16:35
[TYPO3] tt_products: calculate shipping costs depending on country Andreas Förthner typo3-english@lists.netfielders.de 0 02.03.2007 14:21


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:00 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103